Jump to content

GuiCtrlSetOnEvent and Function parameters


Cusem
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...