Hi I’m a newbie and I’m trying to open a file and according to this tutorial site that I’ve been looking at, it says to do it like
tell application “GraphicConverter”
open folder “Hard Disk:Users:Macker:Desktop:Site:Pics”
end tell
Another user did it like this similar to this, but I can’t get it to work. I’ve tried substituting “files” instead of “folder” but the same problem comes up.
the problem is that it’s not even recognizing it. Is there another way to do this?
Well the Site Folder is one that I created myself. See I’m trying to get Graphic Converter to open it and automatically change the images of this file.
That doesn’t seem to work either. This is so weird b/c I’m looking at it and I know it’s supposed to work. I mean how hard is it to open a file in an application. So weird.
To rule out a bad file path, let’s see what happens with this. When the dialog opens, navigate to and select the image file that you want to open in GC.
set file_ to (choose file with prompt "Select the image file to be opened")
tell application "GraphicConverter"
open file_
end tell
If that worked, then I guess the path to the file that you used in your earlier attempts was entered incorrectly in the script. If you run the following line, it will place the correct path of the selected file on your clipboard so that you can paste it into the script and avoid the dialog.
set the clipboard to (choose file with prompt "Select the image file to be opened") as text
I’m still unsure if you are trying to work with one file or several. :?
I finally got GraphicConverter to open the files and the weird thing is that I had to put a “:” at the end of the file path. :? But it works. Now I just have to figure out how to set the pics in the file to gray.