Anferny Posted February 13, 2005 Share Posted February 13, 2005 (edited) I'm new, only thing i could do was make things spam. This is my first attempt at mouseclicking. I can't find help on it so heres what i got: MsgBox, 0, VizSpam v 1.0, Press OK To Start The clicking. WARNING:You have 6 seconds to maximize IE! SplashTextOn, 300, 100, AutoIt SpamBot, VizSpam v 1.0 Loaded! HotKeySet("{PAUSE}", "EndScript") Sleep, 6000 Looping: MouseClick ( "left" [, 845, 400 [, 1 [, 100 ]]] ) MouseClick ( "left" [, 845, 430 [, 1 [, 100 ]]] ) Sleep, 1000 Goto, looping Its supposed to click up and down with a like 1/2 second delay between clicks then sleep for a second. Anyhelp would be AWSOME!! Edited February 13, 2005 by Anferny Link to comment Share on other sites More sharing options...
ZeRo2157 Posted February 13, 2005 Share Posted February 13, 2005 I'm a total newb to AutoIt myself so I cant help you Sorry!But you would'nt believe how LONG I was trying to find a section of code that would allow the user to call a mini subprogram or something with a keystroke (kind of like the inkey$ function in QBasic!). Once I went over your code for your spam bot (wish you luck with that btw) I saw that HotkeySet function you used and immediatley used it in my program to make it pause with a keystroke and it worked!! You just made my day man Link to comment Share on other sites More sharing options...
Insolence Posted February 13, 2005 Share Posted February 13, 2005 (edited) You're using Au3 version 2 syntax.Every function has to have ()'s to enclose its functions, so, using that rule you change the following lines:MsgBox ( 0, VizSpam v 1.0, Press OK To Start The clicking. WARNING:You have 6 seconds to maximize IE! ) SplashTextOn ( 300, 100, AutoIt SpamBot, VizSpam v 1.0 Loaded! ) Sleep ( 6000 ) Sleep ( 1000 )Another rule, ALL text used in functions must be enclosed in quotes:MsgBox ( 0, "VizSpam v 1.0, Press OK To Start The clicking. WARNING:You have 6 seconds to maximize IE!" ) SplashTextOn ( 300, 100, "AutoIt SpamBot", "VizSpam v 1.0 Loaded!")AutoIT help file defines functions a certain way. It encloses optional parameters in brackets:MsgBox ( flag, "title", "text" [, timeout] )Means it NEEDS a flag, title, and text... but does not need a timeout. You'd use it like this:MsgBox ( 48, "OMG I'm a title!", "Testing", 5000 )Also, there is no more GoTo in AutoIT, so you use While 1 to make a permenant loop:While 1 ;Do the code you want here. WEndOREven better, you could wait until the IE window is up before you start your loop, instead of that silly static 6 second delay!WinWaitActive("Window Name"); something like that While 1 ;Do the code you want here. WEndHope that helps.this is the best post, ever. Edited February 13, 2005 by Insolence "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
Anferny Posted February 13, 2005 Author Share Posted February 13, 2005 I just went to v3 and it worked fine, sorry for not saying it before and making u write all that. 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