pjotterke Posted February 21, 2007 Share Posted February 21, 2007 Hi iam now working with Autoit For 3 weaks... but i have a Qustion... What means this... #include <Date.au3> iam talking then about the Include... Tell me if iam wrong i thought that it means that it is a short of component so you can use in this case the time of your pc... so if i want to use my pc time i have to give this command? must i place it then in the begin of my code ore on the place where i want to show my pc time? thanks Link to comment Share on other sites More sharing options...
martin Posted February 21, 2007 Share Posted February 21, 2007 Hi iam now working with Autoit For 3 weaks...but i have a Qustion...What means this...#include <Date.au3>iam talking then about the Include...Tell me if iam wrongi thought that it meansthat it is a short of component so you can use in this case the time of your pc...so if i want to use my pc time i have to give this command?must i place it then in the begin of my code ore on the place where i want to show my pc time?thanksLook in the help file. #include means that the file between <> is to be inserted in your script at that position. If you want to use the functions in the date.au3 file then you must include the date.au3 this way. Copying the file and pasting it would have the same effect though this would be a bad idea. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
pjotterke Posted February 21, 2007 Author Share Posted February 21, 2007 K thanks And another question I want to use my system date... But can i use it then like DD/MM/YY and NOT YYYY/MM/DD Iam have looked in help file but can't find enything about it... i can use a date but then there are - - in the date but i don't whant that... it have to be 13(day)-06(month)-2007(year) Link to comment Share on other sites More sharing options...
BrettF Posted February 21, 2007 Share Posted February 21, 2007 #include <Date.au3> The #include basically means you can include a file in the script, and then the call functions from that script, among other things. To get the time use _NowTime and include date.au3, like this... #Include <Date.au3> _NowTime () hope it helps. 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! Link to comment Share on other sites More sharing options...
BrettF Posted February 21, 2007 Share Posted February 21, 2007 (edited) Sorry for the double post, use _NowDate EDIT: or _DateTimeFormat Edited February 21, 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! Link to comment Share on other sites More sharing options...
pjotterke Posted February 21, 2007 Author Share Posted February 21, 2007 K thanks i have done that... now a little bit harder... ( think) The Date (_nowdate) +1 work day... i want to use _NowDate and then +1 work day.. Like this (_DateAdd( 'd',+1, _NowDate()) But it don't work... Link to comment Share on other sites More sharing options...
The Kandie Man Posted February 21, 2007 Share Posted February 21, 2007 The helpfile states that _NowDate() returns the date in the date format of the PC according to its settings found in the registry. This will not work since the date has to be returned with the format of "YYYY/MM/DD[ HH:MM:SS]" in order for the _DateAdd() function to be able to use it. Looking at the help file, i found that _NowCalc() always returns the date in the "YYYY/MM/DD HH:MM:SS" format. So you simply use that function. _DateAdd( 'd',1,_NowCalc ()) -The Kandie Man "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
pjotterke Posted February 21, 2007 Author Share Posted February 21, 2007 Thanks for response... But i only need Date... not that time is is for a program where i have to put some info in and i only need current date +1 WORKDAY... So... i now in VBA there is a code for it so you can give the weekdays monday (1) thuesday (2) enz enz... but is that possible here to? Link to comment Share on other sites More sharing options...
BrettF Posted February 22, 2007 Share Posted February 22, 2007 IF @WDAY = 1 then $day = "Sunday" IF @WDAY = 2 then $day = "Monday" IF @WDAY = 3 then $day = "Tuesday" And so on...... 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! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 22, 2007 Moderators Share Posted February 22, 2007 IF @WDAY = 1 then $day = "Sunday" IF @WDAY = 2 then $day = "Monday" IF @WDAY = 3 then $day = "Tuesday" And so on......That's a really long way of achieving what you are trying to show. $sDay = _GetWeekday(@WDAY) MsgBox(64, 'Week Day', $sDay) Func _GetWeekday($nDay) Local $sWDay[8] = ['', 'Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'] Return $sWDay[$nDay] EndFunc Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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