Get data from hyperterminal
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.
Posted 31 January 2008 - 01:33 PM
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:
e.g. Wait a window of classname "Notepad"
Posted 31 January 2008 - 02:52 PM
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.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users