Tjalve Posted October 25, 2012 Author Share Posted October 25, 2012 Hi. Im still trying to make this damn script to work I have now a loop that checks for mail in my inbox, once every 10 secounds and then move the incomming mail to 2 diffrent PSTs. It works fine for a few hours and then it stops woth the error: Array Subscript out of range. So inserted severel consolewrite commands to heltp me identify where the program crashes (it gives me an eerror from the UDF, not my script). It seems like this row crashses sametimes: $listofmail = _OL_ItemFind($oOutlook, $Local_Folder[1], $olMail, "", "", "", "EntryID") The only array in this funcition is the $Local_Folder[1] varible. This varible is with this line: $Local_Folder = _OL_FolderAccess($oOutlook, "", $olFolderInbox) and this function runs fine and give no error. The total error that i get is this: C:\Program Files (x86)\AutoIt3\Include\OutlookEx.au3 (2673) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $aItems[$iCounter][$iIndex - 1] = $oItem.ItemProperties.Item($aReturnProperties[$iIndex]).value ^ ERROR Link to comment Share on other sites More sharing options...
water Posted October 25, 2012 Share Posted October 25, 2012 The specified line is in function _OL_ItemFind. As soon as I find some spare time I will try to solve this problem. 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...
Tjalve Posted October 25, 2012 Author Share Posted October 25, 2012 All help is appritiated. Thanx. Link to comment Share on other sites More sharing options...
water Posted October 25, 2012 Share Posted October 25, 2012 From the message can you determine if $aItems or $aReturnProperties is the array in error? 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...
Tjalve Posted October 25, 2012 Author Share Posted October 25, 2012 How do i do that? Link to comment Share on other sites More sharing options...
water Posted October 25, 2012 Share Posted October 25, 2012 Run this script: Global $aArray1[1] Global $aArray2[1] $aArray1[0] = $aArray2[1]and you'll get: ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $aArray1[0] = $aArray2[1] $aArray1[0] = ^ ERROR Run this script: Global $aArray1[1] Global $aArray2[1] $aArray1[1] = $aArray2[1]and you'll get: ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $aArray1[1] = $aArray2[1] ^ ERROR So the ^ sign points to the array in error. In your error messag the ^ sign points to the first array. i will have a look. 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...
Tjalve Posted October 25, 2012 Author Share Posted October 25, 2012 Ahh now i understand what you mean. The error points to $aItems[$iCounter] Link to comment Share on other sites More sharing options...
water Posted October 25, 2012 Share Posted October 25, 2012 Did you tell me which Outlook version you run? 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...
Tjalve Posted October 25, 2012 Author Share Posted October 25, 2012 Outlook 2010 x86 Swedish Link to comment Share on other sites More sharing options...
water Posted October 25, 2012 Share Posted October 25, 2012 (edited) So you could use one of the example scripts: This script waits until a new mail arrives. The Id of the mail is passed to a function where you could copy/move the mail to your PSTs.Less overhead compared to a script which scans the inbox every 10 seconds.Test the example script and see what you get. Edited October 25, 2012 by water 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...
Tjalve Posted October 25, 2012 Author Share Posted October 25, 2012 I will check it out. Thank you. Link to comment Share on other sites More sharing options...
Tjalve Posted October 25, 2012 Author Share Posted October 25, 2012 There is no way to make the current configuration working? I really need this to run i dont have that mutch time and i would prefer not to rewrite the entire script. Link to comment Share on other sites More sharing options...
water Posted October 25, 2012 Share Posted October 25, 2012 Hmm. Don't know Must be a data related bug. Do you know which kind of mail (receipt ...) caused the script to crash? 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...
Tjalve Posted October 25, 2012 Author Share Posted October 25, 2012 No im afraid not... There are over 6000 mail in the PSTs now. Im currently testing one thing. Im skipping the "precheck"of the PSTs (the prescheck cheks of there are any email in one PST thats not in the other and viseversa. It also chekcs for duplicate mail). Its running for now. I will check back tomorow and il let you know how it tunes out. Link to comment Share on other sites More sharing options...
Tjalve Posted October 25, 2012 Author Share Posted October 25, 2012 Damnt it... it ran fr 3200 sec and then crashed... Link to comment Share on other sites More sharing options...
water Posted October 25, 2012 Share Posted October 25, 2012 Can you please insert this line into the OutlookEx UDF before the line that crashes in function _OL_ItemFind? Then runt he function from SciTe. So we will see every processed mail on the console. ConsoleWrite("EntryID: " & $oItem.EntryID & ", Dim1: " & UBound($aItems, 1) & ", Dim2: " & UBound($aItems, 2) & ", $iCounter: " & $iCounter & ", $iIndex: " & $iIndex & @LF) 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...
Tjalve Posted October 25, 2012 Author Share Posted October 25, 2012 There is no way to make it ignore that error and just "try again"? Link to comment Share on other sites More sharing options...
water Posted October 25, 2012 Share Posted October 25, 2012 No. Because Autoit crashes when you try to access a non existing element of an array. 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...
Tjalve Posted October 25, 2012 Author Share Posted October 25, 2012 Alright. Ive inserted the line and the script is running again. I will give you the results tomorow Link to comment Share on other sites More sharing options...
water Posted October 25, 2012 Share Posted October 25, 2012 You can already see the output on the console? 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...
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