Re: Extracting Text from aa Window
Re: Extracting Text from aa Window
- Subject: Re: Extracting Text from aa Window
- From: Matthew Stuckwisch <email@hidden>
- Date: Sun, 31 Mar 2002 20:38:02 -0600
How can I save a text contained in a variable to my disk?
How can I load a textfile from my disk into a variable?
Heh, well, I've forgotten how to do save data, but I remember how to read
it (two ways, actually)
okay, here's a way to save it
on saveFile(fileLocation,fileToSave)
do shell script "echo \"" & (fileToSave as string) & "\" > " &
(fileLocation as string) --*
end saveFile
*this is actually doing the command: echo "filetoSave" > fileLocation
Again, the usual problems with using shell script apply. Spaces in the
file location must be converted to "\ " since a space messes up the
command with being escaped. Also special characters will mess it up, but
now that I think about it, 99% of the time you can get around it by
changing the special characters to wildcards (an asterik, for example, the
file "aguila.txt" could be called with "*guila.txt" so long as the file
"iguila.txt" doesn't exist). I'm a bit lazy to write a script to do these
two said things (sorry :P ), but it should get you started.
Matthew Stuckwisch
[AIM/MSN]{GuifaSwimmer} | [Yahoo!]{SapphireTree} | [ICQ]{137477701}
[IRC]{guifa / G}(esperNET / irc.massinova.com)
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.