Re: AppleScript-Users Digest, Vol 7, Issue 529
Re: AppleScript-Users Digest, Vol 7, Issue 529
- Subject: Re: AppleScript-Users Digest, Vol 7, Issue 529
- From: tom wible <email@hidden>
- Date: Tue, 26 Oct 2010 21:01:19 -0400
i have an app that runs as a FBA, which i can call from the cli to
set a scheduled recording to run longer (<0 means shorter)
to reSchedule(pnum, minsEarly, minsLonger, recurs)
...
tell sched to runLongerBy(minsLonger)
...
to runLongerBy(minsLonger)
if minsLonger * minutes > 3.1 * hours then
write_log(my toString() & " - can't runLongerBy " & minsLonger &
"mins: more than 3 hrs late...")
else if minsLonger ≤ -(my progLen) then
write_log(my toString() & " - can't runLongerBy " & minsLonger &
"mins: more than prgrm len: " & my progLen)
else
tell my stopEvent to delayBy(minsLonger)
end if
end runLongerBy
it works perfectly, for example:
cli> /usr/bin/osascript -e "tell application \"tvpi2crontab\" to
reSchedule(7, 0,-1,\"weekdays\")"
- runLongerBy -1mins
- crontab updated
and trying to end before the program starts results in the expected
error:
cli> /usr/bin/osascript -e "tell application \"tvpi2crontab\" to
reSchedule(7, 0,-111,\"weekdays\")"
- can't runLongerBy -111mins: more than prgrm len: 30
however, when i call it from appscript (minsLonger=-1):
results = tvpi2ct.event('ascrpsbr', \
{'snam':'reSchedule', '----':[schedIndx, minsEarly, minsLonger,
recurs]}).send()
i get this error:
- can't runLongerBy -1mins: more than prgrm len: 30
wtf? _______________________________________________
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