Jump to content
LaunchBox Community Forums

Recommended Posts

Posted (edited)

thanks joe1  i went with the second as the mouse does need to be clicked.  i got the coordinates but that bit with the mouse doesnt seem to do anything?

any helps is always appreciated!

Edited by d8thstar
Posted
9 hours ago, d8thstar said:

thanks joe1  i went with the second as the mouse does need to be clicked.  i got the coordinates but that bit with the mouse doesnt seem to do anything?

any helps is always appreciated!

Assuming you copied and pasted the script (vs retyping), only changed the necessary items and no errors were given...

  • it may be that the 2 second delay is too short. (i.e. not enough time for the window to fully load)
  • It may be that the coordinates are incorrect.  e.g. the coordinates are in the window vs for the whole monitor.
  • It may be that there's a command line parameter you can add to bypass that window and not have to click it at all.

You can verify the coordinates by checking the box in your Windows' Mouse Properties - Pointer Options, "Show location of mouse pointer when I press the CTRL key". Then change {LButtun} to {Ctrl}.  When you run the script this way, if all goes well, you'll see the "target rings" appear over the "Click to Start" button when you get to that part of the script.

Even if the window doesn't have focus, if it's showing and the mouse clicks in the correct location, it'll click that button.  

Posted

hi joe.

uuhhh, my mouse pointer doesnt move at all.  i start the exe which is on the left hand side of the screen.  the apps start, the mouse pointer stays where it is.

i press CTRL, it shows the circles around the mouse pointer, which hasn't moved.  and yes, i did copy / paste the script :)

if you have any thoughts...  i'll do a google, see if i can figure it out.

as always, thank you!

Posted
13 hours ago, d8thstar said:

if you have any thoughts... 

It sounds like you're compiling your ahk script to an exe file. Which should be fine.  Are you using AHK v1.1?  Or v2.0?  For using scripts with LaunchBox, I suggest V1.1.  (Ignore that it says depreciated.)

 

I don't have any more thoughts on this as in my tests here, it works. But I do have a suggestion for testing and working with scripts:

Download CodeQuickTester, place the file in a location where you won't forget where it is and use it for testing.  If you have AutoHotkey (v1.1) installed on your system (recommended), you can download the CodeQuickTester_v2.8.ahk file.  Otherwise, download CodeQuickTester_v2.8.exe.  Neither will work with AHK v2.0.

Run the app, click Edit and select Script Options.  Click Pick AHK Path and go to and select your Autohotkey.exe file. Close the window.  If you don't have AHK installed, you can point it to your /LaunchBox/ThirdParty/AutoHotkey/AutoHotkey.exe file. Close (red x) that window.

 

In the script body, type in 

DllCall("SetCursorPos", int, 960, int, 540)
Send, {Ctrl}

Then click Run.  This should move the mouse and show the circles.

image.png.dfafca993a457d674dd46fe7ba2a9b2a.png

Once satisfied that it is working, add above those 2 lines your Run....PrismXR.exe and Sleep lines and click Run.  See if the app starts and the mouse moves and shows circles (be sure to wait the full 2 seconds to see the circles).

Continue adding the rest of your script and testing until you satisfied with the results.  Don't forget to eventually change {Ctrl} to {LButton}.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...