Jump to content

DerPensionist

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by DerPensionist

  1. Please provide changes in JSON(2018.10.01b).zip Member JSON.au3 Line 512 old: Line 512 new or add "Local" to Line 515 to avoid Message: ======================================== Member Json_Test.au3 . to prettify Lines 29 & 30 are part of "Test2", change "Test3" to "Test2" thx
  2. It was bad comunicated by me. I think it should not be necessary for all beginners to read all "Change History" entries. The help should have soon or later all information. And there is no documentation that this function also conversts the hexstring from UTF8 to ANSI.
  3. I do not believe that everybody has always to check "Check History" and "Script Breaking Changes", but can expect that helpfile has all required information. Version v3.3.12,1 used internal StringToBinary($sHex) with default flag : $SB_ANSI (1) = binary data is ANSI (default) in v3.3.14.1 changed to StringToBinary($sHex,$SB_UTF8) (4) = binary data is UTF8 this has signifant changes in result. (all invalid ANSI values changing to 0x3F) Modified routine seems to work as _HexUFT8ToANSI() wich assumes input UFT8 encoded. I beleave terms of "Hex" and "Binary" are indepent of encoding UTF8/ANSI. Anyway in older version was $var == _StringToHex(_HexToString($var)) was always tru. With new release no longer, if string contains any Non-ANSI charachter. HTML input contains somtimes some.
  4. Sorry, I wanted explain the big change. (File written in binary, and has nothing to do with the conversion)
  5. Autoit v3.3.14.1 converts hexstring not only to string but also to UTF8. Conversion to UTF8 is undocumented in helpfile. This change is in some cases very essential! This should be documented, or much better add an aditional parameter (flag of BinaryToString) to the function. Up to Autoit v3.3.12.1 worked fine, since v3,3,14.1 give wrong results. Example: string: "0xFFD8FFE000104A464946" ......JFIF v3.3.12.1: FFD8FFE000104A464946 correct v3.3.14.1: EFBFBDEF0104A464946 confusing ! or with an longer string long string: 3F3F3F3F0010..... and this is a wrong JPG-file
  6. Missing Declaration of "$sRet" in Function "_FFCmd" causes error if 'AutoItSetOption("MustDeclareVars", 1)' is set. Please add in FF.Au3 at line 2325: Local $sRet ff_0.6.0.1b-14.patch
  7. Sorry i found my misinterpretig.
  8. This code seems not to work as designed. first example returns 0 and adds the new array entries 1-3 second example returns 3 (old Ubound) and no changes of array. #include <Array.au3> Global $aArray_1[3] = [1, 2, 3] Global $aArray_2[3] = [4, 5, 6] Global $aContainer[0] $rc1=_ArrayAdd_Mod($aContainer, $aArray_1, Default, Default, Default, "Array") ; Add as a single element $er1=@error $rc2=_ArrayAdd_Mod($aContainer, $aArray_2) ; Add as separate elements $er2=@error ; See results _ArrayDisplay($aContainer, "Container="& $rc1 &"["&$er1&"]", Default, 8) _ArrayDisplay($aContainer[0], "Array= "& $rc2 &"["&$er2&"]", Default, 8) ; If $vValue is an array and $vDataType = "array" - then for a 1D array it is added as a single element Func _ArrayAdd_Mod(ByRef $avArray, $vValue, $iStart = 0, $sDelim_Item = "|", $sDelim_Row = @CRLF, $vDataType = 0) If $iStart = Default Then $iStart = 0 If $sDelim_Item = Default Then $sDelim_Item = "|" If $sDelim_Row = Default Then $sDelim_Row = @CRLF If $vDataType = Default Then $vDataType = 0 If Not IsArray($avArray) Then Return SetError(1, 0, -1) Local $iDim_1 = UBound($avArray, $UBOUND_ROWS) Switch UBound($avArray, $UBOUND_DIMENSIONS) Case 1 If IsArray($vValue) Then If UBound($vValue, $UBOUND_DIMENSIONS) <> 1 Then Return SetError(5, 0, -1) If String($vDataType) <> "ARRAY" Then $vDataType = 0 EndIf Else Local $aTmp = StringSplit($vValue, $sDelim_Item, $STR_NOCOUNT + $STR_ENTIRESPLIT) If UBound($aTmp, $UBOUND_ROWS) = 1 Then $aTmp[0] = $vValue $vDataType = 0 EndIf $vValue = $aTmp EndIf If String($vDataType) = "ARRAY" Then ReDim $avArray[$iDim_1 + 1] $avArray[$iDim_1] = $vValue Return $iDim_1 Else Local $iAdd = UBound($vValue, $UBOUND_ROWS) ReDim $avArray[$iDim_1 + $iAdd] For $i = 0 To $iAdd - 1 If IsFunc($vDataType) Then $avArray[$iDim_1 + $i] = $vDataType($vValue[$i]) Else $avArray[$iDim_1 + $i] = $vValue[$i] EndIf Next Return $iDim_1 + $iAdd - 1 EndIf Case 2 Local $iDim_2 = UBound($avArray, $UBOUND_COLUMNS) If $iStart < 0 Or $iStart > $iDim_2 - 1 Then Return SetError(4, 0, -1) Local $iValDim_1, $iValDim_2 If IsArray($vValue) Then If UBound($vValue, $UBOUND_DIMENSIONS) <> 2 Then Return SetError(5, 0, -1) $iValDim_1 = UBound($vValue, $UBOUND_ROWS) $iValDim_2 = UBound($vValue, $UBOUND_COLUMNS) $vDataType = 0 Else ; Convert string to 2D array Local $aSplit_1 = StringSplit($vValue, $sDelim_Row, $STR_NOCOUNT + $STR_ENTIRESPLIT) $iValDim_1 = UBound($aSplit_1, $UBOUND_ROWS) StringReplace($aSplit_1[0], $sDelim_Item, "") $iValDim_2 = @extended + 1 Local $aTmp[$iValDim_1][$iValDim_2], $aSplit_2 For $i = 0 To $iValDim_1 - 1 $aSplit_2 = StringSplit($aSplit_1[$i], $sDelim_Item, $STR_NOCOUNT + $STR_ENTIRESPLIT) For $j = 0 To $iValDim_2 - 1 $aTmp[$i][$j] = $aSplit_2[$j] Next Next $vValue = $aTmp EndIf ; Check if too many columns to fit If UBound($vValue, $UBOUND_COLUMNS) + $iStart > UBound($avArray, $UBOUND_COLUMNS) Then Return SetError(3, 0, -1) ReDim $avArray[$iDim_1 + $iValDim_1][$iDim_2] For $iWriteTo_Index = 0 To $iValDim_1 - 1 For $j = 0 To $iDim_2 - 1 If $j < $iStart Then $avArray[$iWriteTo_Index + $iDim_1][$j] = "" ElseIf $j - $iStart > $iValDim_2 - 1 Then $avArray[$iWriteTo_Index + $iDim_1][$j] = "" Else If IsFunc($vDataType) Then $avArray[$iWriteTo_Index + $iDim_1][$j] = $vDataType($vValue[$iWriteTo_Index][$j - $iStart]) Else $avArray[$iWriteTo_Index + $iDim_1][$j] = $vValue[$iWriteTo_Index][$j - $iStart] EndIf EndIf Next Next Case Else Return SetError(2, 0, -1) EndSwitch Return UBound($avArray, $UBOUND_ROWS) - 1 EndFunc ;==> _ArrayAdd_Mod on the otherhand literal "Array" as keyword to use an array as string ? I beleave "String" would be more descriptive.
  9. Missing very usefull/required argument "TextToDisplay" of UDF "_Excel_RangeLinkAddRemove" Is there any reason not implement this argument? To add an significant short meaningfull content to the cell instead of very long URL. Solution simple, only addconditional Argument.
  10. Ok, "Visible" is at _Excel_Open() , but specialy at _Excel_BookSaveAs() seems to be handy "DisplayAlerts" to force write even book exists.
  11. Where are any information/documentation about handling removed "Visible" & "Alert" options of Book- ans Sheet-functions?
  12. I passed an "empty array" and NOT a string varable.
  13. Behaviour of Autoit seems for me in this case a bit strange. When the UDF expects an array, specialy using ByRef, then means for me the array would be updatet, even there is nothing to update. But anyway, accepted. p.s.: I red changelog: "Added: Empty arrays." was not so meaningfull. So I looked in "#include <array.au3>" and the second function seems to return inorrect values if "emty array" is input: Dim $aArray[0] ConsoleWrite(@cr & "==> @error:" &@error & @TAB & "Result:'" & $rc & "'" & @cr) ==> @error:3 Result:'-1' expected : ==> @error:0 Result:''
  14. not yet. Why destroy _FileReadToArray my global defined array, and changes it to string? I can't find anything about returning a string in the dokumentation. On the otherhand it worked erarlier incorrect? But anyway, this is the result of missing empty arrays and returning strings instead. (p.s. the 0/1 problem was only by preparing the sample.)
  15. _FileReadToArray delets targetarray if FileReaf fails. This is new in Autoit 3.3.12.0 an seems to be an error. If $FRTA_COUNT=on(default) should @error set and existing $array[0] set to 0. simple code like this: {{{ #include <file.au3> Global $aSEN[1] ; SendungsTabelle: Beg(Datum,Uhrzeit),End(Datum Uhrzeit),Kanal,Titel,Bemerkungen... Global $uSEN=Ubound(SEN,1) ;---------------- Channel-Tabelle Global $fSEN = @ScriptName & ".CSV" ; Sendungs-Datei If Not _FileReadToArray($fSEN, $aSEN,$FRTA_COUNT ) Then ;MsgBox(4096, "Error", " Fehler lesen SEN-Datei error:" & @error) ReDim $aSEN[1] ;result 3.3.12.0 ==> "ReDim" used without an array variable.: $aSEN[1] = "1900/01/01 00:00" EndIf $uSEN = UBound($aSEN, 1) }}} worked fine till the new version. Is this a bug ?
×
×
  • Create New...