RyGoTypE Posted May 9, 2005 Share Posted May 9, 2005 I am having trouble with a part of my script.Here is the section of code:expandcollapse popup$x = 1 While $x=1 ;------------------------------------------------------------- ; Find victim... ;------------------------------------------------------------- $i = 13 Do ; First victim. Send("{TAB 13}") Send("{ENTER}") Sleep(10000) ; Attack first victim. Send("{TAB}") Sleep(250) Send("15") Sleep(250) Send("{ENTER}") Sleep(5000) ; Refresh page. Send("{BROWSER_REFRESH}") Sleep(250) Send("{ENTER}") Sleep(5000) ; Refresh page. Send("{BROWSER_REFRESH}") Sleep(250) Send("{ENTER}") Sleep(5000) ; Go back to the attack page. Send("{BROWSER_BACK 2}") Sleep(500) $a = 0 Do ;------------------------------------------------------------- ; Attack the rest of the page. ;------------------------------------------------------------- ; Next victim. Send("{TAB $i + 2}") Send("{ENTER}") Sleep(10000) ; Attack next victim. Send("{TAB}") Sleep(250) Send("15") Sleep(250) Send("{ENTER}") Sleep(5000) ; Refresh page. Send("{BROWSER_REFRESH}") Sleep(250) Send("{ENTER}") Sleep(5000) ; Refresh page. Send("{BROWSER_REFRESH}") Sleep(250) Send("{ENTER}") Sleep(5000) ; Go back to the attack page. Send("{BROWSER_BACK 2}") Sleep(500) Until $a = 49 ; Go to the next page and attack everyone. Send("{TAB 7}") Sleep(250) Send("{ENTER}") Sleep(10000) $i = $i + 2 Until $i = 63 WEndLine I think is faulty: Send("{TAB $i + 2}") Line I don't think I need: $i = $i + 2 http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
RyGoTypE Posted May 9, 2005 Author Share Posted May 9, 2005 I almost wonder if this will work: Send("{TAB $i = $i + 2}") http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
GaryFrost Posted May 9, 2005 Share Posted May 9, 2005 I almost wonder if this will work: Send("{TAB $i = $i + 2}")<{POST_SNAPBACK}>think its the format the help says to do something likeSend("{TAB " & $i + 2"}") SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
RyGoTypE Posted May 9, 2005 Author Share Posted May 9, 2005 (edited) First of all, that is wrong. Send("{TAB " & $i + 2"}") It would be like this: Send("{TAB & $i + 2}") Second of all, the way I was doing it before and the way you are trying to do it; they are both only tabbing once. Edited May 9, 2005 by RyGoTypE http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
GaryFrost Posted May 9, 2005 Share Posted May 9, 2005 (edited) First of all, that is wrong.Send("{TAB " & $i + 2"}")It would be like this:Send("{TAB & $i + 2}")Second of all, the way I was doing it before and the way you are trying to do it; they are both only tabbing once.<{POST_SNAPBACK}>had a type-o in mine left out the & sign after $i + 2Send("{TAB " & $i + 2 & "}")ignore the + sign it's for navigation to previous controlfrom helpIf you with to use a variable for the count, try $n = 4 Send("+{TAB " & $n & "}") Edited May 9, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
RyGoTypE Posted May 9, 2005 Author Share Posted May 9, 2005 So what do I do with the $i = 13 then? http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
Blue_Drache Posted May 9, 2005 Share Posted May 9, 2005 (edited) So what do I do with the $i = 13 then?<{POST_SNAPBACK}>This is in reference to a screen function I wrote for dealing with an AS400 emulator.The key value to look for here is $tabs. Obviously, if the first line on the screen is what I want, I don't want to tab. If $tabs = 0 Then ControlSend($c, "", "PCSWS:Pres:004000001", "X{numpadenter}") If WaitScreen ($c, "CLINIC", 10) = 1 Then $screen = StringStripWS(ClipGet(), 8) $tmp = StringInStr($screen, "CLINIC:") $ppnclinic = StringRight(StringMid($screen, $tmp, 13), 6) If Not $ppnclinic = $clinic Then MsgBox(0, "PPN/Clinic Mismatch", "Additional research required, PPN clinic does not match GELG clinic") MyExit() EndIf EndIf Else ControlSend($c, "", "PCSWS:Pres:004000001", "{tab " & $tabs & "}X{numpadenter}") If WaitScreen ($c, "CLINIC", 10) = 1 Then $screen = StringStripWS(ClipGet(), 8) $tmp = StringInStr($screen, "CLINIC:") $ppnclinic = StringRight(StringMid($screen, $tmp, 13), 6) If Not $ppnclinic = $clinic Then MsgBox(0, "PPN/Clinic Mismatch", "Additional research required, PPN clinic does not match GELG clinic") EndIf EndIfIf you want to do math in the code like you were specifying earlier, it may help to enclose your equation in parenthesis. Example:Send("{TAB " & ($i + 2) & "}") Edited May 9, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Doug Posted May 9, 2005 Share Posted May 9, 2005 I am having trouble with a part of my script.Here is the section of code:$a = 0Do;-------------------------------------------------------------; Attack the rest of the page.;-------------------------------------------------------------; Next victim. Send("{TAB $i + 2}") Send("{ENTER}") Sleep(10000) ; Attack next victim. Send("{TAB}") Sleep(250) Send("15") Sleep(250) Send("{ENTER}") Sleep(5000); Refresh page. Send("{BROWSER_REFRESH}") Sleep(250) Send("{ENTER}") Sleep(5000) ; Refresh page. Send("{BROWSER_REFRESH}") Sleep(250) Send("{ENTER}") Sleep(5000) ; Go back to the attack page. Send("{BROWSER_BACK 2}") Sleep(500)Until $a = 49Um...I don't see where you increment $a. You'll have an endless loop if you don't increment $a, right? 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