RE: Help to fix script..Anyone?
RE: Help to fix script..Anyone?
- Subject: RE: Help to fix script..Anyone?
- From: "Stockly, Ed" <email@hidden>
- Date: Mon, 5 Feb 2007 15:30:16 -0800
>>>>It is not sending email nor is it starting the broadcasting. QTB starts, but it does not run.
There are two issues with the script, it's not starting a broadcast and it's not opening the URL to send a message. Got it.
Try this, replace your stop/start commands with this:
tell document 1
stop
start
delay 3
set stateAfterStart to (status as string)
display dialog stateAfterStart giving up after 3 buttons {"Okay"} default button 1
end tell
See what's in the dialog, that may tell you what it's really doing when it should be starting a broadcast.
Also, in your script you may want to initialize the variable wasRunning with a value of 1.
Otherwise, if your script never gets a status of "Broadcasting" it will never try to send you an email.
>>>It is suppose to open a url that will send email when it detects that QTB is not broadcasting. Then it resets and waits for the next time. I can get the email notification to run in teminal, that part is correct. But it does not email in the script.
Ugg, shell scripts called from AppleScript. Yuk. Somewhere in the bowels of Darwin live multiple flavors of shell scripting including versions that have obfuscated names like bin/sh and tsch and bash or gibberish and one of the problems with shell scripting is that the terminal app uses one variant and the do shell script command in AppleScript uses another, so even though it works in terminal, it may not work in AppleScript. I'm sure that's the problem here.
This doc may help. <http://developer.apple.com/technotes/tn2002/tn2065.html>
If that doesn't float your boat, I'd suggest posting to the macScripting digest for help with shell scripting.
ES
_______________________________________________
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