Page 1 of 2

File Types for AppleScript scripts and Automator's workflows

Posted: Thu Mar 20, 2014 12:17 pm
by Mag
I found a very useful and well done web page listing the main File Types you can use in answer file with type command, as you know, the parameter has to have this form: tag|extensions|filetypes

http://revolution.byu.edu/helps/file-creatorcodes.php

Unfortunately I'm searching the file typers for AppleScript's scripts and Automator's workflows, and possibly also for shell scripts files.

Any small or big help will be appreciated.

Re: File Types for AppleScript scripts and Automator's workf

Posted: Thu Mar 20, 2014 5:36 pm
by Klaus
Hi Mag,

stick to file suffixes, since creator codes are slowly ceasing***
and might not be present anymore in future versions of OS X!

*** Since Snow Leopard actually:
http://appleinsider.com/articles/09/09/ ... eator_code


Best

Klaus

Re: File Types for AppleScript scripts and Automator's workf

Posted: Thu Mar 20, 2014 5:48 pm
by Mag
Hi Klaus,

interesting, so how can I restrict the Answer File box to display just the AppleScript, Automator and Bash script files?

Re: File Types for AppleScript scripts and Automator's workf

Posted: Thu Mar 20, 2014 6:35 pm
by Klaus
Hi Mag,

not sure what the exact suffixes are for these files, but it would be something like this:
...
## just leave the last "item" (= creator code) empty
answer file "Blabla:" with type "Yadda|scpt,workflow,sh|"
...
Tested and works!

Best

Klaus

Re: File Types for AppleScript scripts and Automator's workf

Posted: Thu Mar 20, 2014 11:35 pm
by Kangaroo SW
Hello Mag

try:

Code: Select all

on mouseUp
   answer files "Select a file:" with type "AppleScript Scripts|scpt|scpt" \
         or type "Automator Workflows|workflow|workflow" \
         or type "Shell Scripts|command|command" as sheet
end mouseUp
Cheers
Rolf :lol:

Re: File Types for AppleScript scripts and Automator's workf

Posted: Fri Mar 21, 2014 10:14 am
by Mag
Hi Rolf,

the AppleScript file worked great. For the other types I will follow the "Klaus Way". :D

Re: File Types for AppleScript scripts and Automator's workf

Posted: Fri Mar 21, 2014 10:37 am
by Mag
BTW, is there a way to force the answer file command to show a particular folder path?

Re: File Types for AppleScript scripts and Automator's workf

Posted: Fri Mar 21, 2014 12:52 pm
by Thierry
Mag wrote:BTW, is there a way to force the answer file command to show a particular folder path?
Hey, come on!

Dictionary: answer file
answer file[s] prompt [with defaultPath] [titled windowTitle] [as sheet]

Re: File Types for AppleScript scripts and Automator's workf

Posted: Fri Mar 21, 2014 1:03 pm
by Klaus
Merci beaucoup, Thierry! :D

Re: File Types for AppleScript scripts and Automator's workf

Posted: Fri Mar 21, 2014 1:12 pm
by Thierry
Klaus wrote:Merci beaucoup, Thierry! :D
What?
You didn't know the answer? :)

Regards,

Thierry

Re: File Types for AppleScript scripts and Automator's workf

Posted: Fri Mar 21, 2014 1:13 pm
by Klaus
Well, I was more referring to your first sentence :D

Re: File Types for AppleScript scripts and Automator's workf

Posted: Fri Mar 21, 2014 1:19 pm
by Thierry
Klaus wrote:Well, I was more referring to your first sentence :D
Yes, I know :)

Re: File Types for AppleScript scripts and Automator's workf

Posted: Fri Mar 21, 2014 2:00 pm
by Klaus
I knew you knew :D

Re: File Types for AppleScript scripts and Automator's workf

Posted: Fri Mar 21, 2014 3:31 pm
by Mag
Thierry wrote:
Mag wrote:BTW, is there a way to force the answer file command to show a particular folder path?
Hey, come on!

Dictionary: answer file
answer file[s] prompt [with defaultPath] [titled windowTitle] [as sheet]

The Dictionary? Where can I find it? :shock:

Re: File Types for AppleScript scripts and Automator's workf

Posted: Fri Mar 21, 2014 3:52 pm
by Klaus
Last time I saw it, it was in the HELP menu 8)