• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
SV: Startup script not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SV: Startup script not working


  • Subject: SV: Startup script not working
  • From: Gunno Ivansson <email@hidden>
  • Date: Mon, 09 May 2005 09:51:49 +0200

Thanks very much Andrew, now it works

Gunno Ivansson


Den 05-05-09 09.03, skrev "Andrew Oliver" <email@hidden>:

> On 5/8/05 11:34 PM, "Gunno Ivansson" <email@hidden> wrote:
>
>> I am trying to save boottime to a file at start up, but it's not working.
>> Here is my script, it is saved as an application and added to my account's
>> start up items.
>>
>> property gCurrentDate : (current date)
>> property myFilePath : (path to documents folder from user domain as text) &
>> "Flex:BootTime" & ((day of gCurrentDate) as string) & ((month of
>> gCurrentDate) as string)'s text 1 thru 3 & ((year of gCurrentDate) as
>> string) & ".txt"
>>
>>
>> on run
>>   try
>>       alias myFilePath
>>   on error
>>       set myPosixPath to POSIX path of myFilePath
>>       do shell script "/usr/sbin/sysctl kern.boottime > " & myPosixPath
>>   end try
>> end run
>
> IIRC, you can't use a property like this. The property isn't processed at
> runtime, rather at compile time so it'll continually try to write to the
> filename based on when the script was compiled.
>
> In order to be dynamic, using the script execution time you'll need to set
> myFilePath at runtime by including it in your run handler.
>
> Andrew
> :)
>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Startup script not working (From: Andrew Oliver <email@hidden>)

  • Prev by Date: Re: [ann] TextCommands 0.1.0
  • Next by Date: Re: [ann] TextCommands 0.1.0
  • Previous by thread: Re: Startup script not working
  • Next by thread: keyboard mapping
  • Index(es):
    • Date
    • Thread