darkykun Posted August 16, 2007 Share Posted August 16, 2007 hi all im fairly new to autoit and i made my first script which was used to help me press 1 repeatily in world of warcraft whilst minimized: AutoItSetOption ( "SendKeyDelay", 3000 ) ControlSend("World of Warcraft", "", "", "{1 4500000}") I recently tried to add a pause function and have been at it for hours but to no avail if someone can please spare a minute to help me it would be much appreciated: Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") While 1 AutoItSetOption ( "SendKeyDelay", 3000 ) ControlSend("World of Warcraft", "", "", "{1 4500000}") WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Link to comment Share on other sites More sharing options...
poisonkiller Posted August 16, 2007 Share Posted August 16, 2007 AutoItSetOption ("SendKeyDelay", 3000) Global $Paused = 0 HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") While 1 ControlSend("World of Warcraft", "", "", "{1 4500000}") WEnd Func TogglePause() HotKeySet("{PAUSE}", "UntogglePause") $Paused = 1 While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func UntogglePause() HotKeySet("{PAUSE}", "TogglePause") $Paused = 0 EndFunc Func Terminate() Exit 0 EndFunc Link to comment Share on other sites More sharing options...
darkykun Posted August 16, 2007 Author Share Posted August 16, 2007 man thanks for your help im pressing the pause button but it not pausing the script still i still sends '1' Link to comment Share on other sites More sharing options...
Zedna Posted August 16, 2007 Share Posted August 16, 2007 man thanks for your help im pressing the pause button but it not pausing the script still i still sends '1' Maybe: While 1 ControlSend("World of Warcraft", "", "", "1") WEnd Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
darkykun Posted August 16, 2007 Author Share Posted August 16, 2007 (edited) Maybe: While 1 ControlSend("World of Warcraft", "", "", "1") WEnd Wahoo!! thanks guys it all working now handy and dandy This is completely of autoit but il ask since u guys are so helpful i have 2 world of warcraft screen running both with the same name is there a way to change the title name of one screen? or will autoit recognise each screen seperate if i was to run two scripts? Edited August 16, 2007 by darkykun Link to comment Share on other sites More sharing options...
Rick-O-Shea Posted August 17, 2007 Share Posted August 17, 2007 Play around with the Windows Management functions. WinList, WinGetHandle, WinSetTitle and WinFlash should get you going! Grtz, Rick 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