Re: Check For Open Application
Re: Check For Open Application
- Subject: Re: Check For Open Application
- From: John Baltutis <email@hidden>
- Date: Sat, 19 Nov 2005 13:19:21 -0800
On 11/19/05, Ted <email@hidden> wrote:
> On Nov 18, 2005, at 12:00 PM, kai wrote:
>
>> tell application "System Events" to tell process "Skype" to if not
>> (exists) then
>> tell application "Skype" to activate
>> repeat until exists
>> delay 1
>> end repeat
>> -- consider another delay here if Skype takes a while to prepare
>> end if
>
> I would have _never_ figured that one out by myself. Thank you! It
> works great by itself, however when I add the following to the end of
> it:
>
> -----------
> set phoneNumber to cell "Phone_Customer_sub" of current record
> tell application "Skype"
> send command "CALL +1" & phoneNumber script name "My Script"
> end tell
> -----------
>
> Skype crashes with the following message:
>
> Skype got an error: Connection is invalid (Error -609)
>
> Both AppleScripts work fine by themselves, but when they're put
> together, Skype quits. Does the order of the AS commands have
> anything to do with it? Here's the full code as I have it in FMPro:
>
> -----------
> tell application "System Events" to tell process "Skype" to if not
> (exists) then
> tell application "Skype" to activate
> repeat until exists
> delay 10
> end repeat
> -- consider another delay here if Skype takes a while to prepare
> end if
> set phoneNumber to cell "Phone_Customer_sub" of current record
> tell application "Skype"
> send command "CALL +1" & phoneNumber script name "My Script"
> end tell
> -----------
I'll let the expert's jump in with the definitive answer (since I don't do
Skype), but to my neophite eyes,
set phoneNumber to cell "Phone_Customer_sub" of current record
doesn't have any application associated with it. Whose current record? If
Skype, then that needs to be internal to the tell block. At least, that's
my cut at it.
_______________________________________________
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