Announcement

Collapse
No announcement yet.

SkinBedder3 and iGkeys3

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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).
    Epia-M II M10000 Nehemiah WinXP sp2 Travla C134 case Carnetix 1260 power Xenarc 700TS XM Direct Toslink Extigy USB 5.1 Garmin GPS18 Linksys 802.11g wireless Nokia 6230 Bluetooth Memphis Amps Focal Speakers Frontend: RoadRunner

  • #2
    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!

    Comment


    • #3
      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).
      Epia-M II M10000 Nehemiah WinXP sp2 Travla C134 case Carnetix 1260 power Xenarc 700TS XM Direct Toslink Extigy USB 5.1 Garmin GPS18 Linksys 802.11g wireless Nokia 6230 Bluetooth Memphis Amps Focal Speakers Frontend: RoadRunner

      Comment


      • #4
        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:

        Comment


        • #5
          Originally posted by Marvin Hlavac View Post
          I suspect as RPM_VR4 suggests: "The best way would be to just have the buttons run the Auto-It scripts directly".
          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?
          Epia-M II M10000 Nehemiah WinXP sp2 Travla C134 case Carnetix 1260 power Xenarc 700TS XM Direct Toslink Extigy USB 5.1 Garmin GPS18 Linksys 802.11g wireless Nokia 6230 Bluetooth Memphis Amps Focal Speakers Frontend: RoadRunner

          Comment


          • #6
            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:
            Code:
            Opt("WinSearchChildren", 1)
            ;this is used because all the menu popups in IG have no window title
            WinActivate ("iGuidance")
            	Send("{ENTER}")
            ;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 )
            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.

            Comment


            • #7
              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.
              Epia-M II M10000 Nehemiah WinXP sp2 Travla C134 case Carnetix 1260 power Xenarc 700TS XM Direct Toslink Extigy USB 5.1 Garmin GPS18 Linksys 802.11g wireless Nokia 6230 Bluetooth Memphis Amps Focal Speakers Frontend: RoadRunner

              Comment


              • #8
                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.)

                Comment


                • #9
                  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.

                  Comment


                  • #10
                    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

                    Comment


                    • #11
                      Originally posted by RPM_VR4 View Post
                      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.


                      fyi i just spent 2 days figuring this out lol but im pretty sure ive figured it out in VB6 anyway not sure if its doable in autoit tho

                      RPM any major changes in 2.999 to 3.0 in terms of forms is it still just 2 forms embedded TDisplayForm>TDisplayPanel ?
                      .______
                      | '_ |__\___
                      [(o)|___(o)] XB
                      ._________
                      | I__I I_I|_\__I
                      [(o)______(o)]b VanPimpin'

                      LostReceptions Apps D/L Here

                      GPSGasoline- Rewriting

                      Draw- SkribblePad for Touchscreens

                      iGQwerty-iG3.0 Qwerty Keyboard

                      CarPCNetwork

                      Comment


                      • #12
                        Marvin: The top line is needed for Sb (according to LS). I know nothing about Control Focus/Clicks yet. Still haven't had a chance to dive in to Auto-It a bit more and learn advanced stuff like you and LS do (one of LS's scripts is like 3 pages long :P)

                        lost: TDisplayForm is the main window of Sb. I guess in 2.999 I embedded to a panel still (don't really remember). In 3.0-P1 and P2, I embed to a custom component I made called TWindowContainer. Each skin ini-file is embeded to a TSkinLayer. (so yes, V3-P1 and P2 handle embedding a little different. The only big diff between P1 and P2, is P2 has the Type() function because I couldn't get the Send() function to work with Google Earth)

                        If you want the source PM me your e-mail. All the Win32 API commands are basically the same in any language and Pascal (Delphi) is by far the easiest syntax to understand.

                        Code:
                        Example:
                          While (WindowHandle = 0) do
                            WindowHandle := Windows.FindWindow('', 'iGuidance');
                          If (WindowHandle <> 0) then
                            Windows.SetParant(WindowHandle, DisplayForm.Handle);
                        ...see, easy for anyone to understand The most confusing thing to a non-pascal Win32 API programmer is the "<>" which means not-equal-to.

                        Comment


                        • #13
                          LS or RPM:
                          I"ve been trying to write some scripts to do the quick/short/major/local and also the day/nite/auto stuff and I have something that "works" but I'm not sure it's the best code to use. Could you guys post a complete example of one that actually works for you (the examples above don't work for me)?

                          Here's what I have:
                          Code:
                          ;This selects iG LOCAL route option...
                          Opt("WinSearchChildren", 1)
                          WinMenuSelectItem("iGuidance", "", "&Tools", "&Route Options")
                          ControlFocus ( "iGuidance", "Local", 527 )
                          ControlClick("", "Local", 527)
                          ControlClick("", "", 1) ;closes the window
                          BTW: Is there any way to NOT update the screen while all these menus are flying by?
                          Epia-M II M10000 Nehemiah WinXP sp2 Travla C134 case Carnetix 1260 power Xenarc 700TS XM Direct Toslink Extigy USB 5.1 Garmin GPS18 Linksys 802.11g wireless Nokia 6230 Bluetooth Memphis Amps Focal Speakers Frontend: RoadRunner

                          Comment


                          • #14
                            LS didn't give me one for that and I haven't had time to make my own yet (you are beating me to it ).

                            Here is what LS gave me for Route Options:
                            Code:
                            Opt("WinSearchChildren", 1)
                            ;this is used because all the menu popups in IG have no window title
                            WinActivate ("iGuidance")
                            	Send("{ENTER}")
                            ;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", "Route", 511 )
                            ControlClick ( "", "Route", 511 )
                            You should just have to add one more Control Focus/Click to that using Auto-It window tool to get the right info for each S/Q/M/L button. I may be interested in your scripts as well if you get it all working (saves me some time for when I want to make a new skin with more buttons.)

                            Comment


                            • #15
                              Originally posted by wysocki View Post
                              Is there any way to NOT update the screen while all these menus are flying by?
                              You could set the menu window transparent (AutoIt does have such function), but after trying it briefly I decided not to bother with it because before the transparency kicks in the menu window does appear for a fraction of a second anyway...

                              Comment

                              Working...
                              X