jacobraccuia Posted March 10, 2010 Author Posted March 10, 2010 Check my post above - I have that added, and it still does not work. Also, thanks so much for continuing to help - both of you
kaotkbliss Posted March 10, 2010 Posted March 10, 2010 Check my post above - I have that added, and it still does not work. Also, thanks so much for continuing to help - both of youAhh, I thought you said that you placed it just before the continueloop, which would have placed it in a bad spot.one idea is to do this:$line = FileReadLine("Untitled - Notepad", 1)While $line <> "end"<script>if condition thenstuffcontinueloopendif$line = FileReadLine("Untitled - Notepad", 1)MsgBox(0,"",$line) <-----wendthat will show you the value of $line each loop and maybe see why it won't exit the loop when "end" is reached. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
JohnOne Posted March 10, 2010 Posted March 10, 2010 This works for me $i = 1 $file = @ScriptDir & "\test.txt" While 1 $line = FileReadLine($file,$i) ConsoleWrite($line & @CRLF) If $line == "end" Then MsgBox(0,"Time to exit","Last line read") Exit Else ;code EndIf $i +=1 WEnd as dows this $i = 1 $file = @ScriptDir & "\test.txt" Do $line = FileReadLine($file, $i) ConsoleWrite($line & @CRLF) If 1 = 1 Then $i = $i ;your code in other words Else $i = 1000000;other code EndIf $i += 1 Until $line == "end" AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
bogQ Posted March 10, 2010 Posted March 10, 2010 (edited) $line = FileReadLine("Untitled - Notepad", 1) Parameters filehandle? This is one long topic for the simple thing JohnOne posted before me so now its probably too late (nwm ) ;first save all your data to log.txt and put it in scriptdir (dont forget to save and close that document) #include <file.au3> Global $aRecords _FileReadToArray("log.txt",$aRecords) For $x = 1 to $aRecords[0] Step 3 Msgbox(0,'Record:' & $x, $aRecords[$x]&@CRLF&$aRecords[$x+1]&@CRLF&$aRecords[$x+2]) ;~ mysendcommand() ; replace MsgBox with this command after testing If $aRecords[$x+3] = "End" Then Msgbox(0,"Exiting", "end of file") ExitLoop EndIf Next Func mysendcommand() ;put heare your Send() commands For data that r in $aRecords[$x] $aRecords[$x+1] $aRecords[$x+2] #cs Instead Send try ControlSend ControlClick itl b faster then send("{enter}") Send("{Tab 10}") Send("^v") Send("{Tab 34}") Send("compromised as of ") ControlSend ( "title", "", controlID, "string" [, flag] ) ControlClick ( "title", "", controlID [, button [, clicks [, x [, y ]]]] ) you can use Au3Info.exe to get controlID #ce EndFunc Edited March 10, 2010 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.
enaiman Posted March 11, 2010 Posted March 11, 2010 If you save your boss's email in text-only format, you can use that file with my script to extract all the info you need. I can see that you're willing to go ahead with your old "Notepad" thing - it's your call anyway. Good luck, SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
jacobraccuia Posted March 24, 2010 Author Posted March 24, 2010 Hi, thanks for some more input! I was away on break. As for now, I'm going to keep using notepad because it's very easy to work from [or so I find]. In response to JohnOne, I don't understand what @scriptdir is, per say. What do I need to do to get it to work. [simply coyping what you wrote and putting it into my script was not enough].
kaotkbliss Posted March 24, 2010 Posted March 24, 2010 @scriptdir macro is the path to you au3 file 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
jacobraccuia Posted March 26, 2010 Author Posted March 26, 2010 (edited) Thanks everyone for help. I got it to work with this: $file = FileOpen("test.txt", 0) ; Read in lines of text until the EOF is reached While 1 $line = FileReadLine($file, 1) If $line = "end" Then Exitloop ;code WinActivate("test - Notepad") WinWaitActive("test - Notepad") Send("^s") $file = FileOpen("test.txt", 0) Wend Edited March 26, 2010 by jacobraccuia
JohnOne Posted March 26, 2010 Posted March 26, 2010 Glad you figured it out. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
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