RE: Help to fix script..
RE: Help to fix script..
- Subject: RE: Help to fix script..
- From: "Andrew Lartigue" <email@hidden>
- Date: Fri, 2 Feb 2007 07:57:17 -0500
Yes as application, part of the script runs. I can stop QTB and it will
start back running. But need to start back up AND start broadcasting.
A
-----Original Message-----
From: applescript-users-bounces+lartigue=email@hidden
[mailto:applescript-users-bounces+lartigue=email@hidden] On
Behalf Of Jakob Peterhänsel
Sent: Thursday, February 01, 2007 2:04 PM
To: Applescript-Users List
Subject: Re: Help to fix script..
Hi,
How do you run it? As a AS application?
If so, there is no 'on run' handler, so your script is never executed.
Jakob Peterhänsel
"Be a part of the Love Generation - carry a smile, not a gun."
- JP, May 2006
Email: email@hidden
AIM: Marook
Phone: +45 29687104
On 01/02/2007, at 16.01, Andrew Lartigue wrote:
> Can someone help me fix this script?
>
> ----------------
> property launchfile : ""
> property siteid : ""
>
> tell application "Finder"
> set ffound to exists launchfile
> end tell
> if (not ffound) then
> set launchfile to choose file
> display dialog "What channel number is this?" default answer "0"
> set siteid to text returned of result
> display dialog "Preference set. Please run again."
> else
> set deadtime to 0
> set wasRunning to 0
> repeat
> try
> tell application "QuickTime Broadcaster"
> if (count of documents) is 0 then
> open launchfile
> else
> tell application "System Events"
> set proc to the first
> process whose name is "QuickTime Broadcaster"
> if (count of sheets of first
> window of proc) is not 0 then
> click first button
> of first sheet of first window of proc
> end if
> end tell
> set thestate to ((status of first
> document) as string)
> if (thestate is not "Broadcasting")
> then
> if deadtime is 0 then
> stop first document
> start first document
> if wasRunning is 1
> then
> set
> wasRunning to 0
> tell
> application "System Events"
> do
> shell script "curl 'http://www.uvumobile.com/alert/
> radioalert.aspx?siteid=1'"
> end tell
> end if
> else if deadtime > 15 then
> set deadtime to -1
> end if
> set deadtime to deadtime + 1
> else
> set deadtime to 0
> set wasRunning to 1
> end if
> end if
> end tell
> on error msg
> end try
> delay 1
> end repeat
> end if
> ----------------------
>
> Have created to check the status of Quicktime Broadcaster. If it
> stops
> broadcasting the script is to note, restart, and send email by
> opening set
> web url. But cannot see why it does not work.
>
> Thanks,
>
> Andy
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (applescript-
> email@hidden)
> Help/Unsubscribe/Update your Subscription:
> 40hjemme.dk
> Archives: http://lists.apple.com/mailman//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:
.net
Archives: http://lists.apple.com/mailman//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/mailman//archives/applescript-users
This email sent to email@hidden