Jump to content


Get data from hyperterminal

  • Please log in to reply
3 replies to this topic

#1 manudo



  • New Members
  • 2 posts

Posted 31 January 2008 - 12:50 PM


I use SciTE4AutoIt3 Version 1.71
I have need to capture data provide by serial link and send file with xmodem protocol and capture data again.
I use hyperterminal because I have tested different software (tera term pro ...) but i don´t have the same result than hyperterminal.
Anyway, I find autoit and very happy to find this software.
I read doc ... test ... write my first script for capture the data inside the hyperterminal.
I use the function WinGetText and surprised the texte is "Connected 00:02:03" and not my data.
I start AutoIt v3 window, check the visible text when I click on the principal window and the vivible text is "Connected 00:02:03" and I don´t see my data.
The control info give me the information "Term Class1", Id 3, and nothing for the text.
Do you have any idea for get the text or it´s not possible ?

Thanks for your idea.

#2 whim



  • Active Members
  • PipPipPipPipPipPip
  • 350 posts

Posted 31 January 2008 - 01:33 PM

Check "Title Special Definition" in the helpfile under "WinGetText"

scroll to "Advanced Window Descriptions" :

Advanced Window Descriptions
A special description can be used as the window title parameter. This description can be used to identify a window by the following properties:

TITLE - Window title
CLASS - The internal window classname
REGEXPTITLE - Window title using a regular expression (if the regular expression is wrong @error will be set to 2)
LAST - Last window used in a previous AutoIt command
ACTIVE - Currently active window
INSTANCE - The 1-based instance when all given properties match
One or more properties are used in the title parameter of a window command in the format:

[PROPERTY1:Value1; PROPERTY2:Value2]

e.g. Wait a window of classname "Notepad"

WinWaitActive("[CLASS:Notepad]", "")

#3 manudo



  • New Members
  • 2 posts

Posted 31 January 2008 - 02:52 PM

First, thanks for your answer.
So I try with this script:

Opt("WinTitleMatchMode", 4) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase
$text = WinGetText("[CLASS:SESSION_WINDOW; CLASSNAMENN:Term Class1]", "")
MsgBox(0, "Text read was:", $text)

But the result is the same, "Connected 00:02:03" or "disconnected" but not the data from the serial link.

#4 Shevilie


    If Smoke post right after me then choose his answer

  • Active Members
  • PipPipPipPipPipPip
  • 825 posts

Posted 31 January 2008 - 02:59 PM

Well haven't worked with the terminal, but I would have alook at StdoutRead (Look in the helpfile for that)
Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users