sness Posted October 15, 2007 Share 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 Link to comment Share on other sites More sharing options...
SadBunny Posted October 15, 2007 Share 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. Link to comment Share on other sites More sharing options...
SadBunny Posted October 15, 2007 Share Posted October 15, 2007 By the way, welcome to the forum! Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
ashley Posted October 15, 2007 Share Posted October 15, 2007 welcome to the fourm. Free icons for your programs Link to comment Share on other sites More sharing options...
sness Posted October 18, 2007 Author Share 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 Link to comment Share on other sites More sharing options...
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