Print Page | Close Window

Re-run connection script on disconnect?

Printed From: AccuTerm by Zumasys
Category: AccuTerm
Forum Name: Scripting & Automation
Forum Description: Customize and control AccuTerm using scripts and automation
URL: http://forum.zumasys.com/forum_posts.asp?TID=2645
Printed Date: December 14 2018 at 11:49pm
Software Version: Web Wiz Forums 11.10 - http://www.webwizforums.com


Topic: Re-run connection script on disconnect?
Posted By: iharper
Subject: Re-run connection script on disconnect?
Date 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?




Replies:
Posted By: iharper
Date 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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 - http://www.webwizforums.com
Copyright ©2001-2017 Web Wiz Ltd. - https://www.webwiz.net