# Search the Community

Showing results for tags 'length'.

• ### Search By Tags

Type tags separated by commas.

### Forums

• General
• Announcements and Site News
• AutoIt v3
• AutoIt Help and Support
• AutoIt Technical Discussion
• AutoIt Example Scripts
• Scripting and Development
• Developer General Discussion
• Language Specific Discussion
• Operating System Deployment
• Windows Client
• Windows Server
• Office

### Categories

• AutoIt Team
• Beta
• MVP
• AutoIt
• Automation
• Databases and web connections
• Data compression
• Encryption and hash
• Games
• Hardware
• Information gathering
• Internet protocol suite
• Maths
• Media
• PDF
• Security
• Social Media and other Website API
• Windows
• Scripting and Development
• Operating System Deployment
• Windows Client
• Windows Server
• Office

• Forum FAQ
• AutoIt

### Calendars

• Community Calendar

• 0 Replies

• 0 Reviews

• 0 Views

Found 3 results

1. ## Array sort by length (1D)

Code is simple/selfexplanatory ... #include "Array.au3" \$a = StringSplit('aaa,b,cc', ',', 2) ; no_count _ArraySortLen(\$a) _ArrayDisplay(\$a, '\$a - without count') \$b = StringSplit('aaa,b,cc', ',') _ArraySortLen1(\$b) _ArrayDisplay(\$b, '\$b - with count') ; zero based array (without count at [0]) Func _ArraySortLen(ByRef \$aArr, \$iDescending = 0) Local \$j = UBound(\$aArr)-1 Local \$aTemp[\$j+1][2] For \$i = 0 To \$j \$aTemp[\$i][0] = StringLen(\$aArr[\$i]) \$aTemp[\$i][1] = \$aArr[\$i] Next _ArraySort(\$aTemp,\$iDescending) For \$i = 0 To \$j \$aArr[\$i] = \$aTemp[\$i][1] Next EndFunc ; one based array (with count at [0]) Func _ArraySortLen1(ByRef \$aArr, \$iDescending = 0) Local \$j = \$aArr[0] Local \$aTemp[\$j+1][2] For \$i = 1 To \$j \$aTemp[\$i][0] = StringLen(\$aArr[\$i]) \$aTemp[\$i][1] = \$aArr[\$i] Next _ArraySort(\$aTemp,\$iDescending,1) For \$i = 1 To \$j \$aArr[\$i] = \$aTemp[\$i][1] Next EndFunc
2. ## WMI Object Length

I'm trying to get the length of the WMI object I have created. I've tried using .count() and .length() to no avail. Can anyone shed some light on maybe something I'm missing? Local \$oWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2") If @error Then Return SetError(@error, 0, "") Local \$oItems = \$oWMIService.ExecQuery("SELECT * FROM Win32_PnPEntity WHERE Name LIKE '%(COM%)'", "WQL", 48) MsgBox(0, "", "Number of Ports: " & \$oItems)
3. ## Is it possible counting inputbox chars?

Hi, i wanted to make inputbox password, need to get it's chars length in it, because the "password char" is too secure and i need the user to know if he is writing or not!! here's my effort Global \$length, \$Pw \$Pw = InputBox("Security", "Type password to Encrypt/Decrypt file." & @CRLF & "Notice: password case sensitive" & @CRLF & "Pw length: " & \$length, "", "ٌ", 220, 150) \$length = StringLen(\$Pw) MsgBox(0, "", \$length) i tried to put \$length above \$Pw but didn't work too. thanks
×

• Wiki

• Back

• #### Beta

• Git
• FAQ
×
• Create New...