Jump to content

TheDcoder

Active Members
  • Posts

    7,103
  • Joined

  • Days Won

    88

Everything posted by TheDcoder

  1. @JohnOne , Thanks for the advice, I will try to understand your message and probably reply with an appropriate message. TD
  2. @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
  3. I have the same habit, I post stuff which I use in my code Looking forward for 2016, hopefully I can complete my project by that time
  4. @kcvinu If you remember, I did read the book and wrote a review, it was the last post in the thread until you posted
  5. COPYLEFT: © 2013 Freeware by "Exit" ALL WRONGS RESERVED
  6. Thanks, will look into the source
  7. 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
  8. This might help you
  9. @whyruhackingme C'mon little fela, I know that your are a cheeky little spammer
  10. 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
  11. 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
  12. 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
  13. @Kealper I get notifications in real time
  14. @Kealper Wow! Thanks was a nice piece of work ! I will add it to Q#4 P.S Please correct your code tags
  15. Hello J1 "Help with including a script" was about including a file in the sub directory , This is the opposite situation.
  16. @Seminko Did you try Recuva? It should recover files which have been recently deleted in mint condition , Not sure if it is capable of recovering over-written files
  17. @water Works like a charm! @Jfish water was right @trancexx I know that I have to include the file name at least
  18. Hello , X:\Root Folder\Sub Folder Root Folder contains the script to include in the script located in Sub Folder... Is it possible without specifying the exact path? #include "X:\Root Folder\Sub Folder" Thanks in Advance! TD
  19. @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
  20. 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
  21. I stumbled upon this bug too: The reproducer script is only 5 lines
  22. @ChaitanyaK Do you wan't to capture the StdOut & StdErr streams of a program?
×
×
  • Create New...