The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
Global Defaults |
Post Reply |
Author | |
TonyG
Beta Tester Joined: February 04 2004 Location: United States Status: Offline Points: 127 |
Post Options
Thanks(0)
Posted: July 29 2019 at 11:28am |
Thanks for all of the info Pete. I found the registry key:
HKEY_CURRENT_USER\Software\Asent\Atwin70\Settings It's been a long time and I actually forgot all about that area. (Uh oh ... age .... ) I'm looking forward to AT8 for all of the reasons you stated. Best as always, T |
|
Tony Gravagno Nebula Research & Development
TG@ Nebula-RnD . com http://Nebula-RnD.com/blog http://Twitter.com/TonyGravagno http://groups.google.com/group/mvdbms https://www.linkedin.com/groups/64935 |
|
PSchellenbach
Admin Group Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
|
Hi Tony - Thanks for the detailed post. First, the order of parameter overrides is close, but not exactly correct. The settings in ATWIN71.INI are initial defaults. When a user first runs AccuTerm 7.1, these settings are used to initialize the user's preferences in the registry. The registry preferences are updated as the user runs AccuTerm, saving things like whether to show the status bar and toolbar. Also the initial program startup location and size is stored in the user's preferences in the registry. The startup location is overridden by the settings saved in a layout file. AccuTerm 8 abandons the MDI interface, in favor of a more traditional tabbed interface. There are two big differences here. First, you can open multiple main windows, each with its own set of tabs. This is quite flexible, you can rearrange tabs in any main window, drag a tab to the desktop screen to open it in its own window, move tabs between windows, etc. This required some refactoring of the layout file structure (actually layout and session config files are now JSON files in AT8). The layout can now open multiple main windows, each with multiple session tabs. The other big difference from the old MDI interface is there is no longer the concept of a "workspace", and sessions are not simply child windows of the workspace. Sessions are always connected to tabs, and either occupy the entire space of the main window, or can be tiled. The size of the tiled windows is not adjustable. If you have 4 sessions, each is given 1/4 of the space of the main window. If there are 3 sessions, the main window is divided into fourths, and the last "fourth" is just empty space. Regarding the VBA engine, WinWrap was the original name for Sax Basic, and both were created by the same author, Polar Engineering. I did look into updating Sax to WinWrap, but from what I remember, the licensing for WinWrap made this difficult. Events were never implemented in the VBA interface (this is a design issue in AccuTerm, not Sax). Thanks, Pete |
|
TonyG
Beta Tester Joined: February 04 2004 Location: United States Status: Offline Points: 127 |
Post Options
Thanks(0)
|
BTW, on WinWrap, I see someone already took a stab at the Sax update for AccuTerm:
https://www.scribd.com/document/94815846/Win-Wrap I'm really curious about what happened with that. |
|
Tony Gravagno Nebula Research & Development
TG@ Nebula-RnD . com http://Nebula-RnD.com/blog http://Twitter.com/TonyGravagno http://groups.google.com/group/mvdbms https://www.linkedin.com/groups/64935 |
|
TonyG
Beta Tester Joined: February 04 2004 Location: United States Status: Offline Points: 127 |
Post Options
Thanks(1)
|
In addition to opening .ATLY files which define a preferred layout for one or more ATCF files, I often just open AccuTerm and select a single ATCF. When doing this, I'd like to be able to set the default screen size of the application and of any sessions that open within the MDI area.
So I've been looking for a default ATCF or ATLY somewhere, that has all of the default settings which individual config files override. This post is as much a question for Pete as it is a mini blog about what I know about this area. I'm thinking there is a hierarchy of parameter overrides, like: 1) Open default config file to get settings: atwin71.ini. 2) For each config property that is not already set, use a hardcoded default. 3) On opening of an ATLY, use those overrides. 4) On opening of an ATCF, use those overrides. I'm sure 1-3 are correct. I'm missing #4. One approach to this, for the AccuTerm application/container itself, is to set values in atwin71.ini. In the AT7 Reference, under "Customizing the Installation Process" there is a section "Installing a pre-configured version of AccuTerm". That documents a few of the [Sections] of the INI. The [Options] section defines defaults using property names of the AccuTerm object used for scripting. So where the INI says "FuncBar=False" we know we can use "obj.FuncBar=False" in VBA scripts. The properties are well documented. So to get some basic defaults I added this to my INI, none of which was already there: [Options] ToolBar=True StatusLine=True SessionBar=True SingleInstance=True AutoClose=False NoCloseWarning=False NoConnectWizard=True NoWelcomePage=True LargeIcons=False TrackKeyboardState=False FuncBar=False FuncBarStyle=0 FuncBarPos=0 TitleFormat=4 RecentListSize=20 WindowState=0 Top=195 Left=2925 Height=15255 Width=24375 ChildState=0 Well, I verified that the settings are in there correctly but on opening AccuTerm none of those values are used. I then created a layout with a desired size, and added a "stub" session that doesn't connect to anything. This ATCF also opens at the desired size after saving the ATLY. But that leaves an undesired session in the window. I added a script that simply executes Sessions(0).Close. This results in an empty layout but with some defaults set. Here is the .ATLY for that: [AccuTerm Main] WindowState=0 Top=195 Left=2925 Height=15255 Width=24375 ChildState=0 Files=1 Script=C:\Users\tony\Documents\Accuterm\TG_default.atsc [File1] FileName=TG_default.atcf WindowState=0 Top=75 Left=135 Height=12735 Width=23895 Active=True The problem there is that a new session doesn't open with the same config values as the original stub. I'm wondering if there is a section like [File0] that defines defaults for all properties that aren't set by ATCF files that are opened by this profile. What seems to be needed is an event on the AccuTerm object, like ApplicationOpening or SessionOpened, or a similar event on Session Objects. With that I could capture the event and set the desired values. An event? It occurred to me that events aren't a big part of the AccuTerm scripting model. We can forward UI events to scripts, but I don't know if or how we can programmatically attach a script to an event (outside of writing into menu.ini or something). On the Object Reference page there is a note about Events and how to get information from ATWIN71.TLB, the type library. I tried to access that (Opened VBA editor in MS Word) but it doesn't look like that library exposes any events. While I was looking at this I had to wonder if Sax Basic even supports event handling. The docs for Sax are from 2001 and don't include information on this topic. Sax has been rebranded as WinWrap. An Example for WinWrap shows how events are processed. I still don't know if we can handle events with the existing Sax version but ... Hey Pete, what do you think about replacing Sax with WinWrap? It's a LOT better. I think trying to handle the opening of the application is a dead end. My next thought is to start a loop from the script Main function, which waits for some fraction of a second and then does a DoEvents. It will check open sessions to see if there is a new one based on the title. If so it will reset the screen layout for that session and add the name into a table. So this only happens once per session and it should be as transparent as it is when we open a layout. That code is a little rigorous, and I don't like the idea of perpetual looping in a macro. I'm sure there will be some stuttering in other events. That's my thinking so far. It will be fun and embarrassing if there is some built-in functionality for this, but again, the point of this was to provide some info about how some of this works in case it's of interest to others. Thanks for your time. |
|
Tony Gravagno Nebula Research & Development
TG@ Nebula-RnD . com http://Nebula-RnD.com/blog http://Twitter.com/TonyGravagno http://groups.google.com/group/mvdbms https://www.linkedin.com/groups/64935 |
|
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 |