Diana (Cda) Posted June 4, 2016 Share Posted June 4, 2016 Good Morning! New OS (Win10) after nearly a year on Linux. Only reason I'm back on Window$ is because even though I did so much prefer the solidity of Linux, unfortunately, my productivity went way down due to lack of applications, a huge one being the supreme desktop automation provided by AI!! <sigh> [Linux did allow me to continue on the failing box for an extra 10 months or so, so it was a good experience.] However, just curious about something - anyone know why _DateMonthOfYear would have been removed from the DATE.AU3 UDF? Here is the error I was getting (I did extract the lines from an old DATE.AU3 to the new one. Too much for me to re-write the scripts themselves): Line 37 ... $monthMmm = _DateMonthOfYear ( @MON, 1 ) $monthMmm = ^ERROR Error: Unknown function name. I delay upgrading because a huge chunk of my scripts always get broken. But this DATE.AU3 issue was a doozy as about a fifth of all my scripts call a date function. So just curious as to why it would have been removed sometime in the last few updates? Thx! Link to comment Share on other sites More sharing options...
water Posted June 4, 2016 Share Posted June 4, 2016 First we need some more information! Which version of AutoIt are you talking about? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted June 4, 2016 Share Posted June 4, 2016 Or check this post for the code: My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
AutoBert Posted June 4, 2016 Share Posted June 4, 2016 better this one: you marked it as solved. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 4, 2016 Moderators Share Posted June 4, 2016 (edited) Diana (Cda), The function to which water linked seems functionally equivalent to the current _DateToMonth function: expandcollapse popup#include <Date.au3> ConsoleWrite(_DateMonthOfYear(1, 0) & @CRLF) ConsoleWrite(_DateMonthOfYear(1, 1) & @CRLF) ConsoleWrite(_DateToMonth(1, 0) & @CRLF) ConsoleWrite(_DateToMonth(1, 1) & @CRLF) ConsoleWrite(_DateToMonth(1, 2) & @CRLF) ConsoleWrite(_DateToMonth(1, 3) & @CRLF) Func _DateMonthOfYear($iMonthNum, $iShort) ;============================================== ; Local Constant/Variable Declaration Section ;============================================== Local $aMonthOfYear[13] $aMonthOfYear[1] = "January" $aMonthOfYear[2] = "February" $aMonthOfYear[3] = "March" $aMonthOfYear[4] = "April" $aMonthOfYear[5] = "May" $aMonthOfYear[6] = "June" $aMonthOfYear[7] = "July" $aMonthOfYear[8] = "August" $aMonthOfYear[9] = "September" $aMonthOfYear[10] = "October" $aMonthOfYear[11] = "November" $aMonthOfYear[12] = "December" Select Case Not StringIsInt($iMonthNum) Or Not StringIsInt($iShort) SetError(1) Return "" Case $iMonthNum < 1 Or $iMonthNum > 12 SetError(1) Return "" Case Else Select Case $iShort = 0 Return $aMonthOfYear[$iMonthNum] Case $iShort = 1 Return StringLeft($aMonthOfYear[$iMonthNum], 3) Case Else SetError(1) Return "" EndSelect EndSelect EndFunc ;==>_DateMonthOfYear The _DateToMonth function has been in Date.au3 since at least 3.3.8.1 (I have no earlier zips available to check) and I rather doubt that the function to which you refer has recently been part of the Date library. However, what version of AutoIt are you running as it may perhaps have been there in a very out-dated version. Or perhaps you had it in a personal include which you no longer have available since you reinstalled AutoIt? M23 Edited June 4, 2016 by Melba23 Added another question Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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