savage29 Posted December 1, 2010 Share Posted December 1, 2010 hi guys, im new to this so i would like some simple starter help. i have read thru the help files already and still i am unsure of what im doing wrong. i am trying to write a script that simply repeats a mouseclick for a few hours once every 5 seconds in the same position on screen. all i have garnered so far from the help files is -> MouseClick ( "right" [ 963, 677 [, 10000 [, 50]]]) and its not working lol. do i need any extra code there? if someone could just write it for me without explaining it, i would appreciate it because then i can work backwards and figure out for myself how to do similar things. thanks Link to comment Share on other sites More sharing options...
kaotkbliss Posted December 1, 2010 Share Posted December 1, 2010 MouseClick ( "right" [ 963, 677 [, 10000 [, 50]]]) should be MouseClick ( "right", 963, 677, 10000, 50) the [] shown in the help file simply indicates the value is optional and isn't required for the command to work 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
JohnOne Posted December 1, 2010 Share Posted December 1, 2010 I was asking questions like this when I found autoit3, I was not scrolling the helpfile down enough to see the examples and the bottom. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
savage29 Posted December 1, 2010 Author Share Posted December 1, 2010 lol ok ill take out the brackets and hope it runs, but question is will that just run indefinetly on a loop or??? Link to comment Share on other sites More sharing options...
Realm Posted December 1, 2010 Share Posted December 1, 2010 Hello savage29, First, I'd like to Welcome you to the AutoIt Forums As for MouseClick() it is a function meant to perform once only. If you want it to loop. look at looping functions like Do...Until, While....Wend. Realm My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. Link to comment Share on other sites More sharing options...
savage29 Posted December 2, 2010 Author Share Posted December 2, 2010 (edited) ok its doing exactly what i wanted it to now i need to search around on how to end the program by moving the mouse manually. can you awesome people point me in the right direction? oh and thankyou kaotk and realm Edited December 2, 2010 by savage29 Link to comment Share on other sites More sharing options...
kaotkbliss Posted December 2, 2010 Share Posted December 2, 2010 you could try something along the lines of: MouseMove(963,677) Do $pos = MouseGetPos() MouseClick ( "right") Until $pos[0]<>963 or $pos[1]<>677 That is just a very basic and is definately not foolproof. The better option would be to set a hotkey (see HotKeySet in the helpfile) to create a hotkey to start and stop the code. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Realm Posted December 2, 2010 Share Posted December 2, 2010 (edited) now i need to search around on how to end the program by moving the mouse manually.I really don't know of a way to end it by moving the mouse manually, However, look at HotKeySet() The example alone is perfect for you needs. You can register HotKeys upon your script startup and it has an example function to exit script when a hotkey(s) is/are pressed. It also has an example pause function which may be more useful to pause script, so u can utilize your keybord and mouse for a moment, then same hotkey(s) will also unpause returning the script to its previous function.RealmEdit: oops had window open to long, and did'nt see kaotbliss already gave you that answer. Edited December 2, 2010 by Realm My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 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