So, if you don’t count me spending all day researching it, I’m brand new to Applescript. I was hoping that someone here would have some answers to a couple of basic questions.
I’ve seen that you can create pict files from jpg, gif, png files but have no idea where to begin coding that. Could someone point me in the right direction?
How would you read from a txt or xml file?
What I want to do is have a txt file that has something like:
“Desktop:path:to:target:file.jpg”
Then the app could read that path and know where to look for the jpg that needs to turn into a pict
thank’s for any and all help. It’s hugely appreciated
You have a few options with converting image formats, but you will need to decide which program to convert them in, an obvious choice would be Photoshop but understandably not everyone has this.
The next would be image events (free and already on your mac) which is a small inter-faceless app which can be scripted to manipulate images.
and finally i reckon you could go the command line route (Not too sure on this one!) but imagine it can be done.
There probably is other third party image apps which are scriptable as well.
The majority of these will be able to deal with the formats your wanting to convert to and from.
As for reading Text i guess you could use the read or write commands which live in your standard additions dictionary
to access plain text, or say for example your text was in “textedit” then script that app directly.
For the Xml then i’m not sure.
So on this site you should be searching for Photoshop,Image events etc. even the extension jpg,PICT,png.
For the text search for “open for access”,read, write text files, textedit etc.