Sign in to follow this  
Followers 0
Cusem

GuiCtrlSetOnEvent and Function parameters

5 posts in this topic

I recently switched from working wit GuiGetMsg to GuiCtrlSetOnEvent, but I have a question regarding function parameters

GuiCtrlSetOnEvent($buttonhandle, "Message")

Func Message($whattotype)
    MsgBox(0, "Message", $whattotype)
EndFunc

How can I add the $whattotype data to the GuiCtrlSetOnEvent command?

GuiCtrlSetOnEvent($buttonhandle, "Message("testing")")

does not work.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Quite Frankly, You can't. You can't...

You can do this:

GuiCtrlSetOnEvent($buttonhandle, "RunThis")

Func RunThis ()
    Message ("Hello World")
EndFunc

Func Message($whattotype)
    MsgBox(0, "Message", $whattotype)
EndFuncoÝ÷ Ù8b²+ÞÞ²jÌV®¶­sdwV7G&Å6WDöäWfVçBb33c¶'WGFöææFÆRÂgV÷Cµ'VåF2gV÷C² ¤gVæ2'VåF2 b33c¶×6rÒuTô7G&Ä@ 6VÆV7B 66Rb33c¶×6rÒb33c¶'WGFöææFÆP ÖW76vRgV÷C´VÆÆòv÷&ÆBgV÷C² 6öçFçVT66P VæE6VÆV7@¤VæDgVæ0 ¤gVæ2ÖW76vRb33c·vGF÷GR¢×6t&÷ÂgV÷C´ÖW76vRgV÷C²Âb33c·vGF÷GR¤VæDgVæ

1 function... more than one control <_<

EDIT 2: WTH! WEIRD WRITING! :S

Edited by Bert

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I do not believe this is possible?

I don't think it is possible to give parametres on gui or tray events, however I might be wrong.

/EDIT: Ok it seems Bret solved this. Nevermind my post. <_<

Edited by Ranmaru

Share this post


Link to post
Share on other sites

Your second solution looks dandy Bert!

I'm gonna try it. Thanks a lot!

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