-
Posts
7,103 -
Joined
-
Days Won
88
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by TheDcoder
-
Maps 101: All you need to know about them!
TheDcoder replied to TheDcoder's topic in AutoIt Technical Discussion
@JohnOne , Thanks for the advice, I will try to understand your message and probably reply with an appropriate message. TD -
Maps 101: All you need to know about them!
TheDcoder replied to TheDcoder's topic in AutoIt Technical Discussion
@gil900 Arrays are arrays & Maps are maps, each of them have their own advantages and disadvantages, You can't simply 'compare' them! I am myself still discovering the usage of maps, I have stumbled upon 1 or 2 usage(s) until now... nothing worth mentioning here -
@kcvinu If you remember, I did read the book and wrote a review, it was the last post in the thread until you posted
-
COPYLEFT: © 2013 Freeware by "Exit" ALL WRONGS RESERVED
- 11 replies
-
- singlescript
- singleton
-
(and 1 more)
Tagged with:
-
Of course!
-
Thanks, will look into the source
-
Hello! I am trying to call my first DLL function but it won't work , I am trying to call GetFinalPathNameByHandle $sFile = @DesktopDir & '\Test.txt' $hFile = FileOpen($sFile) $sFilePath = "" DllCall("Kernel32.dll", "STR", "GetFinalPathNameByHandle", "HANDLE", $hFile, "sz*", $sFilePath) MsgBox(0, 0, @error)Thanks in Advance, TD
-
Can't Control the Device Manager
TheDcoder replied to Xichael's topic in AutoIt General Help and Support
This might help you -
Can't Control the Device Manager
TheDcoder replied to Xichael's topic in AutoIt General Help and Support
-
SITE FOUND ON MY PC HISTORY
TheDcoder replied to whyruhackingme's topic in AutoIt General Help and Support
@whyruhackingme C'mon little fela, I know that your are a cheeky little spammer -
Version v0.4
1,258 downloads
Hello Everyone! I made a UDF for the new Maps Datatype, I tried to follow Best Coding Practices & UDF-Specs while making this. Please note that this UDF is in very early stages. A thanks to @boththose for ideas on functions (like _Maps_IniToMap). If you have any suggestions, improvements, complaints, feature requests etc. Please don't hold back anything which can help improve this UDF! I will continue to develop this UDF as long as the Official AutoIt Dev Team adapts it (or makes another version of this UDF) . Enjoy! TD -
Hello Everyone! I made a UDF for the new Maps Datatype, I tried to follow Best Coding Practices & UDF-Specs while making this. Please note that this UDF is in very early stages. A thanks to @boththose for ideas on functions (like _Maps_IniToMap). If you have any suggestions, improvements, complaints, feature requests etc. Please don't hold back anything which can help improve this UDF! I will continue to develop this UDF as long as the Official AutoIt Dev Team adapts it (or makes another version of this UDF) . Enjoy! TD
- 22 replies
-
- maps
- new datatype
-
(and 2 more)
Tagged with:
-
Errors that make no sense... again!
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
-
Hello! , I am getting strange errors while making an example for a function in Maps UDF... Here is my script (AUTOIT BETA REQUIRED!): #include <StringConstants.au3> Example() Func Example() Local $aArray[5] = ["Foo", "Bar", "Baz", "Qux", "Norf"] ; This is the array to convert Local $sKeys = "Primary Place Holder;Secondary Place Holder;Tertiary Place Holder;Quaternary Place Holder;Quinary Place Holder" ; Keys in String Format Local $aKeys[5] = ["Primary Place Holder", "Secondary Place Holder", "Tertiary Place Holder", "Quaternary Place Holder", "Quinary Place Holder"] ; Keys in Array Format Local $mConvertedMap[] $mConvertedMap = _Map_1DArrayToMap($aArray, $sKeys) ; Convert Array To Map with Keys in String format ;_Map_Display($mConvertedMap, "Converted Array") ; Display Map $mConvertedMap = _Map_1DArrayToMap($aArray, $aKeys) ; Convert Array To Map with Keys in Array format ;_Map_Display($mConvertedMap, "Converted Array") ; Display Map EndFunc Func _Map_1DArrayToMap(ByRef $aArray, $vKeys, $sDelimiter = ';', $iInitialElement = 0) If IsString($vKeys) Then $vKeys = StringSplit($vKeys, $sDelimiter, $STR_NOCOUNT) ElseIf Not IsArray($vKeys) Return SetError(1, 0, False) EndIf If Not UBound($aArray, 0) = 1 Then Return SetError(2, 0, False) Local $iKeyCount = UBound($vKeys) Local $iElementCount = UBound($aArray) If Not $iKeyCount = ($iElementCount - $iInitialElement) Then Return SetError(3, 0, False) Local $mReturnMap[] Local $iErrorCount = 0 For $iElement = $iInitialElement To ($iElementCount - 1) + $iInitialElement ; $mReturnMap[$vKeys[$iElement]] = $aArray[$iElement] _Map_Append($mReturnMap, $vKeys[$iElement], $aArray[$iElement]) $iErrorCount += @error Next If $iErrorCount > 0 Then Return SetError(4, $iErrorCount, False) Return $mReturnMap EndFunc Func _Map_Append(ByRef $mMap, $vKey, $vContents) If MapExists($mMap, $vKey) Then Return SetError(1, 0, False) $mMap[$vKey] = $vContents Return True EndFunc ;==>_Map_AppendMy SciTE's Output: SciTE's Screenshot for better error recognition: Thanks in Advance, TD
-
Maps 101: All you need to know about them!
TheDcoder replied to TheDcoder's topic in AutoIt Technical Discussion
@Kealper I get notifications in real time -
Maps 101: All you need to know about them!
TheDcoder replied to TheDcoder's topic in AutoIt Technical Discussion
@Kealper Wow! Thanks was a nice piece of work ! I will add it to Q#4 P.S Please correct your code tags -
Is it possible to include file(s) in root folder?
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
Hello J1 "Help with including a script" was about including a file in the sub directory , This is the opposite situation. -
Is it possible to include file(s) in root folder?
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
@water Works like a charm! @Jfish water was right @trancexx I know that I have to include the file name at least -
@czardas If $iIntType = $ARRAYUNIQUE_AUTO Then Local $vFirstElem = ( ($iDims = 1) ? $aArray[$iBase] : $aArray[$iBase][$iColumn] ) If VarGetType($vFirstElem) = "Int64" Then $iIntType = $ARRAYUNIQUE_FORCE64 Else $iIntType = $ARRAYUNIQUE_FORCE32 EndIf EndIf
-
I polished @czardas's snippet further: If $iIntType = $ARRAYUNIQUE_AUTO Then Local $vFirstElem = ( ($iDims = 1) ? $aArray[$iBase] : $aArray[$iBase][$iColumn] ) Switch VarGetType($vFirstElem) Case "Int32" $iIntType = $ARRAYUNIQUE_FORCE32 Case "Int64" $iIntType = $ARRAYUNIQUE_FORCE64 Case Else $iIntType = $ARRAYUNIQUE_FORCE32 EndSwitchHope its not buggy
-
I stumbled upon this bug too: The reproducer script is only 5 lines