acidfear Posted May 25, 2007 Share Posted May 25, 2007 I'm taking a file, reading it's contents and pulling out the mousemove(x,y). I'm writing this into a file in mouseclick("left",x,y,1,1) format. How can I have it write the quote marks around LEFT when it writes to the file? #include <misc.au3> #include <file.au3> HotKeySet("'","_Start") HotKeySet("/","_End") While 1 Sleep(100) WEnd Func _Start() $count = _FileCountLines("blah.au3") for $x = 0 to $count step 1 $line = FileReadLine("blah.au3",$x) $string = StringLen ( $line ) $left = Stringmid($line,10,1) $left2 = Stringmid($line,11,7) $left3 = Stringmid($line,18,1) If $string = 18 Then Filewriteline("coors.au3","mouseclick" & $left & "left", $left2,$left3) FileWriteLine("coors.au3","Sleep(1500)") EndIf Next msgbox(0,"Done","Done") EndFunc Func _End() Exit EndFunc Link to comment Share on other sites More sharing options...
Proph Posted May 25, 2007 Share Posted May 25, 2007 To write the quotes you need to wrap them each in an apostrophe. Like this: CODE'"LEFT"' Or like this: CODE'"' & "LEFT" & '"' Link to comment Share on other sites More sharing options...
acidfear Posted May 25, 2007 Author Share Posted May 25, 2007 I had tried "'Left'", but it didn't work. I never thought to try it the other way >.<. Thank you ^-^ Link to comment Share on other sites More sharing options...
mrbond007 Posted May 25, 2007 Share Posted May 25, 2007 I haven't tried this but maybe ?? "'Left'" Projects : Space Regain - Memory Fusion - PWGT - Chip-ITGames : BrainPain - BrainPain Director's Cut - ProSpeed Games Pack (New)Vista vs XP : the forbidden fight Link to comment Share on other sites More sharing options...
GEOSoft Posted May 25, 2007 Share Posted May 25, 2007 You will also find that using _FileReadToArray() is much faster than just using FileReadLine(). Put It in a For/Next loop and use an If NOT StringInStr($array[$I], 'Text You want') Then ContinueLoop And if the quotation marks are in the line you're reading then StringMid($line, 10, 8) might work. If that misses the closing quote then make it 10, 9 George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
testingtest Posted May 25, 2007 Share Posted May 25, 2007 iniwrite? 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