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 » Thu Mar 20, 2014 12:17 pm

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: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

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

Post by Klaus » Thu Mar 20, 2014 5:36 pm

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 » Thu Mar 20, 2014 5:48 pm

Hi Klaus,

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

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

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

Post by Klaus » Thu Mar 20, 2014 6:35 pm

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: 33
Joined: Sat Jan 15, 2011 10:57 am

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

Post by Kangaroo SW » Thu Mar 20, 2014 11:35 pm

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 » Fri Mar 21, 2014 10:14 am

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 » Fri Mar 21, 2014 10:37 am

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 » Fri Mar 21, 2014 12:52 pm

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: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

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

Post by Klaus » Fri Mar 21, 2014 1:03 pm

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 » Fri Mar 21, 2014 1:12 pm

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: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

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

Post by Klaus » Fri Mar 21, 2014 1:13 pm

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 » Fri Mar 21, 2014 1:19 pm

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: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

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

Post by Klaus » Fri Mar 21, 2014 2:00 pm

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 » Fri Mar 21, 2014 3:31 pm

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: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

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

Post by Klaus » Fri Mar 21, 2014 3:52 pm

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

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”