• 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
Re: Help to fix script..
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help to fix script..


  • Subject: Re: Help to fix script..
  • From: Jakob Peterhänsel <email@hidden>
  • Date: Thu, 1 Feb 2007 20:04:19 +0100

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: Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • RE: Help to fix script..
      • From: "Andrew Lartigue" <email@hidden>
References: 
 >Help to fix script.. (From: "Andrew Lartigue" <email@hidden>)

  • Prev by Date: RE: Help to fix script..
  • Next by Date: RE: Help to fix script..
  • Previous by thread: RE: Help to fix script..
  • Next by thread: RE: Help to fix script..
  • Index(es):
    • Date
    • Thread