• 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: AppleScript-Users Digest, Vol 7, Issue 529
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Microsoft Entourage 2008 and rich text in notes
  • Next by Date: Move multiple windows from 1 application to different spaces?
  • Previous by thread: Microsoft Entourage 2008 and rich text in notes
  • Next by thread: Move multiple windows from 1 application to different spaces?
  • Index(es):
    • Date
    • Thread