Re: script in startup folder
Re: script in startup folder
- Subject: Re: script in startup folder
- From: Kai <email@hidden>
- Date: Wed, 16 Jul 2003 04:06:11 +0100
on Tue, 15 Jul 2003 21:27:59 -0400, Gary Lists <email@hidden> wrote:
>
On or about 7/15/03 7:23 PM, Peter Sass wrote:
>
>
> Making the script was easy, I just recorded it, but when I start up, a dialog
>
> window pops up and asks if I want to run the script or not.
>
>
>
> Is there a way to make the script just run, no questions asked?
[snip: advice about checking "Never Show Startup Screen" when saving as
application]
>
Recording in the Finder is good place to begin to reduce your
>
mouseload.
[snip]
Another point to bear in mind about recording is that it's not always
necessary to keep everything recorded.
Peter already appears to have deleted the 'activate' command, which is a
good start. (While normally recorded as a user action, it's not required
here.) And because the file doesn't really need to be selected either, we
can also do away with the 'select' command (which causes the Finder to
activate anyway).
So instead of:
>
> tell application "Finder"
>
> select file "Quickstart" of folder "Controlpanels" of folder,
>
> "Systemfolder" of folder "Teknik" of startup disk
>
> open selection
>
> end tell
...we could just say (all one line):
-------------------------
tell application "Finder" to open file "Quickstart" of folder "Teknik"
of folder "Control Panels" of folder "System Folder" of startup disk
-------------------------
Alternatively, we could specify the file path (modified as necessary to
reflect the name of the hard disk):
-------------------------
tell application "Finder" to open file "Macintosh HD:System
Folder:Control Panels:Teknik:Quickstart"
-------------------------
...or even just:
-------------------------
tell application "Finder" to open file (((path to "ctrl") as string)
& "Teknik:Quickstart")
-------------------------
--
Kai
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.