Jump to content
Sign in to follow this  

Why does this not work correctly?

Recommended Posts


I made a Script that is supposed to put stuff into the clipboard on a specified Hotkey.

The strings that will be put into the clip will be defined by the user. The Hotkeys will be ctrl f1 - f8

When I run the script and press ctrl + f8 and then press ctrl + v it pastes "5" or something.

GUICtrlCreateLabel ("Enter the Text you wish to set on the Hotkeys CTRL + F1 ~ F8",  20, 3)
$msg_f1 = GUICtrlCreateInput ( "Your Message for CTRL + F1.", 20, 1*$y_dist,  350, 20)
$msg_f2 = GUICtrlCreateInput ( "Your Message for CTRL + F2.", 20, 2*$y_dist,  350, 20)
$msg_f3 = GUICtrlCreateInput ( "Your Message for CTRL + F3.", 20, 3*$y_dist,  350, 20)
$Button_Go = GUICtrlCreateButton ("Go!",  20, 9*$y_dist, 350)

; Programme

While 1
    $msg = GUIGetMsg()
        Case $msg = $GUI_EVENT_CLOSE
        Case $msg = $Button_Go
        ; Funcs
            HotKeySet("^{F1}", "setF1")
            Func setF1()
                ClipPut ($msg_f1)

            HotKeySet("^{F2}", "setF2")
            Func setF2()
                ClipPut ($msg_f2)

            HotKeySet("^{F3}", "setF3")
            Func setF3()
                ClipPut ($msg_f3)



Share this post

Link to post
Share on other sites

Read in the helpfile what's said about the return value of GUICtrlCreateInput... Also, read the first line under remarks.

Share this post

Link to post
Share on other sites

Btw...in your script, do you actually have those functions in the loop ? If so, then I suggest you move them to

the end of your script.

EDIT : Last thing...in your next topics, please find a more fitting topic-title. After three years of topics in a

support- forum you would think there's been a few people who's had problem getting "something" working

correctly before...

Edited by Helge

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...