botanic Posted December 15, 2006 Posted December 15, 2006 i am trying to get this to loop but when it gets to the end the script just stops... every part of it works but that 1... CODEWhile $cardnumber < 3938 WinWaitActive("Microsoft Internet Explorer") sleep(1000) WinActivate("Microsoft Excel - .xls") sleep(300) WinWaitActive("Microsoft Excel - .xls") Sleep(300) send("^f") sleep(300) WinActivate("Find") sleep(300) WinWaitActive("Find") sleep(300) send($cardnumber + 1) sleep(300) send("{enter}") sleep(300) WinClose("Find") sleep(300) WinActivate("Microsoft Excel - .xls") sleep(300) WinWaitActive("Microsoft Excel - .xls") sleep(300) MouseClick( "left", 125, 416) sleep(300) send("^c") sleep(300) WinActivate("Microsoft Internet Explorer") sleep(300) MouseClick( "left", 82, 447) sleep(300) $name = ClipGet() sleep(300) send("^v") sleep(500) send("{enter}") sleep(800) ;wait for page to load do if PixelGetColor( 472, 475) <> 8654089 then sleep(500) EndIf Until PixelGetColor( 472, 475) = 8654089 sleep(300) MouseClickDrag( "left", 809, 498, 755, 497) sleep(300) send("^c") sleep(300) WinActivate("Microsoft Excel - .xls") sleep(300) WinWaitActive("Microsoft Excel - .xls") sleep(300) MouseClick( "left", 307, 417) sleep(300) send("^v") sleep(300) send("^a") sleep(300) send("^f") sleep(300) WinActivate("Find") sleep(300) WinWaitActive("Find") sleep(300) send("thisisthebegining") sleep(300) send("{enter}") sleep(300) WinClose("Find") sleep(300) WinActivate("Microsoft Excel - .xls") sleep(300) WinWaitActive("Microsoft Excel - .xls") sleep(300) send("^s") sleep(300) WEnd
Outshynd Posted December 15, 2006 Posted December 15, 2006 That'll just loop forever, unless you set $cardnumber to a number higher than or equal to 3938. You don't increment $cardnumber or anything.
botanic Posted December 15, 2006 Author Posted December 15, 2006 (edited) i made $cardnumber = 2037 the problem is that it wont loop.... and i need it to... it just stops at the wend does this fix the problem you saw tho? sleep(300) send($cardnumber + 1) sleep(300) Global $cardnumber = $cardnumber + 1 sleep(300) send("{enter}") Edited December 15, 2006 by botanic
The Kandie Man Posted December 15, 2006 Posted December 15, 2006 (edited) I think you want this: expandcollapse popupWhile $cardnumber < 3938 WinWaitActive("Microsoft Internet Explorer") Sleep(1000) WinActivate("Microsoft Excel - .xls") Sleep(300) WinWaitActive("Microsoft Excel - .xls") Sleep(300) Send("^f") Sleep(300) WinActivate("Find") Sleep(300) WinWaitActive("Find") Sleep(300) Send($cardnumber) Sleep(300) Send("{enter}") Sleep(300) WinClose("Find") Sleep(300) WinActivate("Microsoft Excel - .xls") Sleep(300) WinWaitActive("Microsoft Excel - .xls") Sleep(300) MouseClick("left", 125, 416) Sleep(300) Send("^c") Sleep(300) WinActivate("Microsoft Internet Explorer") Sleep(300) MouseClick("left", 82, 447) Sleep(300) $name = ClipGet() Sleep(300) Send("^v") Sleep(500) Send("{enter}") Sleep(800) ;wait for page to load Do If PixelGetColor(472, 475) <> 8654089 Then Sleep(500) EndIf Until PixelGetColor(472, 475) = 8654089 Sleep(300) MouseClickDrag("left", 809, 498, 755, 497) Sleep(300) Send("^c") Sleep(300) WinActivate("Microsoft Excel - .xls") Sleep(300) WinWaitActive("Microsoft Excel - .xls") Sleep(300) MouseClick("left", 307, 417) Sleep(300) Send("^v") Sleep(300) Send("^a") Sleep(300) Send("^f") Sleep(300) WinActivate("Find") Sleep(300) WinWaitActive("Find") Sleep(300) Send("thisisthebegining") Sleep(300) Send("{enter}") Sleep(300) WinClose("Find") Sleep(300) WinActivate("Microsoft Excel - .xls") Sleep(300) WinWaitActive("Microsoft Excel - .xls") Sleep(300) Send("^s") Sleep(300) $cardnumber +=1 WEnd Edited December 15, 2006 by The Kandie Man "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire
botanic Posted December 15, 2006 Author Posted December 15, 2006 humm it still wont loop even once...
Valuater Posted December 15, 2006 Posted December 15, 2006 sure of your color ?? #include <GuiConstants.au3> $win1 = GUICreate("my gui") GUISetBkColor(8654089, $win1) GUISetState() While 1 If GUIGetMsg() = -3 then Exit WEnd 8)
botanic Posted December 15, 2006 Author Posted December 15, 2006 nm i got it the win wasnt becoming active...
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