Jump to content

New _ArrayDisplay Beta code - comments and suggestions welcomed


Melba23
 Share

Recommended Posts

  • Moderators

boththose,

 

_ArrayDisplay that allows progression without user interaction

[...]

how about a 'Dont Block' parameter

That would require all sorts of Global variables and Adlib calls for the UDF to know what controls it was supposed to delete and when it was time to end - and that is just not going to happen. ;)

M23

Edited by Melba23
Typo

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

Iczer,

I have worked on your requests and this is the result:

- different title lengths --> different $iMinWidth. Not implemented - I am not adding all the API calls (either via the WinAPI #include file or via DllCall) to the function. I repeat that the main use I see for this function is debugging - the title is meant to be a quick reminder of the contents, not "War and Peace".

- $iMax_ColWidth gets applied only in case of GUI size gets greater than @DesktopWidth. Excellent suggestion and I think I have it working. :thumbsup:

- if GUI size still greater than @DesktopWidth, horizontal scrollbar appear. I have adjusted the code to allow for the possibility of a vertical scrollbar appearing - I now only get a horizontal scrollbar if really needed. Try changing the array dimensions to [15][5] and see what you get.

I have added the revised code to the first post - please check it out and see if it meets with your approval. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

But a timeout is feasible, if support is garnered?  Or is that out as well?

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

  • Moderators

boththose,

A timeout would easy to implement - if I were to be persuaded that there was a real need. But that is going to be pretty difficult seeing that (for the umpteenth time) my view that the function is essentially for debugging - and so in my experience is used to test whether the script should in fact progress at all! ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

you should certainly keep your logging, my thought was simply as an alternative to existing notification methods.  rather than a cluttered tooltip, console, or toast with hand selected info i could just pop the whole damn array for a period of time.

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

The more functionality you add, the higher the overhead. A debugging tool should have minimum overhead (as a matter of course). I like it plain and simple. The one thing I think the original _ArrayDisplay lacks is range limit options. Other than that it was just a bit buggy but quite useable. Range options would be fantastic for debugging large arrays. Far quicker with far less overhead and extremely useful.

Edited by czardas
Link to comment
Share on other sites

  • Moderators

czardas,

 

Range options would be fantastic for debugging large arrays

I will look into it today - at first glance it does not seem too difficult to implement. :)

And any eventual timeout I added would be an option, not a default, so your coffee making could remain unhurried. :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

It shouldn't be too difficult to implement. Being able to look at a small section of a 1,000,000 element array would be more useful than looking at the whole array in many situations. You might want to have start and stop parameters in 2 dimensions. Maybe pass an array with four values to reduce it to a single parameter - more complicated for beginners though. It's your call. I'm sure you can come up with something easy to understand and useful at the same time - you normally do.

Imagine you wanted to scan an array such as $aArray[1000][1000], 20 columns at a time in a For loop with Step 20. Does this give you any ideas? Even just using 2 parameters would be cool enough though. If it's adding too much complication, then keep it simple or leave it out. I was just thinking others might also find it useful besides myself.

Edited by czardas
Link to comment
Share on other sites

Edit: 1311231202 - New beta code - see post #3

Edit: 1311241345 - New beta code - see post #33

Edit: 1311241940 - New beta code - see post #42

You should link the posts for easier reading, no one wants to go through a couple of pages to get there.

>#3

>#33

>#42

"Just be fred, all we gotta do, just be fred."  -Vocaliod

"That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha

@tabhooked

Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation

Link to comment
Share on other sites

There are no errors from the tests I conducted on my system. I will leave it to others to shape this function as they see fit, as I see some use it in production code.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

I don't see a timeout feature as important. Either there is a human there in which case hitting Escape or closing the window is not overly painful, or there is noone in which case there is no point displaying anything.

About introducing range parameters, I don't like it that much either. My reasonning is that if one uses the function for debugging or for user's information/validation of a really large array (say 1 million rows), then yes there must be some kind of range limiting. But in my book this limit doesn't belong to the function.

If in your code you can provide range limiting parameters, then you can as easily clone a small part of the array where the issue lie and display just that with the function as it is now. The advantage here is that you can as well fill your problem array with non-contiguous rows, something which would be cumbersome in practice to pass as parameters.

