Mcky Posted February 17, 2005 Posted February 17, 2005 Example: $data='MsgBox(0,"Test","Test message")' How do i execute the function in the variable $data? My website: (Lots of AutoIt compiled programs+GameMaker games)http://mcky.sitesled.comMy AutoIt projects:Mcky's CalEntry - Calendar schedulingMcky's Web Extractor - Web page links extractorMcky's Appkey- Powerful Hotkey-listing tool[quote]I wish I was never born. I am just a lonely soul in this world... :([/quote]
Andre Posted February 17, 2005 Posted February 17, 2005 $data is not an function but the result of your messagebox. Please make clear what u want Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!
Mcky Posted February 17, 2005 Author Posted February 17, 2005 Notice the single quote around the MsgBox function... $data is set to the string 'MsgBox(0,"Test","Test message")' I just want to know how to execute $data in order to display the Message box. My website: (Lots of AutoIt compiled programs+GameMaker games)http://mcky.sitesled.comMy AutoIt projects:Mcky's CalEntry - Calendar schedulingMcky's Web Extractor - Web page links extractorMcky's Appkey- Powerful Hotkey-listing tool[quote]I wish I was never born. I am just a lonely soul in this world... :([/quote]
Blue_Drache Posted February 17, 2005 Posted February 17, 2005 Notice the single quote around the MsgBox function...$data is set to the string 'MsgBox(0,"Test","Test message")'I just want to know how to execute $data in order to display the Message box.<{POST_SNAPBACK}>Ah, you want to put a function in a varaible to save typing? I only believe that you can put the results of the function into a variable, not the function itself.Besides, doing something like that would only obfuscate and muddy the code. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
Andre Posted February 17, 2005 Posted February 17, 2005 When u want to do that kind of things use FUNCTIONS Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!
Blue_Drache Posted February 17, 2005 Posted February 17, 2005 (edited) When u want to do that kind of things use FUNCTIONS Andre<{POST_SNAPBACK}>Well, yeah, there's that too. Static:Func MB() MsgBox(0,"test","test text") EndFuncOrDynamic:Func MB($i=0,$sTitle="test",$sText="test text") $return = MsgBox($i,$sTitle,$sText) Return $return EndFuncBut, if I want a debug message box, I just use SciTE and hit Ctrl+Alt+DEdit: Added a return value to the MB function. Yeah, forgot about the yes/no/cancel stuff. Edited February 17, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
herworth Posted February 17, 2005 Posted February 17, 2005 Notice the single quote around the MsgBox function...$data is set to the string 'MsgBox(0,"Test","Test message")'I just want to know how to execute $data in order to display the Message box.You could try this:.... if something then SpecialMsg("Hello world") else SpecialMsg("Goodbye world") endif Func SpecialMsg($msg1) Msgbox(0,"Title",$msg1) exit Endfunc [u][font="Arial"]Pete[/font][/u]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now