evilelf Posted November 28, 2006 Share Posted November 28, 2006 hello i am look for a way, When it find this Color it click on it then it would Ctrl c then save in note pad and Ctrl v then go back to what it was doing. All i came up with but its not working. $coord = PixelSearch( 37, 218, 708, 823, 0x77EE77 ) If Not @error Then MouseMove(0, "X and Y are:", $coord[0] & "," & $coord[5]) MouseClick MouseMove( 60,872 [,5] ) MouseClick Send("{CTRL}C") Send("{Ctrl}{TAB}") WinWaitActive("Untitled - Notepad") Send("{CTRL}V") ; Dont think this works. Send("{CTRL}{TAB}") WinWaitActive("MY GAME") EndIf Link to comment Share on other sites More sharing options...
Developers Jos Posted November 28, 2006 Developers Share Posted November 28, 2006 Control+C is "^C" not "{Ctrl}C" SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
mikehunt114 Posted November 28, 2006 Share Posted November 28, 2006 (edited) Let me guess, you're new to the coding thing lol. Your code had a lot of errors/oddities, I think I picked most of them out. For future reference, you should include an error log so we know exactly where your problem is. The easier you make it for us, the more likely it is you will receive help. I also suggest that you read the helpfile thoroughly, it will teach you proper syntax and formation of functions.$coord = PixelSearch( 37, 218, 708, 823, 0x77EE77 ) If Not @error Then MouseMove($coord[0], $coord[1]) ; changed...improper syntax as well as improper subscript MouseClick("left") ; changed...improper syntax MouseMove(60, 872) ; changed...improper syntax MouseClick("left") ; changed...improper syntax Send("^c") ; changed "CTRL" to "^" Send("{ALT}{TAB}") ; I believe you want Alt + Tab WinWaitActive("Untitled - Notepad") Send("^v") ; changed "CTRL" to "^" Send("{ALT}{TAB}"); I believe you want Alt + Tab WinWaitActive("MY GAME") EndIfEdit: You can use the MouseClick function to specify coordinates, you do not need to use MouseMove, then MouseClick. It will work, it's just less tidy. Edited November 28, 2006 by mikehunt114 IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
evilelf Posted November 29, 2006 Author Share Posted November 29, 2006 (edited) Yea after waitting for a time i thought i show what i needed it. All the other stuff i dont need its just the ^C But thanks LOVE U !!! Ok well i did what u said it does the same as mine. just dont " Alt Tab " out. Also how would i get this to Pixel Search about each couple of Secs? Edited November 29, 2006 by evilelf Link to comment Share on other sites More sharing options...
NeoFoX Posted November 29, 2006 Share Posted November 29, 2006 $coord = PixelSearch( 37, 218, 708, 823, 0x77EE77 ) While 1 MouseMove($coord[0], $coord[1]) ; changed...improper syntax as well as improper subscript MouseClick("left") ; changed...improper syntax MouseMove(60, 872) ; changed...improper syntax MouseClick("left") ; changed...improper syntax Send("^c") ; changed "CTRL" to "^" ;Send("{ALT}{TAB}") ; I believe you want Alt + Tab WinActivate("Untitled - Notepad") WinWaitActive("Untitled - Notepad") Send("^v") ; changed "CTRL" to "^" ;Send("{ALT}{TAB}"); I believe you want Alt + Tab WinActivate("MY GAME") WinWaitActive("MY GAME") Sleep(5000);Second to wait before do it all again WEnd Neo [center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center] Link to comment Share on other sites More sharing options...
evilelf Posted November 29, 2006 Author Share Posted November 29, 2006 OMG wow GG ahaha i asked this about 6 months ago well it was a long time ago. THanks man Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 29, 2006 Moderators Share Posted November 29, 2006 $coord = PixelSearch( 37, 218, 708, 823, 0x77EE77 ) While 1 MouseMove($coord[0], $coord[1]) ; changed...improper syntax as well as improper subscript MouseClick("left") ; changed...improper syntax MouseMove(60, 872) ; changed...improper syntax MouseClick("left") ; changed...improper syntax Send("^c") ; changed "CTRL" to "^" ;Send("{ALT}{TAB}") ; I believe you want Alt + Tab WinActivate("Untitled - Notepad") WinWaitActive("Untitled - Notepad") Send("^v") ; changed "CTRL" to "^" ;Send("{ALT}{TAB}"); I believe you want Alt + Tab WinActivate("MY GAME") WinWaitActive("MY GAME") Sleep(5000);Second to wait before do it all again WEndoÝ÷ Ø×¨þ«¨µæ(¹Ê.Öò¥«,Ê«¦,¹^zºè®Ì¨¹Ê.Ø·Ø^iº/yÊy©Ý{%¹×h~Øb"*.ßÚÞiËnjYrºÈ§z-zÂ+a²¶§X¤zØ^méhÁ«¢+Ù]¡¥±Ä(%]¡¥±ÉɽÈí%ݽ¸ÌäíÐ¥¹Ñ¡½±½ÈÑ¡¥ÉÍÐÑ¥µ°À±½½¥¹($$ÀÌØí½½ÉôA¥á±MÉ ÌܰÈÄà°ÜÀà°àḚ̀ÁàÜÝÜܤ($%M±À ÄÀ¤(%]¹(%5½ÕÍ ±¥¬ ÌäíAÉ¥µÉäÌäì°ÀÌØí½½ÉlÁt°ÀÌØí½½ÉlÅt¤íµ½Õ͵½Ù¬µ½Õͱ¥¬¥ÌÉÕ¹¹Ð(%5½ÕÍ ±¥¬ ÌäíAÉ¥µÉäÌäì°ØÀ°àÜȤí͵̽Ù(M¹ ÅÕ½ÐíyÅÕ½Ðì¤(% ½¹Ñɽ±M¹ ÌäíU¹Ñ¥Ñ±´9½ÑÁÌäì°ÌäìÌäì°Ìäí¥ÐÄÌäì°ÌäíyØÌäì¤íM¹Ñ¼Õ¹Ñ¥Ñ±¹½ÑḀ́Х±(M±À ÔÀÀÀ¤íM½¹Ñ¼Ý¥Ð½É¼¥Ð±°¥¸)]¹ 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...
evilelf Posted November 29, 2006 Author Share Posted November 29, 2006 This what i got but i get a error. Also would this Search all the time? for the Color that pops up due to people are slow some times. like me! expandcollapse popupGlobal $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") WinWaitActive("Guild Wars") for $i = 1 to 100; 50 repeats the Number of times.send("{ENTER}"). Change to how many spams. Sleep(60000) send("{ENTER}") sleep(1000) Send(" Hello New Guild Friendly Farming Healper. Whisper For invite. your name will be looked into then sent a invite.") ;Add what u like this to say. First Msg. send("{ENTER}") Sleep(500) While 1 While @error ;If we don't find the color the first time, keep looking $coord = PixelSearch( 37, 218, 708, 823, 0x391F11) Sleep(10) WEnd MouseClick("left", $coord[0], $coord[1]);mouse move + mouse click is redundant MouseClick("left", 73, 868);same as above Send("^c") ControlSend('Untitled - Notepad', '', 'Edit1', '^v');Send to untitled notepads edit field Send("{!}") Sleep(5000);Second to wait before do it all again WEnd Next Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc 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