![]() |
| The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
|
Post Reply
|
| Author | |
esawyer
Newbie
Joined: June 05 2017 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Topic: Writetext methodPosted: June 05 2017 at 3:25pm |
|
I am trying to get a program to write text to the currently open Accuterm2k2 session. I am using VS2017, VB.net. I have added the .tlb to my program properties, I am able to access the Session properties. My issue is when I try to run the GetObject. I am getting a "Class not registered" exception. I know I am missing something really simple.
'*** test accuterm code Dim obj As New AccuTermClasses.Session obj = GetObject("atwin32.accuterm") obj.WriteText("10") Thank you in advance for any help. Erick
|
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: June 06 2017 at 7:53am |
|
Hi Erick -
Try something like: Dim appObj as atwin32.AccuTerm Dim sesObj as Session appObj = CreateObject("atwin32.AccuTerm") sesObj = appObj.Sessions.Add("c:\myfiles\mycfg.atcf") I know the CreateObject syntax is wrong for .NET, but you should be able to google the correct syntax. This if you want your .NET app to create a new instance of AccuTerm. Use GetObject() if you want to get a reference to an existing instance of AccuTerm. In that case use sesObj = appObj.ActiveSession instead of Sessions.Add. Hope this helps. Thanks, Pete |
|
![]() |
|
esawyer
Newbie
Joined: June 05 2017 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Posted: June 06 2017 at 8:03am |
|
I'm just trying to send strings to the active window. We are currently running 2K2. Not sure if that changes anything.
When I'm trying the auto-fill for references, I'm getting the Atwin2K2 object and not the atwin32 object. If I just leave that as Accuterm, then I am unable to get the sesObj as ActiveSession, just Session. Thank you for the help.
|
|
![]() |
|
esawyer
Newbie
Joined: June 05 2017 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Posted: June 06 2017 at 10:25am |
|
I have managed to get this working. I updated to Accuterm7(which is the same level as the rest of the office), added the new reference and everything now works.
Thank you again for the help.
|
|
![]() |
|
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 |