Jump to content
Sign in to follow this  
ShaneF

HyperTerm window read values

Recommended Posts

ShaneF

Hi,

I've searched the internet high and low to find an answer for this and as yet come back with nothing.

I wrote an autoit script that uses keystrokes and tabs to navigate a HyperTerminal-style session within an IE window.

It's a third-party's system that we have no choice but to use, and I'm trying to save the effort of someone sat there day-in, day-out just keying information into a window and copy/pasting the returned reference numbers.

It fills in the fields and then sends and ENTER keystroke.

Now, dependant on the value returned it can then place the cursor in either of two fields, one is blank (and I wish it to remain so), and one that has the default value of 'Y' - which I need to change to 'N'.

Is there any way I can get the script to read what text is at the current cursor (not mouse position) location and send an extra TAB if it doesn't read 'Y'?

Any ideas would be greatly appreciated >_<

BTW, I am very new to AutiIt (been using for one week) and wish I'd known about it a lot sooner! :(

Share this post


Link to post
Share on other sites
herewasplato

Welcome to the forum.

Sorry that nobody has replied to your post. It might help if you could mention the name of this "third party HyperTerminal-style" application. Maybe someone has worked with it.

As far as your question goes - "Is there any way I can get the script to read what text is at the current cursor (not mouse position) location and..." You might be able to sent the keystrokes needed to copy the info to the operating system's clipboard. Maybe like this:

Send("{HOME}+{END}^c")

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites
ShaneF

Hey - thanks for the welcome...

Unfortunately I can't divulge the exact site of the 3rd party, but it's something known all too well in the frieght industry.

It uses something called Evergreen Terminal Server mounted in an IE window, and they have taken control of the Ctrl+C function to direct you to another menu (rather than copy function).

Thanks for the attempt though, I have spent days searching the internet for an answer and it's starting to annoy me >_<

Welcome to the forum.

Sorry that nobody has replied to your post. It might help if you could mention the name of this "third party HyperTerminal-style" application. Maybe someone has worked with it.

As far as your question goes - "Is there any way I can get the script to read what text is at the current cursor (not mouse position) location and..." You might be able to sent the keystrokes needed to copy the info to the operating system's clipboard. Maybe like this:

Send("{HOME}+{END}^c")

Share this post


Link to post
Share on other sites
ShaneF

I've come up with a work-around, and thought I would post it back on here for anyone else who may run into similar trouble.

I used the {PRINTSCREEN} keystroke to print the output to a text file, and as the value is always in the same location just devised a procedure to select the value within that file, and copy it to clipboard, and return the value to a variable.

The script then inserts extra {TAB} keystrokes when needed, dependant on that returned value.

Share this post


Link to post
Share on other sites
herewasplato

Wow, that is some work-around. Kudos.

Have you tried?

Send("{HOME}+{END}^{INS}")
Ctlr-Insert should do the same thing as Ctrl-c.

edit: typo

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites
ShaneF

Thanks, I'll have a look at your suggestion, but seeing as I was printing the file to text for another application I just thought it best to make another use for it >_<

Thanks for your help though, much appreciated :(

Wow, that is some work-around. Kudos.

Have you tried?

Send("{HOME}+{END}^{INS}")
Ctlr-Insert should do the same thing as Ctlr-c.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.