NotHere Posted March 30, 2010 Share Posted March 30, 2010 Hey guys, I am trying to make a script but I have no clue how to do this. I know a lot of you here are very expert on this and I hope someone can help me. I need a script that CLICK a coordinate (X=111 Y=111) then clicks another coord. (X=111 Y=111) then another coord. (X=111 Y=111) then hit ENTER. Then click another coord. (X=111 Y=111) then another (X=111 Y=111) and another (X=111 Y=111) and then hit enter. So I need it to CLICK 3 different coordinates then hit ENTER, then another 3 different coordinates then hit enter. And repeat the process over and over at a speed I can set. Can someone help me? Link to comment Share on other sites More sharing options...
JohnOne Posted March 30, 2010 Share Posted March 30, 2010 Certainly.MouseMove()MouseClick()Send()All these functions come with examples, also in the helpfile. 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...
NotHere Posted March 30, 2010 Author Share Posted March 30, 2010 (edited) Thanks a bunch will try it How do I get it to focus on a widow.exe and start the script, Then loop it as many times as I want? Edited March 30, 2010 by NotHere Link to comment Share on other sites More sharing options...
JohnOne Posted March 30, 2010 Share Posted March 30, 2010 Loop Statements 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...
NotHere Posted March 30, 2010 Author Share Posted March 30, 2010 (edited) see I was there and I didn't understand it.... So far this is what I have WinWait, MineWars, IfWinNotActive, MineWars, , WinActivate, MineWars, WinWaitActive, MineWars, Loop, 500 { MouseClick, left, 343, 321 Sleep, 200 MouseClick, left, 354, 374 Sleep, 200 MouseClick, left, 642, 413 Sleep, 200 MouseClick, left, 378, 397 Sleep, 200 MouseClick, left, 611, 364 Sleep, 200 MouseClick, left, 348, 315 Sleep, 200 MouseClick, left, 336, 282 Sleep, 200 MouseClick, left, 379, 334 Sleep, 200 MouseClick, left, 628, 413 Sleep, 200 } This is using program called AutoHotKey. I cant seem to figure out how to make it for AutoIt . I am not doing so well. Any more help u can do for me? Edited March 30, 2010 by NotHere Link to comment Share on other sites More sharing options...
JohnOne Posted March 30, 2010 Share Posted March 30, 2010 It would be nice if you come up with some actuall Autoit3 code. The functions you want are all very simple, and if you just even glance at the examples given in the help and links I gave you will se that the syntax is not that disimilar to that of AHK. Make a small effort. Come on now, I know you can do it. 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...
NotHere Posted March 30, 2010 Author Share Posted March 30, 2010 (edited) I got this so far WinWaitActive("MapleStory") MouseMove(276, 307, 50) MouseClick("left") MouseMove(379, 373, 50) MouseClick("left") MouseMove(642, 406, 50) MouseClick("left") MouseMove(380, 398, 50) MouseClick("left") MouseMove(615, 363, 50) MouseClick("left") MouseMove(278, 307, 50) MouseClick("left") MouseMove(338, 282, 50) MouseClick("left") MouseMove(367, 332, 50) MouseClick("left") MouseMove(640, 413, 50) MouseClick("left") Cant figure out the LOOP EDIT: I got the loop I think it keeps moving. WinWaitActive("MapleStory") $i = 0 Do MouseMove(276, 307, 50) MouseClick("left") MouseMove(379, 373, 50) MouseClick("left") MouseMove(642, 406, 50) MouseClick("left") MouseMove(380, 398, 50) MouseClick("left") MouseMove(615, 363, 50) MouseClick("left") MouseMove(278, 307, 50) MouseClick("left") MouseMove(338, 282, 50) MouseClick("left") MouseMove(367, 332, 50) MouseClick("left") MouseMove(640, 413, 50) MouseClick("left") Until $i = 500 What I was wondering, instead of making the mouse MOVE, can I use the "MouseClick{"left", y, x}" function to make it just go to the coord. I want instead of showing it move? Also, how can I add a KEY to stop the script? Cuase sometimes I have to shutdown to stop the script cause it dont let me move mouse Thanks. Edited March 30, 2010 by NotHere Link to comment Share on other sites More sharing options...
Sunblood Posted March 30, 2010 Share Posted March 30, 2010 (edited) While 1 MouseClick("left",276, 307, 1, 0) MouseClick("left",379, 373, 1, 0) ....etc Sleep(500) WEnd That will loop infinitely every 500 milliseconds. You can combine MouseClick and MouseMove by putting the coords in MouseClick. MouseClick("button",x,y,clicks,speed) Edited March 30, 2010 by Sunblood Link to comment Share on other sites More sharing options...
NotHere Posted March 30, 2010 Author Share Posted March 30, 2010 Thanks a lot I get it from the example now.. L Is there a KEY I can press to stop it from doing what its doing? Link to comment Share on other sites More sharing options...
Sunblood Posted March 30, 2010 Share Posted March 30, 2010 Thanks a lot I get it from the example now.. L Is there a KEY I can press to stop it from doing what its doing? For that you need to use HotKeySet as such HotKeySet("{HOME}","Stop") Func Stop() Exit EndFunc So every time you press the HOME key it will run the function Stop() and quit running the script. Link to comment Share on other sites More sharing options...
NotHere Posted March 30, 2010 Author Share Posted March 30, 2010 This is what I did and I got an error, what do you think?WinWaitActive("MapleStory") HotKeySet{"{HOME}","Stop"} While 1 MouseClick("left", 276, 307, 1, 1) MouseClick("left", 379, 373, 1, 1) MouseClick("left", 642, 406, 1, 1) MouseClick("left", 380, 398, 1, 1) MouseClick("left", 615, 363, 1, 1) MouseClick("left", 278, 307, 1, 1) MouseClick("left", 338, 282, 1, 1) MouseClick("left", 367, 332, 1, 1) MouseClick("left", 640, 413, 1, 1) Sleep(500) Func Stop() Exit EndFunc WEnd Link to comment Share on other sites More sharing options...
Sunblood Posted March 30, 2010 Share Posted March 30, 2010 For one, put the Func outside your While loop Two, use parentheses () not brackets {} Link to comment Share on other sites More sharing options...
NotHere Posted March 30, 2010 Author Share Posted March 30, 2010 TY so much for everything. I was wondering why this wont work... HotKeySet("{F4}", "ExitProg") ;;Sets F4 as a hotkey to exit the progam HotKeySet("{F5}", "StartProg") ;;Sets F5 as a hotkey to start the program While 1 Sleep(500) ;;;Waits for function call Wend Func StartProg() While 1 MouseClick("left", 276, 307, 1, 1) MouseClick("left", 379, 373, 1, 1) MouseClick("left", 642, 406, 1, 1) MouseClick("left", 380, 398, 1, 1) MouseClick("left", 615, 363, 1, 1) MouseClick("left", 278, 307, 1, 1) MouseClick("left", 338, 282, 1, 1) MouseClick("left", 367, 332, 1, 1) MouseClick("left", 640, 413, 1, 1) Sleep(500) WEnd EndFunc Func ExitProg() Exit 0 ;;;Exits the program EndFunc Link to comment Share on other sites More sharing options...
Sunblood Posted March 30, 2010 Share Posted March 30, 2010 TY so much for everything. I was wondering why this wont work... HotKeySet("{F4}", "ExitProg") ;;Sets F4 as a hotkey to exit the progam HotKeySet("{F5}", "StartProg") ;;Sets F5 as a hotkey to start the program While 1 Sleep(500) ;;;Waits for function call Wend Func StartProg() While 1 MouseClick("left", 276, 307, 1, 1) MouseClick("left", 379, 373, 1, 1) MouseClick("left", 642, 406, 1, 1) MouseClick("left", 380, 398, 1, 1) MouseClick("left", 615, 363, 1, 1) MouseClick("left", 278, 307, 1, 1) MouseClick("left", 338, 282, 1, 1) MouseClick("left", 367, 332, 1, 1) MouseClick("left", 640, 413, 1, 1) Sleep(500) WEnd EndFunc Func ExitProg() Exit 0 ;;;Exits the program EndFunc That script works just fine for me. Link to comment Share on other sites More sharing options...
NotHere Posted March 31, 2010 Author Share Posted March 31, 2010 Thanks for all your help SUN. I am actually getting better at this. 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