mixim Posted November 10, 2021 Share Posted November 10, 2021 Hello all, my English isn't so good. I hope I can tell my request. I tried to do something in below but I couldn't find the solution. I need a little help. the similar items, i should do single for GUICtrlCreateCombo items Local $item = "DataA,DataB,DataA,DataC,DataD,DataC,DataD,DataE,DataC,DataD,DataB," Local $StSp = StringSplit($item, ",") For $i = 1 To $StSp[0] - 1 For $x = $i + 1 To $StSp[0] If StringCompare($StSp[$i], $StSp[$x], 1) = 0 Then ConsoleWrite("item " & $i & " " & $StSp[$i] & " and item " & $x & " " & $StSp[$x] & " are equal" & @CRLF) ; ConsoleWrite result: ; item 1 DataA and item 3 DataA are equal ; item 2 DataB and item 11 DataB are equal ; item 4 DataC and item 6 DataC are equal ; item 4 DataC and item 9 DataC are equal ; item 5 DataD and item 7 DataD are equal ; item 5 DataD And item 10 DataD are equal ; item 6 DataC And item 9 DataC are equal ; item 7 DataD And item 10 DataD are equal EndIf Next Next $item = "DataA,DataB,DataC,DataD,DataE" ; I want to get this result GUICreate("My GUI") Opt("GUIDataSeparatorChar", ",") Local $item = "DataA,DataB,DataA,DataC,DataD,DataC,DataD,DataE,DataC,DataD,DataB," GUICtrlCreateCombo("", 10, 10) GUICtrlSetData(-1, $item) GUISetState(@SW_SHOW) Do Until GUIGetMsg() = -3 Link to comment Share on other sites More sharing options...
jchd Posted November 11, 2021 Share Posted November 11, 2021 _ArrayUnique() is your friend, see help. mixim 1 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 hereRegExp tutorial: enough to get startedPCRE 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 More sharing options...
mixim Posted November 11, 2021 Author Share Posted November 11, 2021 11 hours ago, jchd said: _ArrayUnique() is your friend, see help. @jchd thank you. Yes, I did with _ArrayUnique(). Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now