• 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: reconnect fetch using applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reconnect fetch using applescript


  • Subject: Re: reconnect fetch using applescript
  • From: dev_sleidy <email@hidden>
  • Date: Thu, 3 Aug 2006 11:23:49 -0400

Am wondering if I can write an applescript which will check the status of fetch say, every 30 minutes and reconnect it automatically in case of disconnection. Pls help me out with this.


Based on 'Fetch" v. 5.0.2 and 5.0.5, consider the following.

Via the 'Fetch, Preferences' menu item's 'General' tab - see if 'FTP compatibility:'s 'Keep connections alive' check box is check marked.

---

Via 'AppleScript' you can set 'keep connections alive' to 'true' or 'false' (as per the 'Fetch'es dictionary's entry '- keep connections alive boolean -- send the server a command every minute to keep the connection active'), as in ...

tell application "Fetch" to set keep connections alive to true -- Set keep connections to 'true'.

... or ...

tell application "Fetch" to set keep connections alive to false -- Set keep connections to 'false'.

-- Below is an 'AppleScript' example of maintaining a 'Fetch' FTP connection ...

property log_Name : "name"
property tPassword : "password"
property tURL : "FTP_URL"

on run {}
 my handle_Connection() -- Establishes a FTP URL connection.
 my handle_processing() -- Processes desired FTP actions.
end run

on idle {}
 my handle_Connection() -- Establishes / maintains a FTP URL connection.
 return (30 * 60) -- Repeats every (30 * 60) seconds.
end idle

on handle_Connection() -- Establishes a FTP URL connection.
tell application "Fetch" to open url ("ftp://"; & log_Name & ":" & tPassword & "@" & tURL)
end handle_Connection


on handle_processing() -- Processes desired FTP actions.
 tell application "Fetch"

  -- Place your code here --

 end tell
end handle_processing

... Make sure to save the code as an 'Application' [AppleScript applet] (select 'Application' from the 'File Format:' pop up button), and place an check mark in the 'Options:'s 'Stay Open' check box - via 'Script Editor's 'Save' / 'Save As...' dialog box.

-----

Note:
There is a 'Fetch Message Board' at '<http://fetchsoftworks.com/cgi-bin/Ultimate.cgi?action=intro&BypassCookie=true>'.
For searching of 'AppleScript' related posts / replies - click here -> '<'<http://fetchsoftworks.com/cgi-bin/search.cgi?action=intro>'>', enter 'AppleScript' - into the resultant window's 'Search Words:' text edit field, and then click on the 'Perform Search' button.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >reconnect fetch using applescript (From: aarthi krishnaswamy <email@hidden>)

  • Prev by Date: [REQ] Applescript, do shell script e mysql
  • Next by Date: Re: [REQ] Applescript, do shell script e mysql
  • Previous by thread: reconnect fetch using applescript
  • Next by thread: [REQ] Applescript, do shell script e mysql
  • Index(es):
    • Date
    • Thread