Kira16651 Posted September 16, 2015 Share Posted September 16, 2015 (edited) Hello,I'm trying to have a script run in the background and when I press a hotkey, it should start another script. This works just fine for other programs.Now I tried to make one with some buttons using the Skin UDF (https://www.autoitscript.com/forum/topic/166535-skin-udf/) and whenever I press the hotkey, the window with the buttons is opened and it's like I instantly click the first button. No idea wheather this is because of the Skin UDF or not. I also noticed that the buttons aren't displayed when I press the hotkey.I isolated the relevant code and added it in the example file.The "test.exe" is supposed to run in the background. When you press {INS} on the keyboard the "menu.exe" should open. It opens the script without the buttons displayed and the first button i seen as instantly pressed.When you run the "menu.exe" normally without using the hotkey it works just fine.Any ideas?test.zip Edited September 16, 2015 by Kira16651 cleaned up example project Link to comment Share on other sites More sharing options...
Kira16651 Posted September 17, 2015 Author Share Posted September 17, 2015 (edited) Just found out that if i put the "test.exe" in the same folder as the "menu.exe" it works just fine.HotKeySet("{INS}", "_RunMenu") While True WEnd Func _RunMenu() Local $sMenuPath = @ScriptDir & "\menu.exe" Run($sMenuPath) EndFuncIt doesn't work if i put it in the parent folder however.HotKeySet("{INS}", "_RunMenu") While True WEnd Func _RunMenu() Local $sMenuPath = @ScriptDir & "\menu\menu.exe" Run($sMenuPath) EndFuncSo I still don't know why that happens or how to prevent that. Putting both executables in the same folder is a really bad option for this project that I would like to avoid if at all possible.Oh and I tried using absolute pathing, but that changes nothing. Edited September 17, 2015 by Kira16651 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now