Guest cyber2025 Posted February 15, 2004 Share Posted February 15, 2004 I am working on a rather simple macro. It was made in v. 2 but I have edited it for v. 3 I fixed most of it but now I am trying to make a loop, the goto feature is removed from v. 2. I will post the script, please tell me how to change it to loop for v. 3 Sleep(2000) MouseClick("left", 0, 500, 2) loop: MouseClick("left", 0, 500, 2) MouseClick("left", 0, 500, 2) MouseClick("left", 0, 500, 2) MouseClick("left", 0, 500, 2) HotKeySet("{ESC}", "Terminate") Func Terminate() MsgBox(4096,"", "The End") Exit EndFunc Goto,loop Thanks, Cyber2025 Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 15, 2004 Administrators Share Posted February 15, 2004 While 1 = 1 ... ... ... ... Wend Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Guest cyber2025 Posted February 15, 2004 Share Posted February 15, 2004 Thanks for the reply, I just want to make sure I have this correct. It seems when I run this I get an error message. Line 10 (file"C:\Documents and Settings\Administrator\Desktop\macro.au3"): Func Terminate() Error: "While" statement has no matching "Wend" statement. ------------------------------------------------------------------------------------------- WinActivate(SwgClient) Sleep(2000) MouseClick("left", 0, 500, 2) While 1 = 1 MouseClick("left", 0, 500, 2) MouseClick("left", 0, 500, 2) MouseClick("left", 0, 500, 2) MouseClick("left", 0, 500, 2) HotKeySet("{ESC}", "Terminate") Func Terminate() MsgBox(4096,"", "The End") Exit EndFunc Wend Thanks, Cyber2025 Link to comment Share on other sites More sharing options...
GrahamS Posted February 15, 2004 Share Posted February 15, 2004 The Wend needs to come before the Func, i.e. WinActivate(SwgClient) Sleep(2000) MouseClick("left", 0, 500, 2) While 1 = 1 MouseClick("left", 0, 500, 2) MouseClick("left", 0, 500, 2) MouseClick("left", 0, 500, 2) MouseClick("left", 0, 500, 2) HotKeySet("{ESC}", "Terminate") WEnd Func Terminate() MsgBox(4096,"", "The End") Exit EndFunc GrahamS Link to comment Share on other sites More sharing options...
Guest cyber2025 Posted February 15, 2004 Share Posted February 15, 2004 thanks! 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