darkykun Posted August 16, 2007 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
poisonkiller Posted August 16, 2007 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
darkykun Posted August 16, 2007 Author 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'
Zedna Posted August 16, 2007 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
darkykun Posted August 16, 2007 Author 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
Rick-O-Shea Posted August 17, 2007 Posted August 17, 2007 Play around with the Windows Management functions. WinList, WinGetHandle, WinSetTitle and WinFlash should get you going! Grtz, Rick
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