VB Script ReadLine()

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
daniel
Junior Coder
Posts: 32
Joined: Mon Apr 25, 2005 5:04 pm

VB Script ReadLine()

Post by daniel » Mon Apr 25, 2005 5:09 pm

Help--

How can I write a macro to copy the field of the current cursor position and save this as a variable for me to use later???

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Apr 26, 2005 12:30 am

Rough outline, bad syntax:

Code: Select all

WaitWindowOpen>WindowName*
SetFocus>WindowName*
Press TAB * n to move to field to be copied
Select text to be copied
Press ALT
Send>c
Release ALT
GetClipBoard>variable
You now have a %variable% that can be used later in the same macro.
It can be passed as a variable to another macro
It can be written to an INI file for "use later"
It can be made into an environment variable (for this session only).

It all depends on what you mean by "use later".
---------------------------
If already on the field then you may be able to skip the first three steps. Make the macro into a hotkey, and you can use the hotkey once you are in the field.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

daniel
Junior Coder
Posts: 32
Joined: Mon Apr 25, 2005 5:04 pm

Post by daniel » Tue Apr 26, 2005 3:28 pm

Thank you very much. That's all I needed.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts