Cusem 1 Posted October 25, 2007 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
BrettF 28 Posted October 25, 2007 (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 October 25, 2007 by Bert Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Share this post Link to post Share on other sites
Ranmaru 0 Posted October 25, 2007 (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 October 25, 2007 by Ranmaru Share this post Link to post Share on other sites
Cusem 1 Posted October 25, 2007 Your second solution looks dandy Bert! I'm gonna try it. Thanks a lot! Share this post Link to post Share on other sites
BrettF 28 Posted October 25, 2007 Your second solution looks dandy Bert!I'm gonna try it. Thanks a lot!It should work. I hope it does Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Share this post Link to post Share on other sites