Jump to content

Noob Question


 Share

Recommended Posts

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

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

Look 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

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

#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 ()

:whistle: hope it helps.

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

  • Moderators

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...