Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > Scripting & Automation
  New Posts New Posts RSS Feed - Script files to exit properly
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedScript files to exit properly

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


Joined: December 13 2016
Location: Elgin, IL
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote jonk Quote  Post ReplyReply Direct Link To This Post Topic: Script files to exit properly
    Posted: December 13 2016 at 7:37am
I have a script that I run from the Window task scheduler. It work fine most of the time. I'm sure I'm doing something wrong. I need to insure the script exits Accuterm and terminates properly.

When it fails it leaves the Accuterm 7.1 Application (32 bit) process running in an infinite loop eating up about 10% of the CPU.

I'm not sure if I need to close the session or terminate the session. Any suggestions would be helpful.

Below is the script I'm running.

'AccuTerm/Windows Sample Logon Script
Sub Main()
 Dim s As Session
 Dim Cfg As String
 Dim User As String
 Dim Pswd As String
  
 Cfg = "C:\Users\Administrator\Documents\localhost.atcf"
 User = "IMPORT.CLEAR"
 Pswd = ""
 Set s = Sessions.Add(Cfg,0,1) 'same as File Open
 s.Output Chr$(13) 'send initial CR
 If s.WaitFor(1, 15, "ease :") = 1 Then
  s.Output User & Chr$(13) 'send User-Id
  s.InputMode = 0 'resume normal input processing
  Exit Sub 'terminate login script
 End If
 MsgBox "Logon failure!", 0, "AccuTerm"
End Sub







Back to Top
jonk View Drop Down
Newbie
Newbie


Joined: December 13 2016
Location: Elgin, IL
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote jonk Quote  Post ReplyReply Direct Link To This Post Posted: December 14 2016 at 9:23am
Never mind. I added the Accuterm.AutoClose = 1 and s.AutoClose = 1 to the script and that solved my problem.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.