Moonlit Posted November 8, 2018 Posted November 8, 2018 Hi All, I have tried and errored a lot by reading both the forums and the help file but one part of my script is refusing to work the way I want... It want to start and stop with F-keys but only the starting part works. So something must be wrong but I can't figure it out. Starting works, exit works but a plain stop just won't. I'm using the function keys: HotKeySet("{F9}", "_start") HotKeySet("^{F9}", "_start") HotKeySet("{F10}", "_stop") HotKeySet("^{F10}", "_stop") HotKeySet("{F11}", "_exit") HotKeySet("^{F11}", "_exit") And added: $run = True while 1 Sleep(500) WEnd Func _stop() $run = False EndFunc So something must be wrong here but I just can't find it... The whole script (with the extensive commands removed) is like this: ; HOTKEYS ---------------------- HotKeySet("{F9}", "_start") HotKeySet("^{F9}", "_start") HotKeySet("{F10}", "_stop") HotKeySet("^{F10}", "_stop") HotKeySet("{F11}", "_exit") HotKeySet("^{F11}", "_exit") ; EINDE HOTKEYS ---------------------- $run = True while 1 Sleep(500) WEnd ; STOP SCRIPT ---------------------- Func _stop() $run = False EndFunc ; START SCRIPT ---------------------- Func _start() $run = True while $run MouseClick("left",3620,1870,2) WEnd EndFunc ; EINDE SCRIPT ---------------------- Func _exit() Exit 1 EndFunc If anyone can point me in the direction of the error I would be very happy or if there is a better way to start/stop please let me know.
Skeletor Posted November 8, 2018 Posted November 8, 2018 That's a funky script you got there... whats it used for? Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI
Skeletor Posted November 8, 2018 Posted November 8, 2018 Made all my programs go crazy... Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI
Skeletor Posted November 8, 2018 Posted November 8, 2018 Here you go: expandcollapse popup; HOTKEYS ---------------------- HotKeySet("{F9}", "_start") HotKeySet("^{F9}", "_start") HotKeySet("{F10}", "_stop") HotKeySet("^{F10}", "_stop") HotKeySet("{F11}", "_exit") HotKeySet("^{F11}", "_exit") ; EINDE HOTKEYS ---------------------- $run = True while 1 Sleep(500) WEnd ; STOP SCRIPT ---------------------- Func _stop() $run = False while $run MouseClick("left",27, 1060,2) WEnd EndFunc ; START SCRIPT ---------------------- Func _start() $run = True while $run MouseClick("left",3620,1870,2) WEnd EndFunc ; EINDE SCRIPT ---------------------- Func _exit() Exit 1 EndFunc Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI
Moonlit Posted November 8, 2018 Author Posted November 8, 2018 Thanks a lot!! I didn't think about using run false to pause the script... It's fixed now, once again thanks for your help
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