Can't Quit My Script ?
Can't Quit My Script ?
- Subject: Can't Quit My Script ?
- From: Christopher Aloi <email@hidden>
- Date: Sat, 27 Mar 2004 00:42:23 -0500
Hello,
I am new to this list, and also AP script, so thanks to all that help !!
Here is what I am doing:
I often travel with my Powerbook and use it on insecure wireless
networks. I want to be able to check my email securely, without
worrying about anyone grabbing a POP password. I know how to forward
my POP email through a SSH tunnel, therefore encrypting my POP
sessions. My goal is to have a script "Mail" that opens the SSH
tunnel, launches my Mail.app, send and receives, when quit the app I
want the tunnel to close also.
I have the majority of the script is done, the problem is I have to
force-quit the app (script) to close it.
Here is the shell script my applescript is calling :
---
#!/bin/sh
ssh -L 1110:macinstyle.com:110 -l ctaloi -N macinstyle.com
#end
----
This works fine
Next my AP Script:
----
on run
-- open the ssh tunnel
display dialog "Opening SSH Tunnel To Mail Server"
do shell script "/Users/chris/securemail.sh >/dev/null 2>&1 &"
tell application "Mail"
launch
end tell
end run
on idle
-- no need to do anything here, just return some value to keep the app
alive
return 60
end idle
on quit
-- user quit the script, so close all ssh connections
do shell script "killall ssh"
end quit
----
Everything works fine, I just can't quit the app !! When I choose quit,
the tunnel closes ( I can watch using top ), but the app does not.
Anyone have any thoughts ??
Thanks !!
-------------===---------------
Christopher T. Aloi
http://www.macinstyle.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.