File Types for AppleScript scripts and Automator's workflows

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

File Types for AppleScript scripts and Automator's workflows

Post 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.
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

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

Post 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
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

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

Post by Mag »

Hi Klaus,

interesting, so how can I restrict the Answer File box to display just the AppleScript, Automator and Bash script files?
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

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

Post 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
Kangaroo SW
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 40
Joined: Sat Jan 15, 2011 10:57 am

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

Post 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:
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

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

Post by Mag »

Hi Rolf,

the AppleScript file worked great. For the other types I will follow the "Klaus Way". :D
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

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

Post by Mag »

BTW, is there a way to force the answer file command to show a particular folder path?
Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

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

Post 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]
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

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

Post by Klaus »

Merci beaucoup, Thierry! :D
Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

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

Post by Thierry »

Klaus wrote:Merci beaucoup, Thierry! :D
What?
You didn't know the answer? :)

Regards,

Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

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

Post by Klaus »

Well, I was more referring to your first sentence :D
Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

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

Post by Thierry »

Klaus wrote:Well, I was more referring to your first sentence :D
Yes, I know :)
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

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

Post by Klaus »

I knew you knew :D
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

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

Post 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:
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

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

Post by Klaus »

Last time I saw it, it was in the HELP menu 8)
Post Reply