Jump to content

supag

Active Members
  • Posts

    39
  • Joined

  • Last visited

supag's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Im using ur program but changed the first 3 lines to WinExisits and WinClose and WinWaitClose, because i need it to go by title name not process. hopefully it will work out
  2. gonna try it right now. I'm running the program ao.exe and after 30min sometimes an hour; i never really know; the program has a windows error msg pop up saying click here to debug or whatever and the title of that windows error msg that pops up is "AO.exe". when i actually run ao.exe that programs window title is only "AO" so im able to search for "AO.exe"(which is the windows error window) because the actual program window title is only "AO" does that make any sense to you? its a lil confusing to follow
  3. here is what i have so far, but it ends up lagging out and killing the cpu. also i need it to loop forever If WinExists("AO.exe") Then \\i want it to constantly search for when this program finally pops up WinKill("AO.exe", "") \\then i need it to kill the program wait(10000) Run("C:\Desktop\AO.exe", "") \\then i need it to run the program again. Wait(3000) Send("^s") EndIf basically i have this buggy program that ends up getting an error message so im having autoit close the error message then reload the program. thank you for the help.
  4. I only want line 82 and done to loop, but Winactive checks to make sure the window is up, if not then i want it to start over from the beginning
  5. What will make a case true?
  6. Func _myfunction() Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE") Sleep(5000) WinSetState("Welcome to MSN.com - Microsoft Internet Explorer", "", @SW_MAXIMIZE) Sleep(800) MouseClick("left", 190, 100, 2) Send("http://myspace.com{ENTER}") Sleep(10000) MouseClick("left", 693, 340, 2) Send("password{ENTER}") Sleep(15000) MouseClick("left", 365, 256, 2) Sleep(9000) MouseClick("left", 358, 328) Sleep(800) Send("{DOWN}") Sleep(2000) MouseClick("left", 461, 328) MouseClick("left", 461, 328) Sleep(800) Send("{DOWN}") Sleep(800) MouseClick("left", 356, 363, 2) Sleep(800) MouseMove(340, 120) Sleep(800) Send("{ENTER}") Sleep(2000) MouseClick("left", 450, 363, 2) Sleep(5000) MouseClick("Left", 450, 400) Sleep(1000) Send("^f") Sleep(500) Send("View Profile{ENTER}") Sleep(500) Case $Co_ord1 = PixelSearch(20, 500, 450, 710, 0x335EA8) MouseMove($Co_ord1[0], $Co_ord1[1], 0) MouseClick("Right") Sleep(500) Send("n") Sleep(15000) WinSetState("Myspace.com - Microsoft Internet Explorer", "", @SW_MAXIMIZE) Sleep(800) Case $Co_ord1 = PixelSearch(20, 500, 450, 700, 0x955127) MouseMove($Co_ord1[0], $Co_ord1[1], 0) MouseClick("Left") Sleep(7000) Case $Co_ord1 = PixelSearch(120, 240, 380, 520, 0xE3EBF3) MouseMove($Co_ord1[0], $Co_ord1[1], 0) MouseClick("Left") Sleep(7000) WinClose("Myspace.com - Microsoft Internet Explorer") Sleep(200) EndFunc While 1 Case WinActivate("Myspace.com - Microsoft Internet Explorer", "") If Not WinActive("Myspace.com - Microsoft Internet Explorer") Then Do _myfunction() Case Sleep(800) WinClose("Find") Sleep(800) Send("{PGUP}") Send("{PGUP}") Sleep(200) MouseClick("left", 450, 363, 2) Sleep(5000) MouseClick("Left", 450, 400) Sleep(1000) Send("^f") Sleep(500) Send("View Profile{ENTER}") Sleep(500) Case $Co_ord1 = PixelSearch(20, 500, 450, 710, 0x335EA8) MouseMove($Co_ord1[0], $Co_ord1[1], 0) MouseClick("Right") Sleep(500) Send("n") Sleep(15000) WinSetState("Myspace.com - Microsoft Internet Explorer", "", @SW_MAXIMIZE) Sleep(800) Case $Co_ord1 = PixelSearch(20, 500, 450, 700, 0x955127) MouseMove($Co_ord1[0], $Co_ord1[1], 0) MouseClick("Left") Sleep(7000) Case $Co_ord1 = PixelSearch(120, 240, 380, 520, 0xE3EBF3) MouseMove($Co_ord1[0], $Co_ord1[1], 0) MouseClick("Left") Sleep(7000) WinClose("Myspace.com - Microsoft Internet Explorer") Sleep(200) WEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Like this? i got an error for "Case $Co_ord1 = PixelSearch(20, 500, 450, 710, 0x335EA8) MouseMove($Co_ord1[0], $Co_ord1[1], 0) MouseClick("Right") Sleep(500) Send("n")" how else can i write that?
  7. ohhh, thats what i need to do, i just dont know how. i will give it a shot tho, thanx. gonna try to use "case" and "func _blah". If i did break my script up into that stuff, how would i loop it?
  8. (96,6) : ERROR: syntax error Do _myfunction ~~~^ (152,17) : WARNING: $i: possible used before declaration. $i = $i + ~~~~~~~~~~~~~~~~^ (153,5) : ERROR: missing EndIf. Until ~~~~^ (96,3) : REF: missing EndIf. Do ^ - 2 error(s), 1 warning(s) >Exit code: 0 Time: 44.616
  9. lol oh
  10. If Not WinActive("myspace.com") then _myfunction line 96 i think
  11. Func _myfunction() Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE") Sleep(5000) WinSetState("Welcome to MSN.com - Microsoft Internet Explorer", "", @SW_MAXIMIZE) Sleep(800) MouseClick("left", 190, 100, 2) Send("http://myspace.com{ENTER}") Sleep(10000) MouseClick("left", 693, 340, 2) Send("password{ENTER}") Sleep(15000) MouseClick("left", 365, 256, 2) Sleep(9000) MouseClick("left", 358, 328) Sleep(800) Send("{DOWN}") Sleep(2000) MouseClick("left", 461, 328) MouseClick("left", 461, 328) Sleep(800) Send("{DOWN}") Sleep(800) MouseClick("left", 356, 363, 2) Sleep(800) MouseMove(340, 120) Sleep(800) Send("{ENTER}") Sleep(2000) MouseClick("left", 450, 363, 2) Sleep(5000) MouseClick("Left", 450, 400) Sleep(1000) Send("^f") Sleep(500) Send("View Profile{ENTER}") Sleep(500) $Co_ord1 = PixelSearch(20, 500, 450, 710, 0x335EA8) If Not @error Then MouseMove($Co_ord1[0], $Co_ord1[1], 0) MouseClick("Right") Sleep(500) Send("n") EndIf Sleep(15000) WinSetState("Myspace.com - Microsoft Internet Explorer", "", @SW_MAXIMIZE) Sleep(800) $Co_ord1 = PixelSearch(20, 500, 450, 700, 0x955127) If Not @error Then MouseMove($Co_ord1[0], $Co_ord1[1], 0) MouseClick("Left") EndIf Sleep(7000) $Co_ord1 = PixelSearch(120, 240, 380, 520, 0xE3EBF3) If Not @error Then MouseMove($Co_ord1[0], $Co_ord1[1], 0) MouseClick("Left") EndIf Sleep(7000) WinClose("Myspace.com - Microsoft Internet Explorer") Sleep(200) $i = 0 EndFunc _myfunction() Do WinActivate("Myspace.com - Microsoft Internet Explorer", "") If Not WinActive("Myspace.com - Microsoft Internet Explorer") Then _myfunction Sleep(800) WinClose("Find") Sleep(800) Send("{PGUP}") Send("{PGUP}") Sleep(200) MouseClick("left", 450, 363, 2) Sleep(5000) MouseClick("Left", 450, 400) Sleep(1000) Send("^f") Sleep(500) Send("View Profile{ENTER}") Sleep(500) $Co_ord1 = PixelSearch(20, 500, 450, 710, 0x335EA8) If Not @error Then MouseMove($Co_ord1[0], $Co_ord1[1], 0) MouseClick("Right") Sleep(500) Send("n") EndIf Sleep(15000) WinSetState("Myspace.com - Microsoft Internet Explorer", "", @SW_MAXIMIZE) Sleep(800) $Co_ord1 = PixelSearch(20, 500, 450, 700, 0x955127) If Not @error Then MouseMove($Co_ord1[0], $Co_ord1[1], 0) MouseClick("Left") EndIf Sleep(7000) $Co_ord1 = PixelSearch(120, 240, 380, 520, 0xE3EBF3) If Not @error Then MouseMove($Co_ord1[0], $Co_ord1[1], 0) MouseClick("Left") EndIf Sleep(7000) WinClose("Myspace.com - Microsoft Internet Explorer") Sleep(200) $i = $i + 1 Until $i = 25 WinClose("Myspace.com - Microsoft Internet Explorer") Sleep(1000) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  12. line 86, after the If Not Winactive("myspace.com blah") then and i put before it _myfunction but it gave me a error
  13. func _myfunction() lines 1 though 88 EndFunc i put that where? and then after the Else i just put "_myfunction"?
  14. I know what u mean its almost the same as "if not winactive..." but how do i get it to run from line 1 to line 88 all over again ? i can just copy and paste the code below the "else" it gives me an error "no until statement" how can i make it do lines 1-88 for the else statement?
  15. My coding sinks, is there any way to clean it up?
×
×
  • Create New...