andy5179 Posted September 26, 2005 Share Posted September 26, 2005 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! Link to comment Share on other sites More sharing options...
Idea Posted September 26, 2005 Share Posted September 26, 2005 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 More sharing options...
andy5179 Posted September 26, 2005 Author Share Posted September 26, 2005 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 More sharing options...
Developers Jos Posted September 26, 2005 Developers Share Posted September 26, 2005 (edited) 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 September 26, 2005 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 More sharing options...
andy5179 Posted September 27, 2005 Author Share Posted September 27, 2005 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 More sharing options...
MrSpacely Posted September 27, 2005 Share Posted September 27, 2005 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 More sharing options...
andy5179 Posted September 27, 2005 Author Share Posted September 27, 2005 Try reading the help fileexample:ClipGet --------------------------------------------------------------------------------Retrieves text from the clipboard.etc etec etcand thenRelatedClipPut 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 More sharing options...
LxP Posted September 27, 2005 Share Posted September 27, 2005 It will set the clipboard's contents to the value that you specify. So if you specify a blank value like ""... Link to comment Share on other sites More sharing options...
andy5179 Posted September 27, 2005 Author Share Posted September 27, 2005 It will set the clipboard's contents to the value that you specify. So if you specify a blank value like ""...O.M.G.AWESOME! Link to comment Share on other sites More sharing options...
MrSpacely Posted September 27, 2005 Share Posted September 27, 2005 (edited) The world is great isn't it Edited September 27, 2005 by MrSpacely Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now