Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > Advanced Features
  New Posts New Posts RSS Feed - Toolbar button to open specific session
  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 LockedToolbar button to open specific session

 Post Reply Post Reply
Author
Message
anonymous View Drop Down
Groupie
Groupie


Joined: January 15 2004
Location: United States
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote anonymous Quote  Post ReplyReply Direct Link To This Post Topic: Toolbar button to open specific session
    Posted: February 06 2004 at 3:42am
Is there a way to add an icon on the tool bar that will do a FILE_OPEN and open a specific session?

Basically I want to add session icons on my tool bar so I could open multiple sessions(for various servers) with one click. I currently use the "single instance of Accuterm" if that makes a difference.

I tried my best, but couldn't figure it out.
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: February 06 2004 at 3:44am
You can add a new tool to the toolbar using the menu customization feature (Tools->Customize Menu). In the tool's Action field, you can enter a script, enclosed in square brackets [ ] . The script could open the session files, as in:

     [Sessions.Add "filename.atcf" : Sessions.Add "otherfile.atcf" : Sessions.Add "thirdone.atcf"]

Alternatively, you could write a script using the script editor (Tools->Script) to open the sessions you want, and save the script in the main program folder, then simply chain to your script from the tool:

     [Chain "myscript.atsc"]

This way when you want to modify the list of sessions to open you only need to modify the script file, not the toolbar. You can also pass an argument to the script, so if you have several similar toolbar buttons, you could use a common script for all of them - just pass arguments after the script file name, within the quotes, with blanks separating them. In the script use the Command$() function to read the arguments and the Item() function to extract individual arguments (Item() is similar to Field() in Pick).
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.