hlstriker Posted May 14, 2005 Share Posted May 14, 2005 Hi, i'm new to AutoIt and these Forums. I am creating a GUI and... Here is what I am trying to do in this order: 1.) Someone enters text into an Input field. 2.) Push a copy button, and it copies the text from the input field to the clipboard. Really that's about it I'm just trying to get the hang of AutoIt for now, I thought you all might be able to help me with this. I have been trying things for awhile now and can't seem to get it. I can do things like creating buttons and input fields and stuff, I just can't get the copy from the input field. Thanks. -Andrew The best Honda forums!RuneScape High Alching for Profit! Link to comment Share on other sites More sharing options...
scriptkitty Posted May 14, 2005 Share Posted May 14, 2005 (edited) Function ReferenceGUICtrlCreateInput --------------------------------------------------------------------------------Creates an Input control for the GUIFunction ReferenceClipPut --------------------------------------------------------------------------------Writes text to the clipboard.ClipPut ( "value" )Example#include <GUIConstants.au3> GUICreate(" My GUI input acceptfile", 320,120, @DesktopWidth/2-160, @DesktopHeight/2-45, -1, 0x00000018); WS_EX_ACCEPTFILES $file = GUICtrlCreateInput ( "", 10, 5, 300, 20) GUICtrlSetState(-1,$GUI_ACCEPTFILES) GUICtrlCreateInput ("", 10, 35, 300, 20) ; will not accept drag&drop files $btn = GUICtrlCreateButton ("Ok", 40, 75, 60, 20) GUISetState () $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn exitloop EndSelect Wend ;MsgBox (4096, "drag drop file", GUICtrlRead($file)) clipput(GUICtrlRead($file)); this part added. Edited May 14, 2005 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
hlstriker Posted May 14, 2005 Author Share Posted May 14, 2005 Hey!!! Thanks scriptkitty! I got it working, and I learned a few new things from that code too! The best Honda forums!RuneScape High Alching for Profit! 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