Jump to content
Sign in to follow this  

Clipboard work

Recommended Posts

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)
#EndRegion ### END Koda GUI section ###

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

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

Edited by AceSentinal

:blink: What just happened?

Share this post

Link to post
Share on other sites

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.

:blink: What just happened?

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...