Jump to content

I have two questions to do with _ArrayDisplay


 Share

Recommended Posts

I have two questions to do with _ArrayDisplay :

1. I am having a proper displaying pipe separated strings using _ArrayDisplay.

Regardless of the value I assign to GUIDataSeparatorChar, _ArrayDisplay does not show strings that are pipe separated?

( GUIDataSeparatorChar : Define the character which delimits subitems in GUICtrlSetData. The default character is '|'. )

Here is the example:

#include <Array.au3>
 
Local $avArray[10]
 
$avArray[0] = "JPM | A"
$avArray[1] = "Holger | A"
$avArray[2] = "Jon | A"
$avArray[3] = "Larry | A"
$avArray[4] = "Jeremy | A"
$avArray[5] = "Valik | A"
$avArray[6] = "Cyberslug | A"
$avArray[7] = "Nutster | A"
$avArray[8] = "JdeB | A"
$avArray[9] = "Tylo | A"
 
_ArrayDisplay($avArray, "$avArray set manually 1D")
_ArrayDisplay($avArray, "$avArray set manually 1D transposed", -1, 1)
 
AutoItSetOption( "GUIDataSeparatorChar", '=' )
_ArrayDisplay($avArray, "$avArray set manually 1D")
_ArrayDisplay($avArray, "$avArray set manually 1D transposed", -1, 1)
AutoItSetOption( "GUIDataSeparatorChar", Default )

Here is the output:

[0]|JPM | A
[1]|Holger | A
[2]|Jon | A
[3]|Larry | A
[4]|Jeremy | A
[5]|Valik | A
[6]|Cyberslug | A
[7]|Nutster | A
[8]|JdeB | A
[9]|Tylo | A
 
[0]|JPM | A|Holger | A|Jon | A|Larry | A|Jeremy | A|Valik | A|Cyberslug | A|Nutster | A|JdeB | A|Tylo | A
 
[0]|JPM | A
[1]|Holger | A
[2]|Jon | A
[3]|Larry | A
[4]|Jeremy | A
[5]|Valik | A
[6]|Cyberslug | A
[7]|Nutster | A
[8]|JdeB | A
[9]|Tylo | A
 
[0]|JPM | A|Holger | A|Jon | A|Larry | A|Jeremy | A|Valik | A|Cyberslug | A|Nutster | A|JdeB | A|Tylo | A

As you can see, regardless of the

AutoItSetOption( "GUIDataSeparatorChar", '=' )
usage, the output does not differ!

Any help?

2. could I use something like this

AutoItSetOption( "GUIDataSeparatorChar", Chr( 1 ) )
( note the Chr( 1 ) which is a non printable character ) so that it does not supress output of any printable character?
Link to comment
Share on other sites

First: What version of AutoIt?

Look at the Parameters for _ArrayDisplay()

AutoItSetOption( "GUIDataSeparatorChar", '=' )
_ArrayDisplay($avArray, "$avArray", -1, 0, "=")

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

First: What version of AutoIt?

Look at the Parameters for _ArrayDisplay()

AutoItSetOption( "GUIDataSeparatorChar", '=' )

I had a quick look at _ArrayDisplay code and see that if you don't specify the $sSeparator value, it init's it to "|"

That is why my code was "not working"

Thanks for the help!

I need to pass the $sSeparator value to what I was trying to set via 'GUIDataSeparatorChar'

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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