Jump to content

Simple Question (Selected Text)


andy5179
 Share

Recommended Posts

I need to compare the value of the text selected to a predefined value. How do I tell Autoit that I'm wating to read the contents of the selected text??

I have it setup where AutoIt will tab into the field, so it's already all selected...

Thanks!

I require more information. What is the controle you are using? What text is being selected? Where is it being selected? There is no general getselectedtext function that works for everything however there are specific solutions. Please reply with more detailed informations.
Link to comment
Share on other sites

I require more information. What is the controle you are using? What text is being selected? Where is it being selected? There is no general getselectedtext function that works for everything however there are specific solutions. Please reply with more detailed informations.

I'm automating a bunch of keystrokes in a VB program..

In the form, I use the click mouse function to click to a location, then tab to the next field. At this point, there's some highlighted text in a textbox. I need a way of checking to see if the text that's there matches a predefined value.

Hope this makes sense.

Link to comment
Share on other sites

  • Developers

I'm automating a bunch of keystrokes in a VB program..

In the form, I use the click mouse function to click to a location, then tab to the next field. At this point, there's some highlighted text in a textbox. I need a way of checking to see if the text that's there matches a predefined value.

Hope this makes sense.

Ideally you find the proper controlname (can use Autoit_info (AU3Info.exe) program for that if you don't know it yet) and retrieve the text with ControlGetText(). If that's not possible you can send Ctrl+C and do a ClipGet() to retrieve the selected info from the clipboard... Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Ideally you find the proper controlname (can use Autoit_info (AU3Info.exe) program for that if you don't know it yet) and retrieve the text with ControlGetText(). If that's not possible you can send Ctrl+C and do a ClipGet() to retrieve the selected info from the clipboard...

I thought of the Control C to copy it to the clipboard, but what's the command to clear the contents of the clipboard? Sometimes this field has no data in it, so the next copy isn't written over with a blank, but retains the previous record's information.

Link to comment
Share on other sites

Try reading the help file

example:

ClipGet

--------------------------------------------------------------------------------

Retrieves text from the clipboard.

etc etec etc

and then

Related

ClipPut

always try looking at related

"But clipput is not clear"

Thats right but just put empty string in there.

like Clipput("")

Link to comment
Share on other sites

Try reading the help file

example:

ClipGet

--------------------------------------------------------------------------------

Retrieves text from the clipboard.

etc etec etc

and then

Related

ClipPut

always try looking at related

"But clipput is not clear"

Thats right but just put empty string in there.

like Clipput("")

Will using "Clipput" empty the contents of the Clipboard?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...