Lestat.ss Posted June 12, 2006 Share Posted June 12, 2006 Hey all,This is the first time I've taken a crack at this and well I need a lil help. I've got to the point where my macro does what I need it to do and click where I want it to. My only problem is I cant get it to end. I want to be able to press a button and it ends my macro. Can anyone help me out? The button I would prefer to break the loop would be f12 or something. (frist time programming)RegardsLestat Opt("WinWaitDelay",100)Opt("WinTitleMatchMode",4)Opt("WinDetectHiddenText",1)Opt("MouseCoordMode",0)WinWait("SwgClient","")If Not WinActive("SwgClient","") Then WinActivate("SwgClient","")WinWaitActive("SwgClient","")While 1MouseMove(117,261)MouseDown("left")MouseUp("left")MouseDown("left")MouseUp("left")MouseMove(182,249)MouseDown("left")MouseUp("left")MouseDown("left")MouseUp("left")Wend Link to comment Share on other sites More sharing options...
nfwu Posted June 12, 2006 Share Posted June 12, 2006 (edited) Welcome to the forums! Check out HotKeySet and Exit in the help file. It'll be like this: HotKeySet("{F12}", "_end") Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("SwgClient","") If Not WinActive("SwgClient","") Then WinActivate("SwgClient","") WinWaitActive("SwgClient","") While 1 MouseMove(117,261) MouseDown("left") MouseUp("left") MouseDown("left") MouseUp("left") MouseMove(182,249) MouseDown("left") MouseUp("left") MouseDown("left") MouseUp("left") Wend Func _end() Exit EndFunc #) Edited June 12, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
Lestat.ss Posted June 12, 2006 Author Share Posted June 12, 2006 Welcome to the forums! Check out HotKeySet and Exit in the help file. It'll be like this: HotKeySet("{F12}", "_end") Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("SwgClient","") If Not WinActive("SwgClient","") Then WinActivate("SwgClient","") WinWaitActive("SwgClient","") While 1 MouseMove(117,261) MouseDown("left") MouseUp("left") MouseDown("left") MouseUp("left") MouseMove(182,249) MouseDown("left") MouseUp("left") MouseDown("left") MouseUp("left") Wend Func _end() Exit EndFunc Hey, that didnt work. It wouldnt break out of the macro I have to shutdown my computer to turn it off. What I'm thinking is because the hotkey thing isnt in my loop it doesnt get a chance to get to it. What do you think? #) Link to comment Share on other sites More sharing options...
Lestat.ss Posted June 12, 2006 Author Share Posted June 12, 2006 Just wanted to thank you for your help! I read the help file and F12 is reserved by windows and thus my hotkey didnt work. Thanks! Will try it ingame now Link to comment Share on other sites More sharing options...
Lestat.ss Posted June 12, 2006 Author Share Posted June 12, 2006 Well it worked! Thanks so much for your help! Turned out F12 is indeed reserved by windows. I changed it to F11 and it works now! Feels good to have made it without having to resort to someone elses program. Your help is much appreciated! 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