haXor4life Posted January 26, 2009 Share Posted January 26, 2009 If there is from 0 to 10 letters to send how can I not to send and move to next part of text between marks? Help please. #include <String.au3> $Text = FileRead("file.txt") $Text = _StringBetween($Text, 1, 1) For $i = 0 To UBound($Text) -1 Send($Text[$i]) Sleep(120000) Next Link to comment Share on other sites More sharing options...
Authenticity Posted January 26, 2009 Share Posted January 26, 2009 (edited) opt('MustDeclareVars', 1) Dim $szTxt, $hFile, $i $hFile = FileOpen(@ScriptDir & '\file.txt', 0) $szTxt = FileRead($hFile) For $i = 0 To StringLen($szTxt)-1 Send(StringMid($szTxt, $i, 1), 1) Sleep(40) Next FileClose($hFile) Exit Edited January 26, 2009 by Authenticity Link to comment Share on other sites More sharing options...
haXor4life Posted January 26, 2009 Author Share Posted January 26, 2009 opt('MustDeclareVars', 1) Dim $szTxt, $hFile, $i $hFile = FileOpen(@ScriptDir & '\file.txt', 0) $szTxt = FileRead($hFile) For $i = 0 To StringLen($szTxt)-1 Send(StringMid($szTxt, $i, 1), 1) Sleep(40) Next FileClose($hFile) ExitSent nothing. Link to comment Share on other sites More sharing options...
haXor4life Posted January 26, 2009 Author Share Posted January 26, 2009 I meantIf there is from 0 to 10 letters to send how can I not to send but move to next part of text between marks?Hope this is the same. Link to comment Share on other sites More sharing options...
Authenticity Posted January 26, 2009 Share Posted January 26, 2009 (edited) Yes quite same but take this for example:For $i = 0 To 40 If $i > 20 And $i < 25 Then ContinueLoop 25 If $i > 30 And $i < 35 Then ContinueLoop 35 ... NextEdit: You need to make sure the wanted window is active, otherwise, the active window receives the output which might do nothing in this case... Use WinActivate, WinWaitActive, etc..Edit2: Forgive my last example, I think I didn't got the correct syntax so use this insteadFor $i = 0 To StringLen($szTxt)-1 If $i > 3 And $i < 5 Then $i = 5 ContinueLoop EndIf ....Next Edited January 26, 2009 by Authenticity 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