sness 0 Posted October 15, 2007 Hi everybody. I'm just getting started with AutoIt, Trying to call some of the simple commands listed in the Help section of the system. To understand how the UDF's work I want to run the example given under User Defined Functions. The code is two lines long: #include <date.au3> MsgBox(0,"Today","Today's date is " & Now()) My script is returning an error on the Now part of the 2nd line, Unknown Function Name. Do I need to register the functions I plan to use? What am I over looking? Thanks to you all. Sue Share this post Link to post Share on other sites
SadBunny 131 Posted October 15, 2007 Hi everybody.I'm just getting started with AutoIt, Trying to call some of the simple commands listed in the Help section of the system. To understand how the UDF's work I want to run the example given under User Defined Functions. The code is two lines long:#include <date.au3>MsgBox(0,"Today","Today's date is " & Now())My script is returning an error on the Now part of the 2nd line, Unknown Function Name.Do I need to register the functions I plan to use? What am I over looking?Thanks to you all.SueThe reason that didn't work seems to be that it's the _Now() function, not the Now() function. All UDF's start with an underscore. The help correctly contains the underscore and a cut&paste of that code works for me... Roses are FF0000, violets are 0000FF... All my base are belong to you. Share this post Link to post Share on other sites
SadBunny 131 Posted October 15, 2007 By the way, welcome to the forum! Roses are FF0000, violets are 0000FF... All my base are belong to you. Share this post Link to post Share on other sites
ashley 0 Posted October 15, 2007 welcome to the fourm. Free icons for your programs Share this post Link to post Share on other sites
sness 0 Posted October 18, 2007 (edited) WOW. Thanks. I will give this a try and I'm sure it will work - already learned a boat load. Sue Update - yes _Now() did work. I went back to the Help file to check it out - If you look at the TOC under "User Defined Functions" one of the first chapters, the example is there with no underscore. Thanks for you help, it is working perfect with the underscore. Edited November 26, 2007 by sness Share this post Link to post Share on other sites