Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Keep auto-timeout Transmit connections alive' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Keep auto-timeout Transmit connections alive
Authored by: Typhoon14 on Oct 20, '09 01:08:39PM
One problem I see with this script is that it will never terminate. If running as an application, the only way to quit it is to force-quit. My solution:
tell application "System Events" repeat while exists process "Transmit" tell application "Transmit" set all_docs to count of documents repeat with this_doc from 1 to all_docs tell document this_doc -- tell current session to refresh list their stuff files set all_sessions to count of sessions repeat with this_session from 1 to all_sessions tell session this_session to refresh list their stuff files end repeat end tell end repeat delay 60 end tell end repeat quit application "Transmit KeepAlive" end tell
Replace "Transmit KeepAlive" with whatever you have called your application. This version will quit itself (after 60 seconds) when it detects that Transmit is no longer open.

[ Reply to This | # ]