-
Posts
34,880 -
Joined
-
Days Won
346
Jos last won the day on September 30
Jos had the most liked content!
About Jos

Profile Information
-
Member Title
Je maintiendrai
Jos's Achievements
-
argumentum reacted to a post in a topic:
Avoid "AutoIt Error" message box in unknown errors
-
donnyh13 reacted to a post in a topic:
Avoid "AutoIt Error" message box in unknown errors
-
Modifying individual bytes in a binary string
Jos replied to MattHiggs's topic in AutoIt General Help and Support
Something like this (untested) ?: $key = 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' $settingKey = 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3' $setting = RegRead($settingKey, "Settings") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $setting = ' & $setting & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console ; Get Dec value of byte 9 and bitor with 1 $val = BitOR(Dec(BinaryMid($setting, 9, 1)), 1) ; replace the 9th bunary value in the string $setting = StringReplace($setting, 18, hex($val,2)) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $setting = ' & $setting & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console ps: settings[8] is the 9th Hex2 value as the array is a 0 based array, meaning 0 is the first item, so 8 is the 9th item. -
Alternatively, you can do something like this to add an location to the Json array: #include "Json.au3" ConsoleWrite("- Test8() : " & Test8() & @CRLF) Func Test8() ; Your three JSON strings Local $Json1 = '{"name":"John","age":30,"locations":[]}' Local $Json2 = '{"City":"Paris","Country":"France"}' Local $Json3 = '{"City":"London","Country":"England"}' Local $obj1 = Json_Decode($Json1) AddLocation($obj1, $Json2) AddLocation($obj1, $Json3) Local $final = Json_Encode($obj1, $JSON_PRETTY_PRINT) ConsoleWrite($final & @CRLF) EndFunc ;==>Test8 Func AddLocation(ByRef $oObj,$iJson) Local $iObj = Json_Decode($iJson) Local $City = Json_get($iObj,'.City') Local $Country = Json_get($iObj,'.Country') ; Find first free slot $loccount = 0 for $Locations in Json_ObjGet($oObj, "locations") ;~ ConsoleWrite('$oObj.locations = ' & Json_Get($Locations, ".City") & "-" & Json_Get($Locations, ".Country") & @CRLF) $loccount += 1 Next Json_Put($oObj,".locations[" & $loccount & "].City",$City) Json_Put($oObj,".locations[" & $loccount & "].Country",$Country) EndFunc - or a bit more compact version: #Region ; *** Dynamically added Include files *** #include <APILocaleConstants.au3> ; added:11/17/25 16:18:54 #EndRegion ; *** Dynamically added Include files *** #include "Json.au3" ConsoleWrite("- Test8() : " & Test8() & @CRLF) Func Test8() ; Your three JSON strings Local $Json1 = '{"name":"John","age":30,"locations":[]}' Local $Json2 = '{"City":"Paris","Country":"France"}' Local $Json3 = '{"City":"London","Country":"England"}' Local $obj1 = Json_Decode($Json1) AddLocation($obj1, $Json2) AddLocation($obj1, $Json3) Local $final = Json_Encode($obj1, $JSON_PRETTY_PRINT) ConsoleWrite($final & @CRLF) EndFunc ;==>Test8 Func AddLocation(ByRef $oObj,$iJson) Local $iObj = Json_Decode($iJson) local $loccount = UBound(Json_ObjGet($oObj, "locations")) Json_Put($oObj,".locations[" & $loccount & "].City",Json_get($iObj,'.City')) Json_Put($oObj,".locations[" & $loccount & "].Country",Json_get($iObj,'.Country')) EndFunc
-
mLipok reacted to a post in a topic:
A Non-Strict JSON UDF (JSMN)
-
Avoid "AutoIt Error" message box in unknown errors
Jos replied to EKY32's topic in AutoIt General Help and Support
I am just supporting the au3stripper questions in this thread. So without looking at the details it is pretty simple to me: Does the original script work?: if Yes: Does au3stripper run cleanly without any warnings? if Yes: The stripped script should work as the original if No: You are responsible and "don't come crying to me" when you override the default to continue with force! 😉 -
Avoid "AutoIt Error" message box in unknown errors
Jos replied to EKY32's topic in AutoIt General Help and Support
No you did not, because au3stripper doesn't know that this line is meant for the variable $vNewFunction! I hope it is clear that au3stripper isn't trying to figure out what the content of a variable could be..... all making sense now? -
Avoid "AutoIt Error" message box in unknown errors
Jos replied to EKY32's topic in AutoIt General Help and Support
...and why would you assume it should stop showing the warning? How should au3stripper know that you "resolved" the issue while it simply sees a variable $vNewFunction and doesn't have the foggiest idea what its content is? Z:\!!!_SVN_AU3\_TEST_Not_Related_to_UDF\54081-avoid-autoit-error-message-box-in-unknown-errors#comment-1547329.au3(95,1): Warning for line:DllStructSetData($tFunctionOffset, 1, DllCallbackGetPtr(DllCallbackRegister($vNewFunction, $sRet, $sParams))) -
Something like this ? #include "Json.au3" ConsoleWrite("- Test8() : " & Test8() & @CRLF) Func Test8() ; Your three JSON strings Local $Json1 = '{"name":"John","age":30,"locations":[]}' Local $Json2 = '{"City":"Paris","Country":"France"}' Local $Json3 = '{"City":"London","Country":"England"}' ; Decode Local $obj1 = Json_Decode($Json1) Json_ObjPut($obj1,"locations", Json_Decode("[" & $Json2 & "," & $Json3 & "]")) Local $final = Json_Encode($obj1, $JSON_PRETTY_PRINT) ConsoleWrite($final & @CRLF) EndFunc ;==>Test8
-
Avoid "AutoIt Error" message box in unknown errors
Jos replied to EKY32's topic in AutoIt General Help and Support
Seems you have wrong expectation of the option c & f. Option c means: In case of Au3Stripper error, we will continue, but with the ORIGINAL input source. Option f means: In case of Au3Stripper error, you think you understand what you are doing and are willingly wanting the possible failing source in the compiled script! This is clearly stated in the output! Output with option c Output with option f So simply use the scriptfile_stripped.au3 generated and check why things are different/failing, but you should have already a pretty good hint: -
Avoid "AutoIt Error" message box in unknown errors
Jos replied to EKY32's topic in AutoIt General Help and Support
Just tell me first what isn't working with the "#AutoIt3Wrapper_Au3Stripper_OnError=f", so I understand, as I tried it and to me all is working as expected! 😉 -
selevo reacted to a post in a topic:
SciTE not start (AutoIt v3.3.18.0 ZIP) win7 x64
-
SciTE not start (AutoIt v3.3.18.0 ZIP) win7 x64
Jos replied to selevo's topic in AutoIt Technical Discussion
You're probably missing the proper vc_redist dll's since you're on such old OS. https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 -
Avoid "AutoIt Error" message box in unknown errors
Jos replied to EKY32's topic in AutoIt General Help and Support
Is this a fact or your guess as I don't see any proof during my quick scan of this thread, or did I miss that? -
Avoid "AutoIt Error" message box in unknown errors
Jos replied to EKY32's topic in AutoIt General Help and Support
Sorry, hadn't seen this one as I was avoiding this topic after seeing only questions and no clear answers! Anyway, no idea what you are asking me, as I do not know what "doesn't work" means and am too lazy to start trying to sort out what it could mean! 😉 -
SciTE on Windows 11 Doesn't have Alt-Space Menu
Jos replied to RichardL's topic in AutoIt Technical Discussion
On Win11 Home Alt and the Space work fine for me with SciTE 32 v5.5.6. -
Avoid "AutoIt Error" message box in unknown errors
Jos replied to EKY32's topic in AutoIt General Help and Support
Nice to see such a descriptive result. I am sure you will figure it out. -
Avoid "AutoIt Error" message box in unknown errors
Jos replied to EKY32's topic in AutoIt General Help and Support
For starters: disable upx and try again as often the AV on your system will stop Programs that used upx. -
MoriceGrene reacted to a post in a topic:
simple questions not remember
-
Did you search & update? 😉