Sign in to follow this  
Followers 0

Clipboard work

4 posts in this topic

Posted (edited)

I am looking for clipboard management commands for onclick. I want the Link edit box to clear and paste from clipboard on click and the view edit box to copy to clipboard on click. I just can't seem to have the program preform the actions.

Here is what I have:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <Clipboard.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 137, 192, 124)
$FitName = GUICtrlCreateEdit("Fit Name", 253, 40, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_HSCROLL))
$View = GUICtrlCreateEdit("", 8, 8, 601, 21, BitOR($ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_HSCROLL))
$Link = GUICtrlCreateEdit("Link", 253, 72, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_HSCROLL))
$Generate = GUICtrlCreateButton("Generate", 276, 104, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Link
			GUICtrlSetData($Link,"")
			GUICtrlSetData($Link, _ClipBoard_GetData())
		Case $View
			_ClipBoard_SetData($View)
		Case $Generate
			$str = StringReplace(GUICtrlRead($Link), "fitting:", "<a onclick=" & Chr(34) & "CCPEVE.showFitting('") & "')" & Chr(34) & ">" & GUICtrlRead($FitName) & "</a>"
			GUICtrlSetData($View, $str)
	EndSwitch
WEnd

*edit Should be easier to read with the color codes in now.

Edited by AceSentinal

Share this post


Link to post
Share on other sites



Posted

wow... never mind, figured it out... where's the delete button?

Share this post


Link to post
Share on other sites

Posted

Maybe you could tell us how you solved whatever the problem was so people can find this topic if they run into similar issues.

Share this post


Link to post
Share on other sites

Posted

i didn't get the copy to clipboard function to work, but i got the data to load to the program onclick "Generate". i simply didn't realize that part till i was rushing through links. I haven't started on the copy to clipboard yet as the program i built was just a simple fix to the find and replace with notepad.

Share this post


Link to post
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
Sign in to follow this  
Followers 0