bling8d Posted August 18, 2012 Posted August 18, 2012 Hello, I just want to display my array in my gui, like in an edit button if it's possible? I've tried to set the data of the array in the button but it doesn't work and _ArrayDisplay shows a pop up and I don't want it. I can copy paste it maybe but I don't want to modify the clipboard of the user Thank you
water Posted August 18, 2012 Posted August 18, 2012 I've tried to set the data of the array in the button but it doesn't workCan you show the code of your script? Then it's easier to help you. 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
bling8d Posted August 18, 2012 Author Posted August 18, 2012 Yes sorry, so I have something like that for now $test2=_IETableGetCollection($oie,1) $atabledata=_IETableWriteToArray($test2,true) _ArrayDelete($atabledata,0) GUICtrlSetData($Edit1,_ArrayDisplay($atabledata)) $edit1 is obviously an edit button, this return "1" (so succes) in the edit button and the array pops up. I've tried other thing but I don't even remember x)
water Posted August 18, 2012 Posted August 18, 2012 Use function _ArrayToString to convert the array to a string and then call GUICtrlSetData. 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
bling8d Posted August 18, 2012 Author Posted August 18, 2012 (edited) $myarray=_ArrayToString($atabledata) GUICtrlSetData($Edit1,$myarray) This return nothing, I remember having try this and I couldn't do anything with the arrayToString function :/ If I try to consoleWryte $myarray nothing happens and if I make a msgBox It returns a box with nothing Edited August 18, 2012 by bling8d
water Posted August 18, 2012 Posted August 18, 2012 You are sure that the array contains any data? What's the value of @error after _ArrayToString? 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
bling8d Posted August 18, 2012 Author Posted August 18, 2012 Yes I'm sure because _arrayDisplay shows me the array full of data. The status of @error is 3 - $avArray is not an 1 dimensional array. So I need a 1D array? oO
water Posted August 18, 2012 Posted August 18, 2012 (edited) You don't need a 1D array. You can create the string yourself: Global $sData For $iIndex1 = 0 To UBound($atabledata, 1) - 1 For $iIndex2 = 0 To UBound($atabledata, 2) - 1 $sData = $sData & $atabledata[$iIndex1][$iIndex2] If $iIndex2 <> UBound($atabledata, 2) - 1 Then $sData = $sData & "|" Next If $iIndex1 <> UBound($atabledata, 1) - 1 Then $sData = $sData & @CRLF Next Edited August 18, 2012 by water 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
bling8d Posted August 18, 2012 Author Posted August 18, 2012 Thank you for the code =) but how would I do if I want to print it as an array? I mean if I print the string it's kinda awful and I'd like to print the array with column etc
water Posted August 18, 2012 Posted August 18, 2012 In this case an Edit Control doesn't do what you need. Have a look at function GUICtrlCreateListView. The example script in the help file shows how it looks like and how it is to be filled. 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
bling8d Posted August 18, 2012 Author Posted August 18, 2012 Yep that's where I was just looking (: now I just need to know how to make it write all the lines and not only the first. But I have another problem... Without any reason I get this --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop --> IE.au3 V2.4-0 Error from function _IECreate (Browser Object Creation Failed) --> IE.au3 V2.4-0 Error from function _IETableGetCollection, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IETableWriteToArray, $_IEStatus_InvalidDataType I didn't modify the code and the site is still up.. Any idea?
water Posted August 18, 2012 Posted August 18, 2012 No idea. Maybe a crashed instance of the IE floating around? I would recommend a restart of your computer. 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
bling8d Posted August 18, 2012 Author Posted August 18, 2012 Ow nevermind, I had like 25 process of IE xD I added _IEQuit (: So to do what I want I should make a loop that will trim the string then put every line in the list with GUICtrlCreateListViewItem, am I on the right track? Also is that possible do completely delete column of an array?
water Posted August 18, 2012 Posted August 18, 2012 (edited) This fills the listview with columns 1 and 3 of your array dropping column 2.$listview = GUICtrlCreateListView("col1 |col2|col3 ", 10, 10, 200, 150) For $iIndex = 0 to UBound($aTableData, 1) - 1 $sData = $aTableData[$iIndex][0] & "|" & $aTableData[$iIndex][2] $item1 = GUICtrlCreateListViewItem($sData, $listview) Next Edited August 18, 2012 by water 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
bling8d Posted August 18, 2012 Author Posted August 18, 2012 Thank you buddy! =D It works perfectly (: Now I have to write all the data from my list to a file but how can I do that? I can't find a function to get the data from the list. I can GuiCtrlRead the list but Iit returns this: ListView Control identifier (controlID) of the selected ListViewItem. 0 means no item is selected so that's not really helpfull... If I do this consolewrite(GUICtrlRead(GUICtrlRead($List1))) I get one line but I don't know how to select one particular line/all the lines So I could make a loop with the code you've written and write each string ($sData) in the file but that's heavy =p I'm looking for a way to directly extract all the data from the listView
water Posted August 18, 2012 Posted August 18, 2012 I would stick with the loop: Take my code from above and add FileWriteLine("C:tempoutput.txt", $sData)after$sData = $aTableData[$iIndex][0] & "|" & $aTableData[$iIndex][2] 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
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