AustrianOak Posted June 11, 2008 Share Posted June 11, 2008 (edited) Is there a way I can use ClipGet() and ClipPut() to copy and paste text into an input instead of manually having to Send each word character by character? Edited June 11, 2008 by nowagain Link to comment Share on other sites More sharing options...
Paulie Posted June 11, 2008 Share Posted June 11, 2008 You basically just asked "Is there a way I can use a car to drive from place to place?" Yes. Link to comment Share on other sites More sharing options...
AustrianOak Posted June 11, 2008 Author Share Posted June 11, 2008 (edited) I'm sorry, I actually meant to go more into detail. What I don't fully understand is how does ClipGet() know what variable or string I want to retrieve? I'm reading through the helpfile and I dont see any parameters for ClipGet(). Same thing with ClipPut() I've never used this before so sorry for being dense. Edited June 11, 2008 by nowagain Link to comment Share on other sites More sharing options...
cartman380 Posted June 11, 2008 Share Posted June 11, 2008 Ok, read the help file for IniRead, it tells you how to pull out the values you want. FYI you don't need to use ClipPut or ClipGet to place the retrieved value into an input. Example: Put the name of the file, the section of the ini, the key you want, and the default value if it doesn't work $ReadValue = IniRead ( @ScriptDir & "\myfile.ini", "mySection", "myKey", "myKeyFailed" ) If ($ReadValue <> "myKeyFailed") Then ; whatever you need to do just use $ReadValue to place it into the "Input" EndIf Link to comment Share on other sites More sharing options...
Cater Posted June 11, 2008 Share Posted June 11, 2008 Put string in input from clipboard. #include <GUIConstantsEx.au3> GUICreate("Example", 200, 80) $input = GUICtrlCreateInput("Blabla", 10, 10, 180) $button = GUICtrlCreateButton("Put from clipboard", 40, 40) GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $button GUICtrlSetData($input, Clipget()) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
AustrianOak Posted June 11, 2008 Author Share Posted June 11, 2008 @cartman: you're confused badly as of what i want to do. i am not interested in "placing" whatever text i have into an input. im interested in "pasting" and was wondering if i could do it with clipget() and clipput() if it cant be done thats all i need to know. Link to comment Share on other sites More sharing options...
AustrianOak Posted June 11, 2008 Author Share Posted June 11, 2008 (edited) @cater: what if i have text stored in a variable like this: If IsArray(Search) Then For $i = 1 To $Search[0] ControlSetText($handle, "", "Edit1", "") ClipGet(); how would i use this ControlSend($handle, "", $Edit, $Search[$i] & "{Enter}"); instead of this Edited June 11, 2008 by nowagain Link to comment Share on other sites More sharing options...
Cater Posted June 11, 2008 Share Posted June 11, 2008 Do you want control send contents of clipboard? if you do then If IsArray(Search) Then For $i = 1 To $Search[0] ControlSetText($handle, "", "Edit1", "") $clip = ClipGet() ControlSend($handle, "", $Edit, $Search[$i] & " " & $clip & " " & "{Enter}") array number + clipboard contents + enter 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