Sign in to follow this  
Followers 0
BugFix

Collection of my own Array-UDF

2 posts in this topic

Hi,

I've posted some of my array UDF before.

But now, I'll show you all of my array UDF. May be that something is interesting for you.

It will be nice, if you give me response by finding bugs or too, if you like that.

Collection Of My Array-UDF

Included Functions:

_ArraySort_2ary()

sort an 2D array 2ary

_Array2DSortByLen()

sort 1D/2D array by length of entry

_Array2DDblDel()

delete double entrys in 1D/2D array

_Array2DInsert()

insert 1 entry (empty or filled with data) at given position

works with 1D/2D arrays

_Array2DSplit()

split 1D/2D array at given position in 2 arrays

optional will be export a given count of entrys to a target-array

_Array2DEmptyDel()

delete empty rows, in 2D array rows or optional columns

_Array2DJoin()

join 2 arrays to one, for 1D/2D -arrays, also among themselves

2nd dimension may be different

_Array2DDelete()

delete one row in an 1D/2D -array at given row-index

_Array2DSearch()

search for all or only one occurance of the search term in 1D/2D -array

return an array with index(es) of match(es)

_Array2DMirror()

to mirror an 2D-array, rows will be columns and contrary

_SubArray2DGetEntry()

return the value from an entry of an 1D/2D-array, which is also an entry in an 1D/2D-array

_SubArray2DSetEntry()

set the value to an entry of an 1D/2D-array, which is also an entry in an 1D/2D-array

ArrayMore.au3


Best Regards BugFix  

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

For those who use the full version of SciTe and wish for the following commands to show in the command popup box, I have created entries for <au3.user.calltips.api> and <au3.userudfs.properties> (Located in the api and properties folders)

Add the following to <au3.user.calltips.api>

_Array2DAdd(ByRef $Array, $iValue='Ex1|Ex2|Ex3') Redim Array Size and add an Array element to the last position (Requires: #Include <ArrayMore.au3>)
_Array2DDblDel(ByRef $Array [, $iCaseSens=0]) From a 1D/2D Array it will delete double entries (2D -> combination by '[n][0]' to '[n][x]') (Requires: #Include <ArrayMore.au3>)
_Array2DDelete(ByRef $Array, $iIndex) Delete one row of a given index in an 1D/2D Array (Requires: #Include <ArrayMore.au3>)
_Array2DEmptyDel(ByRef $Array [, $iCol=0]) Delete empty Array elements (Requires: #Include <ArrayMore.au3>)
_Array2DInsert(ByRef $Array, $iIndex [, $iValue='Ex1|Ex2|Ex3']) Inserts an Array element at a given position (Requires: #Include <ArrayMore.au3>)
_Array2DJoin(ByRef $1st_Array, ByRef $2nd_Array) Join 2 Arrays, 1D/2D can be mixed (Requires: #Include <ArrayMore.au3>)
_Array2DMirror(ByRef $Array) An array will mirrored rows and columns (Requires: #Include <ArrayMore.au3>)
_Array2DPop(ByRef $Array) Returns the last element of an 1D/2D-Array and deletes it (Requires: #Include <ArrayMore.au3>)
_Array2DPush(ByRef $Array, $iValue [, $iDirection=0]) Adds an array of values without changing the array size (Requires: #Include <ArrayMore.au3>)
_Array2DSearch(ByRef $Array, $iFind [, $iDim=-1 [, $iStart=0 [, $iEnd=0 [, $iCaseSens=0 [, $iPartialSearch=False [, $1stFound=False]]]]]]) Finds all entry's like $vWhat2Find in an 1D/2D Array (Requires: #Include <ArrayMore.au3>)
_Array2DSortByCountSameEntries(ByRef $Array [, $iCol=0 [, $iDescending=1]]) Sorts a 1D/2D Array by count of same entries (2D - in a given column) (Requires: #Include <ArrayMore.au3>)
_Array2DSortByLen(ByRef $Array [, $iDescending=0]) Sorts an 1D/2D Array by length (Requires: #Include <ArrayMore.au3>)
_Array2DSplit(ByRef $Array, ByRef $Array_Target, $iStart=-1 [, $ANZ=-1]) 1D/2D Split an array index, optional number is paged messages (Requires: #Include <ArrayMore.au3>)
_ArraySort_2ary(ByRef $Array [, $DIM_1st=0 [, $iDescending=0 [$iReverse=False]]]) Sort a 2D-Array 2-ary (Requires: #Include <ArrayMore.au3>)
_SubArray2DGetEntry(ByRef $Array, $iSubRow, $iParentRow [, $iSubCol=-1 [, $iParentCol=-1]) For Array with Array as an entry you get the determined entry (Requires: #Include <ArrayMore.au3>)
_SubArray2DSetEntry(ByRef $Array, $iValue, $iSubRow, $iParentRow [, $iSubCol=-1 [, $iParentCol=-1]) For Array with Array as an entry you set the determined entry (Requires: #Include <ArrayMore.au3>)

Add the following to <au3.userudfs.properties>

au3.keywords.user.udfs=_array2dadd _array2ddbldel _array2ddelete _array2demptydel _array2dinsert _array2djoin \
    _array2dmirror _array2dpop _array2dpush _array2dsearch _array2dsortbycountsameentries _array2dsortbylen \
    _array2dsplit _arraysort_2ary _subarray2dgetentry _subarray2dsetentry \

I see you have a more up to date version at http://autoit.de/index.php?page=Thread&postID=21161#post21161

The UDF is very helpful...Thanks!

Edited by guinness

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_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: 04/09/2015

Share this post


Link to post
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
Sign in to follow this  
Followers 0