Results 1 to 5 of 5
-
03-25-2010, 07:57 AM #1
- Join Date
- Feb 2010
- Location
- Denmark
- Posts
- 21
AutoHotKey tip for button clicking
Arms are up
I was trying to find a way to click a button in one of those panel windows you do not
wish to have open when flying VC. Using the Keyboard that is........
I think it is possible to do using calls of some kind but I find it very difficult.
So why not make the window transparent when the button press should occur.
The free app "AutoHotKey" can do just that, and in a very simple way
ex. the code line ....... "WinSet, Transparent, 200, Untitled - Notepad"
will make the window transparent.
But set the value to 1 (instead of 200) you cannot find the window at all
However I did a little testing, and it is possible still to make a mouse down event in the window.
So, the plan is to make this script for a button press that do not have a key shortcut and cannot be interfaced via fsfuipc or otherwise.
1. Open the Panel window and fix the size (can be done with AutoHotkey )
2. Pre-define all the clickspots that you want (xy-coordinates relative to the window itself, therefore the fixed size)
3. Add a keyboard shortcut to the clickspots
4. Make the window transparent
5. When a key is used, make the window front most before the mouse-xy-down.
6. Make FSX main window front again
I am not sure 5. and 6. are needed, but haven't tested.
re. Peter
-
03-25-2010, 11:42 AM #2
- Join Date
- Feb 2010
- Location
- Denmark
- Posts
- 21
Re: AutoHotKey tip for button clicking
Hi again.
Done a little more testing
Hope it is not only me who can see the potential in this.
I beleive this is a way to keyboard interface every single button in all of the payware aircrafts that is unsupported.
The following works flawless as an AutoHotKey script where the "Space button" presses a button on the panel named "Main Panel":
WinSet, Transparent, 1, Main Panel
winactivate, Main Panel
winmaximize, Main Panel
winmove, Main Panel,,10,0
Space::
winactivate, Main Panel
MouseClick, left, 523,1182
winactivate, Microsoft Flight Simulator X
mousemove, 1920,1200
Just reuse the bottom 5 lines for more buttons with different co-ordinates and shortcuts.
I found that the "Main Panel" had to be moved slightly out of screen in one side, hence the winmove. There was a blinking issue, but it disaperas by that operation
I tried to make the mouse invisible during the operation using the lst line, but that did not work.
It blinks one time and the disapears.
I can live with that, but maybe there is another solution.... I'll keep looking
Forgot to mention........ FSX has to be "not full screen mode" and the Panel "un-docked"
It is easy to remove the taskbar and menubar using a couple of lines more in the beginning of the script. Haven't got those right now but I have done that before.
Re. Peter
-
03-25-2010, 01:20 PM #3
Re: AutoHotKey tip for button clicking
FSUIPC using the mouse macro will do this. (I beleive this is a way to keyboard interface every single button in all of the payware aircrafts that is unsupported). I have used this for the PIC ERJ-145 and PIC 737. Works for FS9 and FSX. Panel window doesn't have to open for the button to work.
Regards,
BrianFS9 & FSX ERJ-145, E-170, E-190, PIC737, Archer, Arrow, GF-MCPPRO, EFIS, 4GF-P8, 4GFT8, 3GF-166, 3GF-RP48, GF-LGT, GF-ATC, GF-TQ6, 3 Projectors, 5 monitors 1 computer
-
03-25-2010, 02:19 PM #4
- Join Date
- Feb 2010
- Location
- Denmark
- Posts
- 21
Re: AutoHotKey tip for button clicking
Hi Brian,
I am not sure you are right.
When I try fsuipc macro, in ex. PMDG J41 it cannot detect a button via the macro.
I have tried and it will not say that the macro is possible, so I guess it will not work.
Ok, I know that it is possible for that specific aircraft using a LUA script in fsuipc, but there are a lot
others where you do not have that option.
Correct me if I am wrong, I would prefer to do it directly.
But for now I think the other solution is fairly easy to work with and also the same thing to do for every interface.
Re Peter
-
03-25-2010, 10:28 PM #5
Re: AutoHotKey tip for button clicking
There are some button clicks that the mouse macro won't map and I have no idea about PMDG stuff. I won't use their stuff because of all the problems trying to get it to work with cockpit building equipment. (I know, a lot of you builders use PMDG and have worked out the bugs, I just don't have the patience anymore.) I just thought the FSUIPC MM would help if you hadn't tried it for what you needed. Good luck finding a solution.
Regards,
BrianFS9 & FSX ERJ-145, E-170, E-190, PIC737, Archer, Arrow, GF-MCPPRO, EFIS, 4GF-P8, 4GFT8, 3GF-166, 3GF-RP48, GF-LGT, GF-ATC, GF-TQ6, 3 Projectors, 5 monitors 1 computer
Similar Threads
-
How can I make COMM TEST button PUSH to TALK button ???
By Nick1150 in forum OpenCockpits General DiscussionReplies: 2Last Post: 09-29-2010, 09:50 AM -
Recall Button
By jfuenmay in forum PMSystemsReplies: 0Last Post: 03-24-2009, 06:43 PM -
switches and AutoHotKey. possible good solution
By joaocbm in forum General Builder Questions All Aircraft TypesReplies: 2Last Post: 02-01-2009, 10:03 AM -
Push Button with LED ???
By shafian in forum Where to Start Building a Home CockpitReplies: 1Last Post: 09-25-2008, 01:25 PM
Pretty Womans in your city
Find Sexy Womans from your city...