Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active Session Name 1

Status
Not open for further replies.

SysChaos

Programmer
Jan 31, 2008
9
Hey Everyone, I'm new to the site... wondering if anyone can help me out here. I've looked through the threads, and haven't found any posts that seem to discuss my problem.

I have 3 Attachmate Sessions open. They are named ABC1, ABC2, and ABC3. No matter which session currently has focus on my Desktop, the "ActiveSession" is always the last session I opened. So if I opened ABC3 last, that is returned as the ActiveSession, even if I run my Macro from ABC1.

Does anyone know how I can get the name of the session that currently has focus on my Desktop?

I'd like to get the name, so I can read the proper .edp file to get the CustomTType information from that file.

Any help or ideas would be greatly appreciated.
 
msgbox sys.activesession.name

[small]Sometimes you gotta leave your zone of safety. You have to manufacture Inspirado. You gotta get out of the apartment. You've got to run with the wolves. You've got to dive into the ocean and fight with the sharks. Or just treat yourself to a delicious hot fudge sundae........ with nuts. - Jack Black[/small]
 
Wow. I can't believe that worked. I could have sworn I tried that at least 2 weeks ago, and it would only return the last session I had opened.

It might be because I upgraded within the past week to a new version of Attachmate.

Thanks MrMilson.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top