Bearpocalypse Posted December 21, 2013 Share Posted December 21, 2013 Now, I have a toolkit I use that uses ClipPut a good bit. I'm writing a small form for a semi-automated install until I, or a couple of co-workers can figure out how to get some information pre-configured. I am having the hardest time getting ClipPut to play nice. My other script has no problems, like I said. I've recreated exactly how I have it but to no avail. I can get the data copied without calling a function. Here is my code, nothing complex. Can anyone tell me what in the world is wrong and why the problem seems to haunt me. I feel silly asking about something this simple. expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $IP = "1.1.1.1" $Desc = "Something meaningful" $Port = "0000" #region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 375, 152, 192, 124) $Label1 = GUICtrlCreateLabel("This is my IP", 8, 24, 185, 21) $Label2 = GUICtrlCreateLabel("This is my Description", 8, 56, 185, 21) $Label3 = GUICtrlCreateLabel("This is my Port", 8, 88, 185, 21) $IPButton = GUICtrlCreateButton("<-- Copy", 288, 24, 75, 25) GUICtrlSetOnEvent(-1, "_IP") $DescButton = GUICtrlCreateButton("<-- Copy", 288, 56, 75, 25) GUICtrlSetOnEvent(-1, "_Desc") $PortButton = GUICtrlCreateButton("<-- Copy", 288, 88, 75, 25) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### Func _IP() GUICtrlRead(ClipPut($IP)) EndFunc ;==>_IP Func _Desc() ClipPut($Desc) EndFunc ;==>_Desc Func _Port() ClipPut($Port) EndFunc ;==>_Port While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 21, 2013 Moderators Share Posted December 21, 2013 Bearpocalypse,What is "GUICtrlRead(ClipPut($IP))" supposed to do? And if you want specific help, how about telling us what problem you are having and what is the desired end-state - at the moment we have no idea of the required configuration of your information, which makes it a bit difficult to suggest how to get it. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
mikell Posted December 21, 2013 Share Posted December 21, 2013 BTW there will be a choice to make between OnEvent and GuiGetMsg() Link to comment Share on other sites More sharing options...
Bearpocalypse Posted December 21, 2013 Author Share Posted December 21, 2013 That part was supposed to be deleted out. Tidy seems to have put it back in. I'm wanting to have the associated button just simply copy the information. IE, IPButton copy 1.1.1.1 to the clipboard. Bearpocalypse, What is "GUICtrlRead(ClipPut($IP))" supposed to do? And if you want specific help, how about telling us what problem you are having and what is the desired end-state - at the moment we have no idea of the required configuration of your information, which makes it a bit difficult to suggest how to get it. M23 Link to comment Share on other sites More sharing options...
Solution mikell Posted December 21, 2013 Solution Share Posted December 21, 2013 OK, it seems that you just forgot to put Opt("GuiOnEventMode", 1) at the top of the script Link to comment Share on other sites More sharing options...
Bearpocalypse Posted December 22, 2013 Author Share Posted December 22, 2013 Ah, don't I feel silly. Thanks for pointing out my and my co-workers oversight. Once again, you all are great! 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