Re: copy url rom safari to firefox issue
Re: copy url rom safari to firefox issue
- Subject: Re: copy url rom safari to firefox issue
- From: DealTek <email@hidden>
- Date: Mon, 21 Mar 2011 20:24:22 -0700
On Mar 21, 2011, at 4:34 PM, Christopher Stone wrote:
> On Mar 21, 2011, at 10:22, DealTek wrote:
>> BTW: I wanted to make sure that firefox would open (in case it was not) so I added a few lines - Is this the best way to make sure firefox is open?
> ______________________________________________________________________
>
> Hey Dave,
>
> On my system the additional code is unnecessary (see underlined below from the 'open' man page).
Thanks Chris,
For some reason, on my setup if FF is NOT open - it will try to open in safe mode.....
I'll check into the code below..........
>
> NAME
> open -- open files and directories
>
> SYNOPSIS
> open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-b bundle_identifier]
> [-a application] file ... [--args arg1 ...]
>
> DESCRIPTION
> The open command opens a file (or a directory or URL), just as if you had
> double-clicked the file's icon. If no application name is specified, the
> default application as determined via LaunchServices is used to open the
> specified files.
>
> The original code works reliably on my system whether Firefox is currently running or not.
>
> Now then; if you want to know if Firefox is running for other reasons you can do something like:
>
> tell application "Finder"
> if (processes whose name is "Firefox") ≠ {} then
> set firefoxIsRunningFlag to true
> else
> set firefoxIsRunningFlag to false
> end if
> end tell
>
> You can also use System Events:
>
> tell application "System Events"
> if (processes whose name is "Firefox") ≠ {} then
> set firefoxIsRunningFlag to true
> else
> set firefoxIsRunningFlag to false
> end if
> end tell
>
> I usually use the Finder, because if SEV is not running there's a perceptible pause while it starts up.
>
> --
> Best Regards,
> Chris _______________________________________________
> 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
--
Thanks,
Dave - DealTek
email@hidden
[db-11]
_______________________________________________
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