안녕하세요. 김성한입니다.
Transmit는 직관적인 인터페이스에 필요한 기능이 모두 들어있는 멋진 FTP/SFTP 프로그램이라고 생각됩니다. 그런데 keep-alive 기능은 아무리 찾아봐도 보이질 않더군요. 원격으로 접속해서 에디팅 작업을 자주 하는 편인데 매번 접속이 끊어져서 불편합니다. 그래서 applescript로 간단한 Transmit Keep-alive Script를 작성해 보았습니다.
(*
Transmit Kepp-alive Script
by capri91, 2006/06/02
To use script:
Set "RefreshTime" to "the number of seconds to refresh".
Save file as the "application bundle" file format and check the "Stay Open" option.
Add the application to the Dock and launch the application.
If you want to open the application automatically, check the "Open at Login" option.
*)
property RefreshTime : 600
on idle
tell application "System Events"
set isTransmitRunning to (name of processes) contains "Transmit"
end tell
if isTransmitRunning then
my keep_alive()
end if
return RefreshTime
end idle
on keep_alive()
set SessionMsg to ""
tell application "Transmit"
set SuppressAppleScriptAlerts to true
repeat with i from 1 to (count of documents)
tell document i
repeat with j from 1 to (count of sessions)
tell session j
if (is connected) then
refresh list their stuff files
set SessionMsg to SessionMsg & return & "Refresh Session: " & name
end if
end tell
end repeat
end tell
end repeat
end tell
-- my result_msg(SessionMsg)
end keep_alive
on result_msg(SessionMsg)
set TimeMsg to "Refresh Time: " & RefreshTime & " seconds" & return
display alert "Transmit Keep-alive Script" message TimeMsg & SessionMsg giving up after 3
end result_msg
혹시 keep-alive 기능이 Transmit에 포함되어 있는데 제가 못찾은 거라면 알려주시면 감사겠습니다.
|