COD3369 Posted October 16, 2012 Author Share Posted October 16, 2012 ok bro so its client based file checking not server based am I ryt ? Link to comment Share on other sites More sharing options...
water Posted October 16, 2012 Share Posted October 16, 2012 Correct. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
COD3369 Posted October 16, 2012 Author Share Posted October 16, 2012 ok I will try this bro Thankx alot Link to comment Share on other sites More sharing options...
COD3369 Posted October 19, 2012 Author Share Posted October 19, 2012 _FTP_FileDelete how to use this UDF any working example ? Link to comment Share on other sites More sharing options...
FireFox Posted October 19, 2012 Share Posted October 19, 2012 _FTP_FileDelete how to use this UDF any working example ?Any search done? Link to comment Share on other sites More sharing options...
water Posted October 19, 2012 Share Posted October 19, 2012 Lots of hits when searching the forum e.g. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
COD3369 Posted October 19, 2012 Author Share Posted October 19, 2012 Thankx guys.. and any how to read line from a file FileReadLine.. multiple lines like I want to read lines 1 to 145 line and want make as variable.. any idea ? I know how to read 1 line but have any idea about to read mutiple lines !! thankx Link to comment Share on other sites More sharing options...
water Posted October 19, 2012 Share Posted October 19, 2012 Either Global $aLines[146] = [145] For $i = 1 to 145 $aLines[$i] = FileReadLine("Your Filename") Nextor _FileReadToArray. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
COD3369 Posted October 19, 2012 Author Share Posted October 19, 2012 aLines is your variable ?? Global $aLines[146] = [145] For $i = 1 to 145 $aLines[$i] = FileReadLine("Your Filename") Next why u use this : 146=145 ??? Link to comment Share on other sites More sharing options...
water Posted October 19, 2012 Share Posted October 19, 2012 $aLines is an array with 146 elements where the first element holds the number of elements. That's why you see Global $aLines[146] = [145]It defines an array with 146 elements and assigns the value "146" to the first element of the array. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
COD3369 Posted October 19, 2012 Author Share Posted October 19, 2012 and what about Global $aLines[146] = [145] For $i = 1 to 145 $aLines[$i] = FileReadLine("Your Filename") Next and what is 145? is it my line number ? Link to comment Share on other sites More sharing options...
COD3369 Posted October 19, 2012 Author Share Posted October 19, 2012 1 + 145 = 146 ?? bcoz total elements is 145 !! Link to comment Share on other sites More sharing options...
water Posted October 19, 2012 Share Posted October 19, 2012 If you have an array with 145 elements you read from a file PLUS another element to hold the number of elements with data then you need 146 elements in the array, right? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
COD3369 Posted October 19, 2012 Author Share Posted October 19, 2012 I totaly understand the whole code... my question is why 146 elements? if we count the lines its 145 that mean 145 elements then why 146? Link to comment Share on other sites More sharing options...
water Posted October 19, 2012 Share Posted October 19, 2012 Because the FIRST element holds the number of lines you have read from the file. You have 145 elements in the array to store the lines you read from the file. Where do you store that you have read 145 lines? In another element, hence you need 146.A good reading about arrays can be found here. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
COD3369 Posted October 19, 2012 Author Share Posted October 19, 2012 ok ok ok I got it if we read the file it also count the 1 elements.... ? that mean 145 elements + 1 file. elements = 146 Link to comment Share on other sites More sharing options...
Rutger83 Posted October 19, 2012 Share Posted October 19, 2012 No the first element of the array, the 0 element contains a number representing the total of elements in the array. the same as ubound() would give. The workable array starts at 1 and contains as much elements as given in 0 Link to comment Share on other sites More sharing options...
COD3369 Posted October 19, 2012 Author Share Posted October 19, 2012 ok ok I got Link to comment Share on other sites More sharing options...
water Posted October 19, 2012 Share Posted October 19, 2012 Read the tutorial in the wiki (link posted above). It describes arrays much better than I can. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
COD3369 Posted October 22, 2012 Author Share Posted October 22, 2012 #include Local $aRecords If Not _FileReadToArray("data.html", $aRecords) Then MsgBox(4096, "Error", " Error reading log to Array error:" & @error) Exit EndIf For $x = 1 To $aRecords[301] MsgBox(0, 'Record:' & $x, $aRecords[$x]) Next its not reading the file from first line to 301??? and not showing any error... ??? 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