Welcome to MacForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Subroutine actions

 
   Macintosh computer (Home) -> Apple Scripts RSS
Next:  game toplist de omega toplist www toplist shooter..  
Author Message
Jo_y

External


Since: Jun 22, 2008
Posts: 30



(Msg. 1) Posted: Sun Jun 22, 2008 1:10 pm
Post subject: Subroutine actions
Archived from groups: alt>comp>lang>applescript (more info?)

Hi,
i have Big Cats installed.
http://www.ranchero.com/bigcat/
It's a great plugin, but it accepts only sub-routine scripts like
this: (where begins with on.. in the first executable line)

--ToastIt

on main(filelist)
copy "Backup" & space & word 2 of ((current date) as text) & space &
word 3 of ((current date) as text) & space & word 4 of ((current date)
as text) to burn_n
tell application "Finder"
set burn_f to home as alias
set burn_f to (burn_f & "Backup") as text
end tell
tell application "Toast Titanium" --to open burn_f
open alias burn_f
end tell
end main

I would write this script to perform quickly:
1) Rename my standart- Backup folder in the home folder of Finder
(example: to turn folder Backup in Backup 22 6 08)
2) Add the renamed folder to the list of Toast T.

I can't figure out how to adiust my simple script so that permits 2 or
more actions in the same subroutine, else it accepts only one action!
Thanks,
i write from Italy..

 >> Stay informed about: Subroutine actions 
Back to top
Login to vote
Simon Slavin1

External


Since: May 16, 2004
Posts: 375



(Msg. 2) Posted: Tue Jun 24, 2008 10:35 pm
Post subject: Re: Subroutine actions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 22/06/2008, Jo_y wrote in message <d4cbe3f4-9033-4b8f-851b-
a09db955459d.DeleteThis@z72g2000hsb.googlegroups.com>:

> i have Big Cats installed.
> http://www.ranchero.com/bigcat/
> It's a great plugin, but it accepts only sub-routine scripts like
> this: (where begins with on.. in the first executable line)
>
> --ToastIt
>
> on main(filelist)
> copy "Backup" & space & word 2 of ((current date) as text) & space &
> word 3 of ((current date) as text) & space & word 4 of ((current date)
> as text) to burn_n
> tell application "Finder"
> set burn_f to home as alias
> set burn_f to (burn_f & "Backup") as text
> end tell
> tell application "Toast Titanium" --to open burn_f
> open alias burn_f
> end tell
> end main
>
> I would write this script to perform quickly:
> 1) Rename my standart- Backup folder in the home folder of Finder
> (example: to turn folder Backup in Backup 22 6 08)
> 2) Add the renamed folder to the list of Toast T.
>
> I can't figure out how to adiust my simple script so that permits 2 or
> more actions in the same subroutine, else it accepts only one action!

I included all of your post because I don't understand your problem. It's
possible you're using the word 'actions' in a way I'm not familiar with.
The example script you supply has two actions. You can put any number of
lines you want between the 'on main(filelist)' and the 'end main'. You
can have 3 or more actions between those two lines.

Also, you don't need to be using BigCats. The System includes with the
ability to add a scripts menu to the menubar. You'll be clicking in a
different place but it means you need to perform one less piece of
customisation to your setup. To add a script menu to the menu bar see

/Applications/AppleScript/AppleScript Utility.app

Simon.
--
http://www.hearsay.demon.co.uk

 >> Stay informed about: Subroutine actions 
Back to top
Login to vote
Jo_y

External


Since: Jun 22, 2008
Posts: 30



(Msg. 3) Posted: Wed Jun 25, 2008 5:33 am
Post subject: Re: Subroutine actions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 24 Giu, 23:35, Simon Slavin
wrote:
> On 22/06/2008, Jo_y wrote in message <d4cbe3f4-9033-4b8f-851b-
>
> a09db9554....DeleteThis@z72g2000hsb.googlegroups.com>:
>
>
>
>
>
> > i have Big Cats installed.
> >http://www.ranchero.com/bigcat/
> > It's a great plugin, but it accepts only sub-routine scripts like
> > this: (where begins with on.. in the first executable line)
>
> > --ToastIt
>
> > on main(filelist)
> >    copy "Backup" & space & word 2 of ((current date) as text) & space &
> > word 3 of ((current date) as text) & space & word 4 of ((current date)
> > as text) to burn_n
> >    tell application "Finder"
> >            set burn_f to home as alias
> >            set burn_f to (burn_f & "Backup") as text
> >    end tell
> >    tell application "Toast Titanium" --to open burn_f
> >            open alias burn_f
> >    end tell
> > end main
>
> > I would write this script to perform quickly:
> > 1) Rename my standart- Backup folder in the home folder of Finder
> > (example: to turn folder Backup in Backup 22 6 08)
> > 2) Add the renamed folder to the list of Toast T.
>
> > I can't figure out how to adiust my simple script so that permits 2 or
> > more actions in the same subroutine, else it accepts only one action!
>
> I included all of your post because I don't understand your problem.  It's
> possible you're using the word 'actions' in a way I'm not familiar with.
> The example script you supply has two actions.  You can put any number of
> lines you want between the 'on main(filelist)' and the 'end main'.  You
> can have 3 or more actions between those two lines.
>
> Also, you don't need to be using BigCats.  The System includes with the
> ability to add a scripts menu to the menubar.  You'll be clicking in a
> different place but it means you need to perform one less piece of
> customisation to your setup.  To add a script menu to the menu bar see
>
> /Applications/AppleScript/AppleScript Utility.app
>
> Simon.
> --http://www.hearsay.demon.co.uk

Thanks for your answer,

it is not the first time that a subroutine- script makes my trouble,
thanks nevertheless.
The concept its to use the right-mouse click:
Get BigCats scripts, it acts like a customizable-plugin -folder in
which you can put max 60 scripts (plugins) instead to move everytime
over the screen to open the scriptmenu-menulet.
The problem is solved, now goes:

--ToastIt

on main(filelist)
copy "Backup" & space & word 2 of ((current date) as text) & space &
word 3 of ((current date) as text) & space & word 4 of ((current date)
as text) to burn_d

tell application "Finder"
set burn_it to folder "B" of home as alias
set name of folder burn_it to burn_d
set backup to folder burn_d of home as alias
end tell

tell application "Toast Titanium" to open backup

end main
 >> Stay informed about: Subroutine actions 
Back to top
Login to vote
Display posts from previous:   
   Macintosh computer (Home) -> Apple Scripts All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]