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

Keep auto-timeout Transmit connections alive Apps
I use a shared host which unfortunately, due to circumstances outside my control, terminates my Transmit FTP/SQL sessions after 15 minutes of idleness. Good for processor cycles, poor for my sanity, especially during intensive coding/research sessions.

After gleaning the internet for a solution and finding none which worked, I decided to whip up my own. Copy and paste the following code into Script Editor, and save it as an application with the 'stay open' option checked:
repeat
    tell application "Transmit"
        tell document 1
            tell current session
                refresh list their stuff files
            end tell
        end tell
    end tell
    delay (60)
end repeat
If anyone wants to follow up this with a touch of AppleScript that cycles through every connection, that would be great. This is my first AppleScript project, so woot for me!
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[11,125 views]  

Keep auto-timeout Transmit connections alive | 10 comments | Create New Account
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: airhead75 on Oct 23, '08 08:14:17AM

Aha, this is why Transmit keeps dropping on me.

I usually just open the files in Bbedit and edit them straight to the server - recently I had noticed it was timing out but could figure out why...my sanity thanks you.



[ Reply to This | # ]
Keep auto-timeout Transmit connections alive
Authored by: rycardo on Oct 23, '08 09:22:55AM

I'm not sure how to do it if you use tabs, but if you use separate windows for each session, you can modify your script to the below, and it should refresh all your sessions.

I abbreviated one of your tell blocks since you only had one command in it.

HTH,

Rycardo

tell application "Transmit"
    repeat
        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
            end tell
        end repeat
    end repeat
    delay 60
end tell


[ Reply to This | # ]
Keep auto-timeout Transmit connections alive
Authored by: Tiny Clanger on Oct 24, '08 08:04:59AM
I think you might have wanted the "delay 60" above the "end repeat" :)

This version seems to work OK with tabs:


tell application "Transmit"
  repeat
    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 repeat
end tell


[ Reply to This | # ]
Keep auto-timeout Transmit connections alive
Authored by: Tiny Clanger on Oct 24, '08 08:07:27AM

...and that commented-out refresh line obviously didn't need to still be there *cough*



[ Reply to This | # ]
Keep auto-timeout Transmit connections alive
Authored by: rycardo on Oct 23, '08 09:27:53AM
I messed up my typing:

The last three lines should be this:

        delay 60
    end repeat
end tell

the delay 60 should be above the end repeat.

[ Reply to This | # ]
Keep auto-timeout Transmit connections alive
Authored by: Peganthyrus on Oct 23, '08 01:03:19PM

Transmit doesn't auto-reconnect when you try to fiddle with the window? Huh. I used to use Cyberduck, and am now shifting over to MacFusion, and they'll both auto-reconnect without hassling me if the connection's gone down when I try to use it.



[ Reply to This | # ]
Keep auto-timeout Transmit connections alive
Authored by: nickfitz on Oct 24, '08 02:43:13PM

I use Transmit, and it automatically reconnects dropped connections whenever I try to interact with the server. There doesn't appear to be anything in the Prefs that I might have changed, so I can only assume that this is its standard behaviour.



[ Reply to This | # ]
Keep auto-timeout Transmit connections alive
Authored by: eighteyes on Oct 23, '08 03:27:49PM

Cool, thanks for the feedback. It makes me sad that my hint only garnishes 2 1/2 stars though. ;( I should point out that I had 'keepalive' in the original title text, so it would pick up for people who are familiar with the FTP command and looking to make the functionality for transmit, which for some reason, unlike almost every FTP program i've ever seen, doesn't have it as an option. However, it's my favorite.



[ Reply to This | # ]
Tmobile G1
Authored by: Fommy on Oct 29, '08 06:28:18AM
For T-Mobile's G1, there will be a bundle of tmobile g1 accessories online to select from; everything from Backup Batteries to Car Accessories, G1 Cases, Chargers, Cables, Headphones, Cradles, Bluetooth Accessories, and more. The list goes on and on, but basically the primary purposes of any g1 accessories are to add functionality, such as where you can use it and what you can use it with, make some features easier to use, and extend the use of the G1 Android phone at Fommy.com.
http://www.fommy.com/t-mobile-g1.htm

[ Reply to This | # ]
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 | # ]