AHK Code Guru Needed

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #40122
    RustyCardores
    Moderator
      @rustycardores
      MemberModerator

      AHK scripting confuses me everytime. Here is my situation and what I want to do….

      Currently I have KODI working as a Jukebox on the backglass.
      PinballX feeds an image to the Topper.
      Irfanview feeds the playfield (it’s a two image slideshow – the lights flash a bit brighter)

      As you can see in the image, Kodi provides visualisations to the backglass, but Kodi is not capable of sharing “just the visualisation” to the playfield screen.

      So I am trying to run Plane9 Visualisations on the playfield in place of the Irfanview slideshow.  The problems are however…

      * Plane9 needs to open in Windowed mode for it to stay on just the one screen.
      * Windowed Mode is not full screen until it get’s double clicked.
      * There is a bug that closes Plane9 if any key it doesn’t recognise is clicked, unless focus is first handed off to something else.

      So my plan is…

      • Create a script that launches Plane9 and automagically double clicks the middle of the playfield.
      • Have PinballX’s ‘Launch Before’ launch the script
      • Have PinballX then launch Kodi.  (I’m hoping that Kodi launching second will mean that focus will automagically be handed back to it. A wait command may be required)
      • Use PinballX’s ‘Launch after’ to run a kill.bat to close Plane9 on exit from Kodi (I do this now with Irfanview)

      So back to the script… how do I make a script that not only launches an .exe, but also double clicks the screen once that exe is open?

      Cheers, Rusty

      #40124
      RustyCardores
      Moderator
        @rustycardores
        MemberModerator

        Never mind. I have it working.

        How? …I’m buggered if I know. I operate on the principle that if a monkey bashes away on a keyboard long enough, he will eventually write War and Peace. ;)

         

        Run “C:\Games\Plane9\Plane9.exe” -w
        Click 800, 600, 0
        Sleep,1000
        Click 2

        #40126
        randr
        Keymaster
          @randr
          ModeratorMember

          Well glad you got it working…I know I’ve seen it on pbx forums couple years ago same issue if I recall  :good: I should try kodi

          ********************************************************
          Messing with the VPinball app and push notifications.
          So if you haven't downloaded app yet what are you waiting for!?
          for IOS and Android

          ********************************************************

          #40127
          RustyCardores
          Moderator
            @rustycardores
            MemberModerator

            Well I have the ahk>exe working well on it’s own, but not under PBX :(

            I still have screen ordering issues with PBX for some reason.  It works 100% correctly for everything else, playfield 1 for tables/irfanview jukebox slideshow, backglass 2 for B2S/Kodi, topper 3 for topper images, but PBX  launches this exe on the topper, even though if I launch it manually it launches on the playfield.

            It might be easier to just stick with how it is in the photo above I think.

            #40129
            RustyCardores
            Moderator
              @rustycardores
              MemberModerator

              Well I have the ahk>exe working well on it’s own, but not under PBX :(

              I still have screen ordering issues with PBX for some reason.  It works 100% correctly for everything else, playfield 1 for tables/irfanview jukebox slideshow, backglass 2 for B2S/Kodi, topper 3 for topper images, but PBX  launches this exe on the topper, even though if I launch it manually it launches on the playfield.

              It might be easier to just stick with how it is in the photo above I think.

              I just can’t get this to run under PBX, so I rewrote the script to open everything as a stand alone system. It works well, BUT (there is always a but) I can’t kill the processes once I’m done.

              For now I’ll just use the Kodi menu to reboot. The machine reboots pretty fast and drops straight into PBX so all good.

              Oh, and if I don’t want the playfield visualisations I can still use the normal Jukebox image version from within the PBX menu.

              https://vimeo.com/190085843

              As you can see, with the push of a button I can still use the Kodi Visualisations on the backglass, but I think I should try and find a more similar match between the visualisations available on Plane9 and those within Kodi…. I’m not sure having the two different visualisations is a good thing?

              #40249
              RustyCardores
              Moderator
                @rustycardores
                MemberModerator

                Plane9 is the Terminator 2000 of apps in that it can’t be killed….. taskkill exe, taskkill PIDs and all the /f  & /ts you can throw at it have no effect. I just can’t kill it !

                Strange for a program that if it has focus, it has a known bug that it kills itself with any button press.

                I can’t even script to exploit that bug buy returning focus to it with an ahk mouse click…. it has to be a physical press of the mouse key to return focus. ??

                Why do I do these things to myself. lol :scratch:

                 

                #40251
                randr
                Keymaster
                  @randr
                  ModeratorMember

                  I don’t know why we do what we do but I sounds like your determined and that’s good. If you get it working I will add it to my cab ;) lmao!!!

                  ********************************************************
                  Messing with the VPinball app and push notifications.
                  So if you haven't downloaded app yet what are you waiting for!?
                  for IOS and Android

                  ********************************************************

                  #40265
                  RustyCardores
                  Moderator
                    @rustycardores
                    MemberModerator

                    I don’t know why we do what we do but I sounds like your determined and that’s good. If you get it working I will add it to my cab ;) lmao!!!

                    Kodi is worth the effort.  Many who have used Kodi simply duplicate the screens and that way you get Kodi’s visualisations on both the playfield and backglass.  Naturally I had to be a picky sod and not do it that way.  Duping the screen means that all the menu operations and stuff also appear on both screens (on the playfield sideways) and I don’t like that.

                    So it comes down to what you want to fill the playfield…. visualisations? Slideshow? or the easy out, blank screen… that’s just a checkbox in Kodi menu :)

                    But as I said, it’s worth the effort randr, I have music, videos, online music videos streaming (Hit’s of the 80’s of course), NASA images, CatchupTV, Digital radio etc :)

                    #40284
                    CarnyPriest
                    Participant
                      @carnypriest
                      Member

                      When do have time to play pinball?

                      #40297
                      RustyCardores
                      Moderator
                        @rustycardores
                        MemberModerator

                        When do have time to play pinball?

                        Time is what I have plenty of.  I started building my cab two years ago and haven’t bothered going back to work since.  Now that I think about it, I really should do something about that. lol

                        #40383
                        RustyCardores
                        Moderator
                          @rustycardores
                          MemberModerator

                          I was asked on one of the Facebook vPin pages for some destructions on how to do these playfield visualisations.

                          I don’t have the will to sit down and write a full “step by step” guide at the moment, but I did write a general overview of my process, in the hope that it will keep them on track while figuring out their own install.

                          I’d like to post it here, but I cant attach the text file without getting a “forbidden – potentially dangerarse” warning.  Would that be because of a code sample in the attached txt file?

                          EDIT: Hmm OK, it posted with the attachment.  It must have been this vimeo link https://vimeo.com/190416868 (that I originally tried to “insert”) that was causing the issue?

                           

                          Attachments:
                        Viewing 11 posts - 1 through 11 (of 11 total)

                        Forums are currently locked.

                        ©2024 VPinBall.com

                        Log in with your credentials

                        Forgot your details?