Jump to content
Sign in to follow this  
Heinzo80

Problem with "send"

Recommended Posts

Heinzo80

Hiho all.

I got a little problem with the send fuction.

There's a combo field:

$key1 = GUICtrlCreateCombo("", 232, 64, 81, 25)
GUICtrlSetData(-1, "+1|+2|+3|+4|+5|+6|+7|+8|+9|+0", "")

The following code should've send a SHIFT+number depending on the combo.

Send(GUICtrlRead($key1))

For some reason it doesn't work though. I'm sure the solution is ridiculously easy, but i can't find it.

Thx in advance,

Heinzo

Share this post


Link to post
Share on other sites
AdmiralAlkex

Hi and Welcome to the forum!

How do you expect us to fix your code when we can't see it? Do you expect us to read your mind?

If your script is small you can post it, if not then make a reproducer (fully working/runnable).

In this case, all we can say is that your script is fully working, because after filling in all the blanks it IS WORKING.

For $iX = 0 To 9
    HotKeySet("+" & $iX, "_HotKey")
Next

GUICreate("Test", 320, 240)
$key1 = GUICtrlCreateCombo("", 232, 64, 81, 25)
GUICtrlSetData(-1, "+1|+2|+3|+4|+5|+6|+7|+8|+9|+0", "")
GUISetState()

While 1
    Switch GUIGetMsg()
        Case -3
            Exit
        Case $key1
            Send(GUICtrlRead($key1))
    EndSwitch
WEnd

Func _HotKey()
    ConsoleWrite(@HotKeyPressed & @CRLF)
EndFunc

Think about this the next time you ask for help.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.