The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
Cloning the active session |
Post Reply |
Author | ||
anonymous
Groupie Joined: January 15 2004 Location: United States Status: Offline Points: 46 |
Post Options
Thanks(0)
Posted: April 05 2006 at 4:42am |
|
Is it possible to create a toolbar button to open a new session with the same settings as the current session?
|
||
PSchellenbach
Admin Group Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
|
|
Hi -
You can create a script to clone the current session, then run that script when a toolbar button is pressed. First create the following script and save it in the ...\Program Files\Atwin folder as "clone-session.atsc":
This script checks if there is a session already open, then retrieves the file name of the active session and uses it as the file name argument of the Add function of the Sessions object. Next, use the menu designer to add a button to the toolbar: Tools->Customize Menu, then choose the menu scope (user or application would seem appropriate), then expand the Toolbar node in the tree, select the Toolbar node, and click the New button and select Normal. In the new button's Action field, enter:
Choose an icon for the new button and click OK to save the customized toolbar. Thanks, Pete |
||
Ima.Geek
Newbie Joined: August 16 2006 Location: United States Status: Offline Points: 5 |
Post Options
Thanks(0)
|
|
This method does indeed clone the ATCF file session, but not the ATSC file session. Is there a way to make a new session based on the current ATSC file?
|
||
Ima.Geek
Newbie Joined: August 16 2006 Location: United States Status: Offline Points: 5 |
Post Options
Thanks(0)
|
|
Phrased another way...
How can one create a new toolbar button that will detect which .ATSC file is currently in use and open a new session using that .ATSC file? |
||
PSchellenbach
Admin Group Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
|
|
Hi ImaGeek -
I presume you are using a script (.atsc) file to open a session and log in automatically? When you start AccuTerm using a script file, the script is loaded into the script editor (Tools->Script) and Sub Main is automatically executed. So, to rerun the script, all you need to do is run Sub Main again. Scripts loaded in the script editor window are "shared scripts" and any public Subs and Functions are available to any other script. So all you need to do to run Sub Main of the script in the script editor is do Call Main(). So your toolbar button needs
Thanks, Pete |
||
Ima.Geek
Newbie Joined: August 16 2006 Location: United States Status: Offline Points: 5 |
Post Options
Thanks(0)
|
|
Too easy.. MUCH APPRECIATED!
Thanks.. :) |
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |