Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/11/2021 in all areas

  1. Also, HotKeySet("{ESC}", "_Exit") While 1 For $iCount = 0 To 5 ; Current value ConsoleWrite($iCount & @CRLF) ; Just to keep it slow enough to read Sleep(500) Next WEnd Func _Exit() Exit EndFunc Maybe less floating point arithmetic.
    1 point
  2. The standard for date format is ISO-8601, which also specifies how to espress durations. For instance, year 0000 doesn't exist which makes your output an invalid ISO-8601date string! To see what makes dates and durations differ, consider a similar question. I give you two points in 3D space by their coordinates in some base. The 2 points are then well defined and so is the length of the segment joining them. Now I ask you to compute that length expressed in the input format, that is in 3D coordinates and ... you tell Houston you have a problem. Theses formats differ by nature and properties, you can't apply the input format to the output. You have to express the fact that the output is a period, that is prepend 'P' to the output format. See https://en.wikipedia.org/wiki/ISO_8601#Durations Add to this fundamental problem the variability of a month (is that 28, 29, 30 or 31 days?) and of a year (is that 365 or 366 days?): this output date format looses its meaning and, if using the period format, it looses precision. Periods beyond days, hours and seconds are approximate at best. The ISO-8601date format is very practical, thanks to its human-readability, un-ambiguousness and self-collating property. It's not even a 6D vector (Y, M, D, h, m, s) since year, month and day are not independant coordinates. But it can't express durations or time periods in the general case unless you use the 'P' format and accept its fuzzy meaning. Things would be different if your input was in Julian date format: a Julian date is a real >= 0.0 and is in fact a Julian period from the start of the conventional Julian calendar. The difference between two Julian dates is then also a period, hence expressable in Julian date format. See AutoIt _DateToDayValue() and _DayValueToDate() functions albeit they don't handle fractional days (hms are unfortunately ignored).
    1 point
  3. The linked UDF does work fine for me with O356. I use these settings: $SmtpServer = "smtp.office365.com" ; address for the smtp-server to use - REQUIRED $FromName = "Jos" ; name from who the email was sent $FromAddress = "jos.....@outlook.com" ; address from where the mail should come $ToAddress = "jos.....@yahoo.com" ; destination address of the email - REQUIRED $Subject = "Test O365 message" ; subject from the email - can be anything you want it to be $Body = " test email" ; the messagebody from the mail - can be left blank but then you get a blank mail $AttachFiles = "" ; the file you want to attach- leave blank if not needed $CcAddress = "" ; address for cc - leave blank if not needed $Importance = "Normal" ; Send message priority: "High", "Normal", "Low" $BccAddress = "" ; address for bcc - leave blank if not needed $Username = "jos......@outlook.com" ; username for the account used from where the mail gets sent - REQUIRED $Password = "?????????" ; password for the account used from where the mail gets sent - REQUIRED $SmtpServer = "smtp.office365.com" ; address for the smtp-server to use - REQUIRED $IPPort=25 ; port used for sending the mail $ssl=1 ; enables/disables secure socket layer sending - put to 1 if using httpS Jos
    1 point
  4. You can even streamline things: $iStat = MyFunc(StringSplit("4|7", "|", $STR_NOCOUNT)) Func MyFunc ($aInputArray) ... EndFunc Bonus: this still allows you to pass an existing array in other invokations. Drawback: all array entries are string type.
    1 point
×
×
  • Create New...