sofakingdom Posted August 27, 2011 Share Posted August 27, 2011 hey guys, just working on a script to try and automate something for me. Global $Paused HotKeySet("{END}", "TogglePause") HotKeySet("{HOME}", "Terminate") While 1 Sleep(100) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) Send("{F1}") sleep(200) Send("{NUMPAD1}") sleep(200) Send("{NUMPAD2}") sleep(200) Send("{NUMPAD3}") sleep(200) Send("{NUMPAD4}") sleep(200) Send("{NUMPAD5}") sleep(100) Send("{F2}") sleep(200) Send("{NUMPAD4}") sleep(200) Send("{NUMPAD5}") WEnd EndFunc Func Terminate() Exit 0 EndFunc That's what I have so far, and I haven't dabbled with autoit for a while, so I don't know what the problem is. It should work with win7 correct? It seems like my script might be working, but only in certain windows, so when I am in the window I want it to run in, it doesn't work. Any suggestions? Is there a possibility it isn't picking up the key press of "end" when I am in certain windows? Link to comment Share on other sites More sharing options...
gononono64 Posted August 27, 2011 Share Posted August 27, 2011 Some programs wont allow you to use automation. These could include certain games, some full screen applications and even some regular application. To check this try using the ContolSend functions to test it. If you get a desired result im wrong, else if it doesnt work then you probably cant use the send functions with that program Link to comment Share on other sites More sharing options...
sofakingdom Posted August 27, 2011 Author Share Posted August 27, 2011 Some programs wont allow you to use automation. These could include certain games, some full screen applications and even some regular application. To check this try using the ContolSend functions to test it. If you get a desired result im wrong, else if it doesnt work then you probably cant use the send functions with that programyeah, i think its the window that doesn't allow it, because even when i hit home button the script doesn't stop. is there any way around this? Link to comment Share on other sites More sharing options...
gononono64 Posted August 28, 2011 Share Posted August 28, 2011 Besides injecting... not that i know of. Link to comment Share on other sites More sharing options...
sofakingdom Posted August 28, 2011 Author Share Posted August 28, 2011 bummer, well thx for help 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