Search the Community
Showing results for tags '_arraydisplay'.
-
(please kindly relocate this post if I've posted in in the wrong area). The latest AutoIT release removed (depreciated) the copy button options that were in _ArrayDisplay() but they are now in _DebugArrayDisplay(). However, _ArrayDisplay() now always has a "data label" which may not always be wanted and _DebugArrayDisplay() has an "Exit Script" button that again may not always be wanted. I appreciate that we can all just customise these to our own needs but I wish to put forward a suggestion that ArrayDisplayInternals.au3 is modified to allow _DebugArrayDisplay() to have a couple of additional iFlags: $ARRAYDISPLAY_ONLYCOPYBUTTONS = 16 ; Only 'Copy' buttons displayed ... this used to be in the last version as: "16 = Only 'Copy' buttons displayed" $ARRAYDISPLAY_NODATALABELDISPLAY = 128 ; No data label displayed _ArrayDisplay() can perhaps be left as is for whatever the reason was that it was changed initially? For my own purposes, I've made this (minor) modification to Melba23 & JPM's UDF which I wish to suggest; it includes the bugfix found by Melba23 194070-bug-report ... ; #CONSTANTS# =================================================================================================================== Global Const $ARRAYDISPLAY_COLALIGNLEFT = 0 ; (default) Column text alignment - left Global Const $ARRAYDISPLAY_TRANSPOSE = 1 ; Transposes the array (2D only) Global Const $ARRAYDISPLAY_COLALIGNRIGHT = 2 ; Column text alignment - right Global Const $ARRAYDISPLAY_COLALIGNCENTER = 4 ; Column text alignment - center Global Const $ARRAYDISPLAY_VERBOSE = 8 ; Verbose - display MsgBox on error and splash screens during processing of large arrays Global Const $ARRAYDISPLAY_ONLYCOPYBUTTONS = 16 ; Only 'Copy' buttons displayed Global Const $ARRAYDISPLAY_NOBUTTONSDISPLAY = 32 ; No buttons displayed Global Const $ARRAYDISPLAY_NOROW = 64 ; No 'Row' column displayed Global Const $ARRAYDISPLAY_CHECKERROR = 128 ; return if @error <> 0 (avoid display after _Array*() errors) Global Const $ARRAYDISPLAY_NODATALABELDISPLAY = 256 ; No data label displayed Global Const $ARRAYDISPLAY_NORIGHTCLICK = 512 ; Disables ability to right-click a cell to copy its content Global Const $ARRAYDISPLAY_SUBTITLECOLOUR = 1024 ; Contrasts the subtitle with a light grey background Global Const $ARRAYDISPLAY_MAXTITLE = 2048 ; Maximize title width regardless of array width Global Const $_ARRAYCONSTANT_tagLVITEM = "struct;uint Mask;int Item;int SubItem;uint State;uint StateMask;ptr Text;int TextMax;int Image;lparam Param;" & _ "int Indent;int GroupID;uint Columns;ptr pColumns;ptr piColFmt;int iGroup;endstruct" ; =============================================================================================================================== ... beta_v3_3_17_1_ArrayDisplayInternals.au3 ArrayDisplayInternals.au3
-
The help text for the _ArrayDisplay function says: "Clicking on a column header sort it." I'm wondering why the sorting of hex numbers (specifically window handles like 0x12345678) is so wonky. Sample script: #include <Array.au3> Local $aList = WinList() _ArrayDisplay($aList) Clicking on the Col1 header to sort by window handle doesn't properly sort the list. As a workaround, I'm sorting the array by window handle before displaying it using _ArraySort. But I still wonder what's up with the ListView sorting. Workaround: #include <Array.au3> Local $aList = WinList() _ArraySort($aList, 0, 1, 0, 1) _ArrayDisplay($aList)
-
I have a small script that checks if users from certain security groups exist or are disabled in AD. For $j = Ubound ( $Users, 1 ) -1 To 0 Step -1 Switch _AD_IsObjectDisabled ( $Users[$j] ) Case 1 ClipPut ( $Users[$j] & " - account disabled; " ) Case 0 If @error = 1 Then ClipPut ( $Users[$j] & " - account not found; " ) Else ClipPut ( $Users[$j] & " - Ok; " ) EndIf EndSwitch $Clip = $Clip & @CRLF & ClipGet () Next $Data[$O][1] = $Clip The code works correctly, at the end I have a 2D array $Data with security group in column 1 and checked user accounts in columns 2. However, _ArrayDisplay ( $Data ) shows users in one row, despite I added @CRLF. When I write $Clip to a text file, user accounts are written as column. Isn't it possible to have multiple-line cell split by @CRLF in _ArrayDisplay?
-
Hi all, I've been away from Autoit for awhile but now I'm back trying to progress the accounting project I stopped and started several years ago. I've spent nearly two days trying to figure out this problem but alas I'm completely stumped. After the $aReadThisShelf array is created all elements can be accessed, however not to _ArrayDisplay(). _ArrayDisplay() hangs for a short period and then returns blank and the array is gone. What have I done to screw this up? All help will be most appreciated. As always I have to give this disclaimer - Please remember I'm an accountant and not a programmer Here's the code #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> Opt('MustDeclareVars', 1) Global $hCombo, $sThisShelf Global $sMyTesterFile = "Tester.ini" GUICreate("", 395, 78, 292, 124, $WS_POPUPWINDOW) $hCombo = GUICtrlCreateCombo("", 16, 24, 176, 25, BitOR($CBS_DROPDOWN, $CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) GUISetState(@SW_SHOW) Local $var = IniReadSectionNames($sMyTesterFile) Local $VenArray[$var[0] + 1] For $i = 1 To UBound($var) - 1 $VenArray[$i] = $var[$i] GUICtrlSetData(-1, $VenArray[$i]) Next GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") While 1 Local $nMsg $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam) ;#forceref $hWnd, $iMsg Local $hWndFrom, $iIDFrom, $iCode, $hWndCombo If Not IsHWnd($hCombo) Then $hWndCombo = GUICtrlGetHandle($hCombo) $hWndFrom = $ilParam $iIDFrom = BitAND($iwParam, 0xFFFF) $iCode = BitShift($iwParam, 16) Switch $hWndFrom Case $hCombo, $hWndCombo Switch $iCode Case $CBN_SELCHANGE $sThisShelf = GUICtrlRead($hCombo) Local $aReadThisShelf = IniReadSection($sMyTesterFile, $sThisShelf) _ArrayDisplay($aReadThisShelf, $sThisShelf & " has " & $aReadThisShelf[0][0] & " elements");here's the problem????? EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND Here's the tester.ini file [SHELF#1] Key1=Books Key2=paper Key3=shirts Key4=hats Key5=suits Key6=paperclips Key7=staples Key8=pens Key9=pencils Key11=erasers [SHELF#2] Key1=glasses Key2=plates Key3=saucers [SHELF#3] Key1=spoons Key2=knives Key3=bowls
-
I am running the production version of AutoIt 3.3.10.2 on Windows 7 Enterprise 64bit. I have found that _ArrayDisplay will go blank after several seconds. See the attached screen caps. The delay period is arbitrary. This occurs both in interpretive execution and in a compiled exe. This does not occur when I run the same code on a Windows XP SP3 machine with 3.3.10.2. The condition is consistent (for me) running the following code. #include <Array.au3> Dim $array[10] = ['Running Windows 7 Enterprise 64bit', 'Just wait 5 to 30 seconds or so.', _ 'This ArrayDisplay will go blank (grey).', 'Clicking in the display will refresh', _ 'individual lines.', 'See the screencaps.'] _ArrayDisplay($array)
-
_ArrayDisplay($aArray, "Window Title", "1:", 0, Default, "Column") ; Expected results are rows 1 to the end of the array, all columns. The result is rows 0-1, all columns. The API reference is here: https://www.autoitscript.com/autoit3/docs/libfunctions/_ArrayDisplay.htm Am I doing something wrong?
- 12 replies
-
- bug
- array display
-
(and 2 more)
Tagged with:
-
Hello guys! I have a little problem in one of my function/functions. Here is my code: Func IsVisible($handle) If BitAND(WinGetState($handle), 4) Then ;If Not BitAND(WinGetState($handle), 16) Then If BitAND(WinGetState($handle), 2) Then Return 1 Else Return 0 EndIf EndIf EndFunc ;==>IsVisible Func _GetWindows() ; Global $i = 12 ;Local $anumber = 0 / or use &i? Dim $VisibleWindows[1][2] = [["0", ""]] $AllWindows = WinList() For $i = 1 To $AllWindows[0][0] If IsVisible($AllWindows[$i][1]) Then If $AllWindows[$i][0] <> "" And $AllWindows[$i][0] <> "Program Manager" Then ReDim $VisibleWindows[UBound($VisibleWindows) + 1][2] $VisibleWindows[0][0] = $VisibleWindows[0][0] + 1 $VisibleWindows[($VisibleWindows[0][0])][0] = $AllWindows[$i][0] $VisibleWindows[($VisibleWindows[0][0])][1] = $AllWindows[$i][1] EndIf Else EndIf Next _ArrayDisplay($VisibleWindows, "Visible Windows") ;If WinClose("Visible Windows", "") = 1 Then Idle() EndFunc ;==>_GetWindows This should display all windows and their respective handels that WinList function can find, and display it in a "Visible Windows" titled arraydisplay. All good there, script runs as expected. I copied the code for the _GetWindows() from here, and implemented it with minimal changes as I recall (sorry I found it more then a month ago). My problem is that If I try to close the "Visible Windows" Window, the script just reopens anotherone, basicly the only thing I can do is terminate the script somehow after I started to display this. I'm pretty sure that there is something small that I miss, but since I can't really bend my mind around the _GetWindows array creation, I can't really pinpoint why it opens it again when I close it. (I try to used WinClose but thats just stupid since there is noproblem with closing, the problem is the reopening, realized that while I was writing it) Thank you for your help!
- 2 replies
-
- _ArrayDisplay
- arraydisplay
-
(and 1 more)
Tagged with:
-
Hi, Please look at the code below: #include <File.au3> #include <Array.au3> ; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ; #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiButton.au3> #include <GuiListView.au3> Global $hGUI = GUICreate("GUIx",283,120,-1,-1,-1,-1) GUISetBkColor(0xFFFFFF,$hGUI) $hListX = GUICtrlCreatelistview("ColumnX|ColumnY|ColumnZ",4,4,269,65,4,544) ; GUICtrlCreatelistview("ListX",7,4,269,65,-1,512) GUICtrlSetData(-1, "ColumnX|ColumnY|ColumnZ") $hButtonY = GUICtrlCreateButton("ButtonY",20,80,100,30,-1,-1) $hButtonZ = GUICtrlCreateButton("ButtonZ",160,80,100,30,-1,-1) GUISetState() While True $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $hButtonY AddRows() EndSwitch WEnd Func AddRows() Local $aFiles = _FileListToArray(@ScriptFullPath & '\FolderX', Default, Default, True) _ArrayDisplay($aFiles) Local $aContent[9] For $i = 0 To UBound($aFiles) - 1 MsgBox(0, "", $aFiles) $aContent = FileReadToArray($aFiles[$i]) Next For $i = 0 To UBound($aContent) - 1 Step 3 GUICtrlCreateListViewItem($aContent[$i] & '|' & $aContent[$i + 1] & '|' & $aContent[$i + 2], $hListX) Next EndFunc _ArrayDisplay at line no. 33 is not working, I don't know what is happening... Thanks in Advance, TD P.S Actually the code was for another question but while debugging the code, I encountered this problem
-
>Running:(3.3.10.2): #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=ArrayDisplayTest.exe #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Run_Tidy=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Array.au3> Local $List[10] $List[0] = "JPM" $List[1] = "Holger" $List[2] = "Jon" $List[3] = "Larry" $List[4] = "Jeremy" $List[5] = "Valik" $List[6] = "Cyberslug" $List[7] = "Nutster" $List[8] = "JdeB" $List[9] = "Tylo" _ArrayDisplay($List, "Test of _ArrayDisplay", "") ; 10 rows, all data _ArrayDisplay($List, "Test of _ArrayDisplay", "7") ; 8 rows, no data _ArrayDisplay($List, "Test of _ArrayDisplay", "7:") ; 3 rows, no data _ArrayDisplay($List, "Test of _ArrayDisplay", "|7") ; 10 rows, no data ;_ArrayDisplay($List,"Test of _ArrayDisplay", "|7:" ) ; ==> Variable subscript badly formatted.: _ArrayDisplay($List, "Test of _ArrayDisplay", "7|7") ; 8 rows, no data _ArrayDisplay($List, "Test of _ArrayDisplay", "5:7") ; 3 rows, no data ;_ArrayDisplay($List,"Test of _ArrayDisplay", "|5:7" ) ; ==> Variable subscript badly formatted.: ;_ArrayDisplay($List,"Test of _ArrayDisplay", "7|5:7" ) ; ==> Variable subscript badly formatted.: _ArrayDisplay($List, "Test of _ArrayDisplay", "5:7|7") ; 3 rows, no data ;_ArrayDisplay($List,"Test of _ArrayDisplay", "5:7|5:7" ) ; ==> Variable subscript badly formatted.:
- 14 replies
-
- _arraydisplay
- Variable subscript badly
-
(and 2 more)
Tagged with: