Re: Checking if script is run from login items
Re: Checking if script is run from login items
- Subject: Re: Checking if script is run from login items
- From: Ralph Richardson via AppleScript-Users <email@hidden>
- Date: Fri, 21 Aug 2020 12:04:22 -0700
You could run
set myUptime to do shell script "uptime"
if it's within a minute, figure that as on startup.
Ralph
On Fri, Aug 21, 2020 at 9:39 AM Jenni via AppleScript-Users <
email@hidden> wrote:
>
>
> On Aug 21, 2020, at 9:27 AM, llee040 <email@hidden> wrote:
>
> I would probably save as an app the one I intend to run directly, so that
> it quits after it accomplishes its purpose. If you see the app icon in your
> Dock, you know you launched it. If its action occurs but there’s no Dock
> icon, then it was launched by the login item. If it has to sit and wait for
> awhile before it does something, then you could do the opposite (make an
> app of the login-launched instance).
>
>
> Thanks, Laine, but I really want to know if there’s a flag or something I
> can catch when a script is run as a login item. This would come in handy
> for many things. There must be a way to catch this.
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden