stuckors Posted November 1, 2006 Share Posted November 1, 2006 (edited) I have made a script that pulls up a Gui with buttons asking for what spam i want. Problem is, every time I start the script it gives this error:I can't figure out what the problem is and what to doHere is the script:expandcollapse popup#include <GUIConstants.au3> GUICreate("Combos", 200,125) $Renew = GUICtrlCreateButton("Renew", 70, 20, 70,30) $LCtest = GUICtrlCreateButton("LCtest",70,55,70,30,) $Spam = GUICtrlCreateButton("Spam" ,70,90,70,30,) GUISetState(@SW_SHOW) Select Case $msg = $Renew Global $Paused HotKeySet("{Home}","Renew") ;Shift-Alt-d GUISetState(@SW_Hide) ;;;; Body of program would go here ;;;; While 1 Sleep(100) WEnd Func Renew() $Paused = NOT $Paused While $Paused MouseClick ("Left",885, 539) Sleep (500) MouseClick ("Left",485, 223) Sleep (500) MouseClick ("Left",315, 501) Sleep (60000) WEnd EndFunc Case $msg = $LCtest Global $Paused HotKeySet("{Pgdn}","LCtest") ;Shift-Alt-d GUISetState(@SW_Hide) ;;;; Body of program would go here ;;;; While 1 Sleep(100) WEnd Func LCtest() Send ("efr3453f3") EndFunc Case $msg = $Spam Global $Paused HotKeySet("{Home}","Spam") ;Shift-Alt-d GUISetState(@SW_Hide) ;;;; Body of program would go here ;;;; While 1 Sleep(100) WEnd Func Spam() $Paused = NOT $Paused While $Paused Send ("7") MouseClick ("left") WEnd EndFunc EndSelect If $msg = $GUI_EVENT_CLOSE Then ExitLoopThanks Edited November 1, 2006 by stuckors Link to comment Share on other sites More sharing options...
stuckors Posted November 1, 2006 Author Share Posted November 1, 2006 (edited) It was working before I replaced the 6 with a 7. Then that error kept coming up. Edit: I also edited the first part of the script. Before that it worked. Not really sure what i changed Edited November 1, 2006 by stuckors Link to comment Share on other sites More sharing options...
GaryFrost Posted November 1, 2006 Share Posted November 1, 2006 It was working before I replaced the 6 with a 7. Then that error kept coming up.On what planet?How does it get past the 1st while loop?Functions delcared in a select? think notas Larry stated "Where to start" SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
stuckors Posted November 1, 2006 Author Share Posted November 1, 2006 (edited) That was from something I made before it and forgot to remove it. btw i just want to get past that error... Edited November 1, 2006 by stuckors Link to comment Share on other sites More sharing options...
GaryFrost Posted November 1, 2006 Share Posted November 1, 2006 That was from something I made before it and forgot to remove it. btw i just want to get past that error...begin with take the functions out of the select and see what happens. SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
stuckors Posted November 1, 2006 Author Share Posted November 1, 2006 begin with take the functions out of the select and see what happens.How would i set up the hotkeys then? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 1, 2006 Moderators Share Posted November 1, 2006 (edited) How would i set up the hotkeys then?With a shot of rum and a good woman . Your structure is all wrong is what they are trying to tell you. It never worked the way you have before or after you added anything. You can't have a function within a function nor can you have a function within a conditional statement. Edited November 1, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
stuckors Posted November 1, 2006 Author Share Posted November 1, 2006 With a shot of rum and a good woman . Your structure is all wrong is what they are trying to tell you. It never worked the way you have before or after you added anything. You can't have a function within a function nor can you have a function within a conditional statement.I wonder how it worked before then... Link to comment Share on other sites More sharing options...
GaryFrost Posted November 1, 2006 Share Posted November 1, 2006 I wonder how it worked before then... So do we..... SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
stuckors Posted November 1, 2006 Author Share Posted November 1, 2006 Wish i knew what I had before.... Can you explain what that error i have is? And if you got any sugestions on how i could fix this please tell me Link to comment Share on other sites More sharing options...
GaryFrost Posted November 1, 2006 Share Posted November 1, 2006 Wish i knew what I had before....Can you explain what that error i have is? And if you got any sugestions on how i could fix this please tell me We already have. SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 1, 2006 Moderators Share Posted November 1, 2006 So do we..... Makes 1 of us... I'm too tired to wonder how . My guess is everything you added after the Select/EndSelect is what killed it.expandcollapse popupSelect Case $msg = $Renew Global $Paused HotKeySet("{Home}","Renew") ;Shift-Alt-d GUISetState(@SW_Hide) ;;;; Body of program would go here ;;;; While 1; you never exit this loop ever Sleep(100) WEnd Func Renew(); you have an entire function within the "conditional statement" $Paused = NOT $Paused While $Paused MouseClick ("Left",885, 539) Sleep (500) MouseClick ("Left",485, 223) Sleep (500) MouseClick ("Left",315, 501) Sleep (60000) WEnd EndFunc Case $msg = $LCtest Global $Paused HotKeySet("{Pgdn}","LCtest") ;Shift-Alt-d........should probably set this before you get to the conditional statement? GUISetState(@SW_Hide); trying to s............OH FUCK IT, YOU TELL ME WHAT YOU WERE TRYING TO DO WITH THE REST.... ;;;; Body of program would go here ;;;; While 1 Sleep(100) WEnd Func LCtest() Send ("efr3453f3") EndFunc Case $msg = $Spam Global $Paused HotKeySet("{Home}","Spam") ;Shift-Alt-d GUISetState(@SW_Hide) ;;;; Body of program would go here ;;;; While 1 Sleep(100) WEnd Func Spam() $Paused = NOT $Paused While $Paused Send ("7") MouseClick ("left") WEnd EndFunc EndSelect If $msg = $GUI_EVENT_CLOSE Then ExitLoopI got to the 2nd or 3rd thing wrong in your issue, and I just can't see the sense in commenting every line of you code... see my comment, and you comment what you "think" you are doing with each line of code. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
stuckors Posted November 1, 2006 Author Share Posted November 1, 2006 Makes 1 of us... I'm too tired to wonder how . My guess is everything you added after the Select/EndSelect is what killed it.I got to the 2nd or 3rd thing wrong in your issue, and I just can't see the sense in commenting every line of you code... see my comment, and you comment what you "think" you are doing with each line of code.Those comments that were there were copied from the help files cause I'm to lazy to type it all out. Copy and Paste is really easy. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 1, 2006 Moderators Share Posted November 1, 2006 Those comments that were there were copied from the help files cause I'm to lazy to type it all out. Copy and Paste is really easy.Too lazy to copy and paste them "correctly" as well? If you're too lazy to do what you need to do to make your script work and look right syntax right, then don't bother posting until you get "unlazy". You're just a waist of space until then. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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