AccuTerm by Zumasys Homepage
Forum Home Forum Home > AccuTerm > Scripting & Automation
  New Posts New Posts RSS Feed - Re-run connection script on disconnect?
  FAQ FAQ  Forum Search   Register Register  Login Login

Re-run connection script on disconnect?

 Post Reply Post Reply
Author
Message
iharper View Drop Down
Newbie
Newbie


Joined: October 13 2015
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote iharper Quote  Post ReplyReply Direct Link To This Post Topic: Re-run connection script on disconnect?
    Posted: August 30 2017 at 10:01am
I've written a script in AccuTerm that will connect and login automatically to our D3 server. Part of the script is a loop which will trigger if the initial connection attempt fails (which will happen because the wifi isn't great).

My problem (I think) is that the wifi signal will drop which causes the AccuTerm session to be abandoned. Is there a way to re-run a script when the connection is lost?

Back to Top
iharper View Drop Down
Newbie
Newbie


Joined: October 13 2015
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote iharper Quote  Post ReplyReply Direct Link To This Post Posted: September 05 2017 at 3:32pm
I've poured over the AccuTerm docs and the docs for the SAX Basic scripting used with AccuTerm. As far as I can tell there's no way to trigger a disconnect event. I did find a solution to my problem however.

I've got the session setup to auto-close on disconnect and I've set AccuTerm to auto-exit when the last session is closed. Which will totally shutdown AccuTerm when the session is disconnected. To relaunch I've written a Windows batch script that will launch AccuTerm in a loop:


:launchaccuterm
    tasklist /FI "IMAGENAME eq atwin71.exe" 2>NUL | find /I /N "atwin71.exe" >NUL
    if %errorlevel% == 0 goto endlaunchaccuterm
    start /wait C:\touchscreen\time_clock_login.atsc
:endlaunchaccuterm
timeout 10
goto launchaccuterm


In the event of a disconnect the script will start a countdown and then relaunch AccuTerm after 10 seconds. If desired this CMD window can be closed to prevent the relaunch.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.