Guest Olli Posted April 1, 2004 Share Posted April 1, 2004 Hi Guys, i started some work with AutoIt and so far it works good for me. But now i have a liitle question. I'd like to take a text file, go to a desired postion, enter some text and save the new file under a new name. So how can i do this with AutoIOv3?? Maybe there exists a quite simple way, but i'm a newbie and don't know how, so please help me. ;-) Best regards, Olli Link to comment Share on other sites More sharing options...
trids Posted April 1, 2004 Share Posted April 1, 2004 (edited) Or do you have the freedom to indicate the desired position via a token of some sort? Eg ..The quick brown fox jumps @target the lazy dog.. and then you can replace "@target" with "Rover," ... ?EDIT: oops, sorry Larry - I see you got that base covered already Edited April 1, 2004 by trids Link to comment Share on other sites More sharing options...
Guest Olli Posted April 2, 2004 Share Posted April 2, 2004 Hi Guys, thanks for the fast answer. Actually i'm free about how i'll insert my text. One solution would be a a keyword like @target, but it would also be possible to split the hardcoded text in different parts and the variable text would be merge between both parts into a third file, but i think the first way would be the finest. So if you have any ideas or documentation where you could point me, i would be happy. :-)) Best regards, Olli Link to comment Share on other sites More sharing options...
scriptkitty Posted April 2, 2004 Share Posted April 2, 2004 (edited) aye, for this example, we shall split each word up (by space) off he top of my head. $file="text.txt" $text=fileread($file,FileGetSize($file)) $text=Stringreplace($text,@cr," "&@cr); to compensate for lines. $text=Stringreplace($text,@lf,@lf&" "); to compensate for lines. $words=Stringsplit($text," ") for $i=1 to $words[0] tooltip($words[$i],0,0) if $words[$i]<>"" then sleep(500); display each word for half a second. You can do whatever. next Edited April 2, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Guest Olli Posted April 5, 2004 Share Posted April 5, 2004 Hi Scriptkiddy, thanks for the support. I'll take it and do with it 'whatever i want'. 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