Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > Scripting & Automation
  New Posts New Posts RSS Feed - Terminal session variables
  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 LockedTerminal session variables

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


Joined: July 14 2009
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote JTeter Quote  Post ReplyReply Direct Link To This Post Topic: Terminal session variables
    Posted: November 20 2017 at 3:52pm
We have written a quick utility to use in script that captures screen sessions. One of the variables that we are setting is the path to which the output is written. Currently, we are writing as "H:\AccuTerm\Capture\somefile.txt". Since the location for captures, downloads, etc. are set in the session configuration, is that available as a variable that can be referenced in setting this path? For instance, I could put it in my script as "%ATCAPTURE%\somefile.txt"

Thanks, in advance!
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post Posted: November 21 2017 at 9:51am
Hi Jeff -

The default capture directory is available as the DefaultCaptureDir property of the Session object. Try something like:
On Errror Resume Next
Target = InitSession.DefaultCaptureDir
X = 0
X = GetAttr(Target)
If X And 16 = 0 Then
MsgBox "You need to set the default directory"
Else
'OK
End If

The "On Resume" is there so that if GetAttr() fails, the script will continue, and X = 0 will ensure that you are testing a good value. 16 is the bit for Directory in the attribute returned by GetAttr().

Thanks,

Pete


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.