• Support
  • Articles
  • Resources
  • Products
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead

Start Macro on Existing TeraTERM

Moderator: boris

6 postsPage 1 of 1

IshmaelCallMe
Guru

Posts:
674
Joined: Thu Jan 26, 2006 2:28 am
by IshmaelCallMe » Wed Jul 02, 2008 2:22 pm
bobfii
Newbie

Posts:
7
Joined: Tue Jun 27, 2006 12:55 pm
by bobfii » Thu Jul 24, 2008 1:42 pm
I have been using teraterm to control test equipment for several years but have started to reach the limitations of teraterm for my general program. I think I might try Autoit but have several questions that maybe you can answer. I have close to 70 macros written and debugged to control many different pieces of test equipment. Using TeraTerm exclusively I can pass variables back and forth between my main program and these macros that I run using the INCLUDE command. I want to keep my macros intact and change my main to autoit. How can I pass variables back and forth bewtween autoit and teraterm in this environment?
IshmaelCallMe
Guru

Posts:
674
Joined: Thu Jan 26, 2006 2:28 am
by IshmaelCallMe » Thu Jul 24, 2008 4:34 pm
To pass stuff to TeraTERM, you could use command line parameters when calling ttpmacro.

To pass stuff back, you could have TeraTERM write a file and then have Autoit read that file. This could be the log file, or some file whose name was passed to TeraTERM via the command line. This file could be as simple as a bunch of "VariableName=VariableValue" statements. You could then #include this file to set all the variables in AutoIt.

Another possibility would be to have TeraTERM put up a messagebox and then have AutoIT read and close the messagebox. This would cause at least a flicker of the messagebox window to the user, though.

You could also pass back some limited info back and forth by using the title bar of the TeraTERM window - see settitle/gettitle.

Hope this helps and that I understood your question correctly.
bobfii
Newbie

Posts:
7
Joined: Tue Jun 27, 2006 12:55 pm
by bobfii » Thu Jul 24, 2008 4:48 pm
Thanks for the reply.

I had already come to that conclusion but was just checking to see if you had come up with any other way of passing data back and forth. I thought for a momment I could uss the setenv or getenv command in ttmacro and some counterpart command in autoit, but setenv only affects the teraterm environment, not the system environment.

Looks like a file to pass data back and forth is the way to go. My macros usually get passed 8-10 variables to the macro and return typically 2 variables, an integer success/fail indicator, and a string "measured value".

Again thanks
skywalker
Newbie

Posts:
7
Joined: Wed Jan 13, 2010 12:28 pm
by skywalker » Wed Mar 03, 2010 9:18 am
Hello,

i tried to start a macro in an existing Tera Term window, using the AutoIt Script as described.
But I get an error message.

What reason can it have?

Attachments

error.png
error.png (14.21 KiB) Viewed 7625 times
IshmaelCallMe
Guru

Posts:
674
Joined: Thu Jan 26, 2006 2:28 am
by IshmaelCallMe » Wed Mar 03, 2010 3:21 pm
Most often, this error would be caused if that TeraTERM window were already running a macro. You can't run more than one macro on a given TeraTERM window at a time.

Or possibly a really slow computer? Try increasing the 2 second timeout in line 5.
Display posts from previous:
Sort by:

6 postsPage 1 of 1

Users browsing this forum: No registered users
cron