SkinBedder3 and iGkeys3
I got the latest version of SkinBedder working fine with iGuidance v3 but I wanted some buttons to do things like Major Route / Local Route / Day Skin / Night Skin / etc. The best? way to do this appeared to be iGkeys which uses Auto-it to "press" the buttons that aren't available with keystrokes. Although my iGkeys script works fine when I just run iGuidance, it doesn't work when I embed iG into SkinBedder. Is it just that I need to change the window names to SkinBedder instead of iGuidance in all the routines in iGkeys? (sorry if this should be posted in the iGkeys forum).
In answer to your question:
I have no idea. You could try sending keystrokes to iGkeys.
In response to "The best?":
No! The best way would be to just have the buttons run the Auto-It scripts directly.
...in fact, I want those too. I guess I should collect all the iG3 Auto-It scripts I can, learn how they work, and then make a new skin with its own sub-menu structure that just calls Auto-It scripts to do everything. Great idea! :)
I've played with the iGkeys script and I'm learning AutoIt. As I understand it, iGkeys is just a script written in AutoIt that, when run, stays resident and watches for keystrokes. When a qualified keystroke happens, it can "click" a particular button on a particular window. The problem I'm having is that with SB embedding iG, the script doesn't see the iGuidance window anymore??? As you say, it might be more efficient to have SB directly call the AutoIt script to click the button rather than constantly watching for actual keystrokes. Still might have the issue of seeing the right window though. Maybe Marvin or other AutoIt pros can chirp in on this (and maybe supply a sample script).
iGkeys may not be the most appropriate application for your purpose. iGkeys was designed for use with a keyboard. In my setup I don't use SkinBedder or any front end at all, but I suspect as RPM_VR4 suggests: "The best way would be to just have the buttons run the Auto-It scripts directly".
But if you wish, I can attempt to help. iGkeys.exe is not password protected so feel free to convert it to an .au3 file and look how it's done. Earlier versions of iGkeys were not created in AutoIt; I only started to play with AutoIt very recently (and I realize the script could be simplified, but it is functional and reliable).
The latest iGkeys version can be downloaded here:
Then rather than staying resident watching for keystrokes, as iGkeys does now, I'd just create a script (exe) that I'd execute from a SB button like "RUN(autoitscript)"? I would think there'd be a noticeable delay in having the button load and run an executable. Is there some way I could have the script stay resident to avoid loading it each time and have the SB button somehow call it with a parameter to do the work on iG?
Originally Posted by Marvin Hlavac
LS sent me a bunch of iG3 AutoIt scripts. I can now make a button go to ANYWHERE in the iG menu structure. What buttons would like like me to add (other than S/Q/M/L)?
I see you mentioned Day/Night, so I might add that one (not too useful if you ask me though).
If you want to look in to doing it yourself, here is basically how it works:
That's LS's code that clicks the 3rd 3D angle in settings. You can use the AutoIt Window tool to find the control text/number of any button. I may build control clicks into Sb someday, but for now just have a button run the auto-it script and let it do the clicking.
;this is used because all the menu popups in IG have no window title
;this brings up the main menu by sending Enter command
ControlFocus ( "iGuidance", "Settings", 511 )
;you must first focus the control before you can send a simulated mouse click to it
ControlClick ( "", "Settings", 511 )
;this sends a simulated mouse click to the control for the Destination button
ControlFocus ( "iGuidance", "Display", 510 )
ControlClick ( "", "Display", 510 )
ControlFocus ( "iGuidance", "3", 617 )
ControlClick ( "", "3", 617 )
This is what I suspected would be done. I think it'd be wise to just write one AutoIt script and handle all the needed functions by passing it a parameter rather than writing separate AutoIt scripts for each function (I think that if you "run" the exe once, it may be cached somewhere so that the second time you run it, it's quicker to load). Can I pass parameters like this: Run(myscript.exe x)
Besides the routing choices, day/nite/auto would be cool to have on stormy days and Marvin has put a great recalculate routine into iGkeys.
From the above script, I suspect the lines ControlFocus ( "iGuidance", "Settings", 511 ) don't really do much in iGuidance version 3.0. They might have done something in previous versions of iGuidance. But don't take my word for it, try it instead. I suspect if you eliminate all the ControlFocus..... lines it will work just as well. (And then you likely can scrap even the Opt("WinSearchChildren", 1) line I'm guessing.)
No, you cannot pass parameters using Sb (sorry, will add it someday).
According to LS the Opt() command is needed to make it work if it is embedded in another app as a child window.
According to the comment above ControlFocus:
;you must first focus the control before you can send a simulated mouse click to it.
Are you saying that is not correct?
FYI: All of LS's scripts I have tried (10+ of them) work fine for me in iG3 UMPC.
I see. Then I guess it is needed since iGuidance is embedded in SB. But I'm pretty sure IGuidance on its own will work just fine even without those lines :)