Edited by jchd

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Either there is a human there in which case hitting Escape or closing the window is not overly painful, or there is noone in which case there is no point displaying anything.

 

 

Or the person (people) in front of the screen is not in front of a console,  as my current projects willl be on a wall in a SOC.  Many interrogative activities return arrays, and throwing up actionable data (to which they act on their own systems) to an audience is routine as the SIEM is watched.

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

I would say this is a specific case which has to be handled by custom code which requires cooperation between the core application and the function. This is not something in the realm of a standard UDF AFAICT.

Else we're going to end up making this function work like a departure flight display panel!

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

About introducing range parameters, I don't like it that much either. My reasonning is that if one uses the function for debugging or for user's information/validation of a really large array (say 1 million rows), then yes there must be some kind of range limiting. But in my book this limit doesn't belong to the function.

 

If in your code you can provide range limiting parameters, then you can as easily clone a small part of the array where the issue lie and display just that with the function as it is now. The advantage here is that you can as well fill your problem array with non-contiguous rows, something which would be cumbersome in practice to pass as parameters.

 

It was merely a suggestion. I hate waiting for listviews to populate with information to simply check everything seems to be in order. The only way to handle so much data is to loop through it and generally making one or two changes to each element. If I have ten loops and something seems broken, I throw in _ArrayDisplay after each loop to track down the issue. It's a simple one line coding solution. I think the advantages outweigh the disadvantages, but a special large array _ArrayDisplay with such features could be coded by myself anyway. Like I said, it's the only thing I miss.

Edit

Of course if nobody else want's such a feature, then fair enough.I would put it at the top of my priority list personally (even in place of existing features). :whisper: I do however appreciate that the parameter list is overpopulated already and this is more than enough reason to exclude range features.

Edited by czardas
Link to comment
Share on other sites

Non-Interaction can now be resolved as the beta version responds to _Timer_SetTimer (in the example, if you add it right after GUI creation you will see it does not work for the first call, but all subsequent ones until the error about not passing an array).  I concede that it is a hella custom concern, thanks for forcing me to explore the beta a tad more.

Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

  • Moderators

DatMCEyeBall,

When I want your advice on posting I will ask for it - until then..... :shhh:

boththose,

Glad you found a solution - I will drop any thought of a timeout. ;)

czardas,

 

I have added the "display range" code as  I can imagine it being useful and (importantly) it was not difficult to do.  The old $iItemLimit parameter has been replaced by $sArrayRange - this sets the required rows and columns as follows:

"3:7|5:9" shows rows 3 to 7 and columns 5 to 9 - both zero-based of course
 
Omitting the "|" or setting the parameter to "" or Default shows the entire array
 
Omitting a row/column range or using just a single digit without the ":" shows all of the rows/columns - e.g. "2-5|" will show all columns of rows 2-5.  Use "n:n" to display a single row/column
 

New code (with a bugfix for the column sizing) in the first post - let me know what you think. :)

 

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Well I'm grateful for you taking the time to try my suggestion. I like it very much. Of course if people prefer not to have this option, then maybe I was wrong. I will definately use it if you keep it the way it is. :)

Quite often I just want to make sure information looks right, and the old _ArrayDisplay isn't always up to the task. I think it stops displaying information after so many rows. With this implementation, that particular problem is solved. Not that I totally disagree with what jchd said earlier though.

Thanks again.

Edited by czardas
Link to comment
Share on other sites

end of the array
It can be seen that the array was truncated

[65526]|6552600.736737729981542|6552610.295807199319825
[~]|~|~
[91468]|6552700.730853760614991|6552710.955506943864748

-------------------

Heading with statistics

Local $iDimension = UBound($avArray, 0)
    If $sTitle = Default Then
        If $iDimension = 1 Then
            $sTitle = 'Array[' & UBound($avArray) & ']: ListView Display'
        Else
            $sTitle = 'Array[' & UBound($avArray) & '][' & UBound($avArray, 2) & ']: ListView Display'
        EndIf
    EndIf
Edited by AZJIO
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...