JoeViking245 Posted June 2 Share Posted June 2 11 minutes ago, AceEsCloud said: Run, "C:\Visual Pinball\VPinballX.exe" -minimized -exit -play %1% That's an AHK error message. Quote the %1% Run, "C:\Visual Pinball\VPinballX.exe" -minimized -exit -play "%1%" 1 Quote Link to comment Share on other sites More sharing options...
AceEsCloud Posted June 2 Author Share Posted June 2 I added quotations around the %1%. It launches the tables and roms perfectly. It does not enable the pinscape device. I messed around with this a bit and learned that if I execute the .ahk file it does enable the plunger but if I execute that same .ahk file as a .exe it does not. I was stunned by this because I am essentially doing the same thing in pinball FX3 (converted the .ahk to a .exe) and to my shock pinball FX3 also no longer works. I have changed nothing to my knowledge. I tried rebooting to see if it was a hardware error but it is not. Future pinball still works flawlessly.... So close yet so far. Here is what I scripted for VisualPinball (note I omitted the pinscape disable portion just to make sure that isn't a factor). Wondering if I am back to running as administrator issues... idk I'm going to keep messing around but can't at the moment. Run, "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_enable.bat - Shortcut.lnk" Sleep, 10000 Run, "C:\Visual Pinball\VPinballX.exe" -minimized -exit -play "%1%" Sleep, 10000 While WinExist("ahk_exe VPinballX.exe") sleep 700 ExitApp Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted June 2 Share Posted June 2 Maybe try what Kiinkyfox suggested in leu of the batch file shortcut(s). Note to add at the end ",C:\WINDOWS\system32, hide" to give the working directory and hide the window. Quote Link to comment Share on other sites More sharing options...
AceEsCloud Posted June 2 Author Share Posted June 2 I tried Klinkyfox's suggestion yesterday and I cannot remember the issue I had but I had an issue that I could not solve. I believe the issue I am having is similar to the issue I was having yesterday. I have AutoHotkey V 2.0.13 installed on my system. When I launch a .ahk script it uses the AutoHotkey version I have installed on my system AND WORKS GREAT. Because AutoHotkey V 2.0.13 is installed on my system I am assuming it has more permissions than a portable .exe When I convert VP_Load_Script.ahk to a .exe I compile it using base file "v1.1.36.02" and it creates a .exe that runs this version (which I assume does not have the permissions to run my .bat file as an administrator). To fix this, I attempted to compile this as a "v2.0.13 U64 AutoHotkey.64" which is the version installed in my system. This way when it loads the .exe it uses the version installed on my system. Issue is, I cannot compile this using v2.0.13 though because the Syntax used in AutoHotkey v2 is different from V1 (I think). So now I'm trying to find a way to force my .exe to use my installed version or elevate the permissions of this .exe file somehow. If I can't figure out how to do that I am going to figure out how to rewrite the v1 syntax in v2 form... Quote Link to comment Share on other sites More sharing options...
AceEsCloud Posted June 2 Author Share Posted June 2 Compiling the .ahk to .exe using v1.1.36.02 U64 Unicode 64-bit.bin seemed to do the trick! Adding the pinscape disable to the code and will report the final script! Quote Link to comment Share on other sites More sharing options...
AceEsCloud Posted June 2 Author Share Posted June 2 This was what I converted to .exe using v1.1.36.02. Works great, I'm cleaning everything up a bit but I think my issue is resolved!!!! thanks again! Run *RunAs "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_enable.bat" Sleep, 2000 Run, "C:\Visual Pinball\VPinballX.exe" -minimized -exit -play "%1%" Sleep, 10000 While WinExist("ahk_exe VPinballX.exe") sleep 700 Process, WaitClose, VPinballX.exe Run *RunAs "C:\Users\Arcade\LaunchBox\Tools\Pinscape disabler\Pinscape_disable.bat" Sleep, 2000 ExitApp 1 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted June 2 Share Posted June 2 19 minutes ago, AceEsCloud said: This was what I converted to .exe using v1.1.36.02. Works great, I'm cleaning everything up a bit but I think my issue is resolved!!!! thanks again! Woot! Woot! Glad to hear!! Also, I have never ventured into V2.0+. So you would have been on your own. lol 1 Quote Link to comment Share on other sites More sharing options...
AceEsCloud Posted June 3 Author Share Posted June 3 I learned of one more small issue. When I launch Visual pinball tables through bigbox it launches and closes fine but I have to mouse click on bigbox to regain focus (like bigbox wasn't the selected screen after closing). Is there an easy fix for this? Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted June 3 Share Posted June 3 9 minutes ago, AceEsCloud said: I learned of one more small issue. When I launch Visual pinball tables through bigbox it launches and closes fine but I have to mouse click on bigbox to regain focus (like bigbox wasn't the selected screen after closing). Is there an easy fix for this? Right before ExitApp, add 2 lines WinActivate, ahk_exe LaunchBox.exe WinActivate, ahk_exe BigBox.exe ExitApp If you never use LaunchBox, you can omit the 1st line. But it doesn't hurt anything having them both in. 1 Quote Link to comment Share on other sites More sharing options...
AceEsCloud Posted June 3 Author Share Posted June 3 40 minutes ago, JoeViking245 said: Right before ExitApp, add 2 lines WinActivate, ahk_exe LaunchBox.exe WinActivate, ahk_exe BigBox.exe ExitApp If you never use LaunchBox, you can omit the 1st line. But it doesn't hurt anything having them both in. You are awesome my friend! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.