• 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: Text file timeout save and close
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text file timeout save and close


  • Subject: Re: Text file timeout save and close
  • From: "Gary (Lists)" <email@hidden>
  • Date: Mon, 06 Aug 2007 14:40:31 -0400

"Ken G. Brown" wrote:

[snip: unrelated to question]

> However, in the case that the user starts to enter some info, then gets
> interrupted and goes away, I would like the file to automatically save and
> close after a specified few minutes with no text entry activity, thereby
> saving the already entered info to that point.
>
> I tried delaying after the open, but that has the side effect of not being
> able to run the script again before it has completed the timeout delay. In the
> case that the timeout save and close has not yet occurred and the user runs
> the same file open script again, I just want the already opened file to pop to
> the front.
>
> So the question is, how can the save and close timeout be implemented?

Ken, you should check out the docs on 'idle' and how to implement an 'on
idle' handler.

As for the logic of implementation, you will likely have the best results
making a related, but separate, stay-open application that
polls/communicates with your script.  (You don't say what kind of script you
have now. That is, is it an applet? A compiled script?  A folder action?
Etc.)

Check the archives for 'on idle', but I've found a couple of references that
may be of use to you.


Some general info about 'on idle'...
<http://lists.apple.com/archives/applescript-users/2002/Jul/msg00197.html>


A more detailed message which shows an idle handler working with another
script handler...
<http://lists.apple.com/archives/applescript-users/2005/Aug/msg00707.html>


And from the ASLG, general section on 'Command Handlers'...
<http://developer.apple.com/documentation/AppleScript/Conceptual/AppleScript
LangGuide/AppleScript.e0.html>


...and specific section on 'on idle'...
<http://developer.apple.com/documentation/AppleScript/Conceptual/AppleScript
LangGuide/AppleScript.e7.html>


--
Gary

 _______________________________________________
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

References: 
 >Text file timeout save and close (From: "Ken G. Brown" <email@hidden>)

  • Prev by Date: Re: Acrobat GUI scripting query...
  • Next by Date: Mark Pinson is out of the office.
  • Previous by thread: Text file timeout save and close
  • Next by thread: Re: Text file timeout save and close
  • Index(es):
    • Date
    • Thread