I don't know why but
exceed with their error codes~ Maybe this caused it reads 0x.. wrong i don't know how to fix this currently.
<snip di snip>
Normally there would be another Value then 0 or 1
With Autoit 18.104.22.168 a script like the one attached was reading the file "sync_config.db" of google drive, located at %LOCALAPPDATA%\Google\Drive returning into var $sCloudFolder the value "C:\Users\Adams\Google Drive".
Now, with Autoit 22.214.171.124, the same script, reading the same file, return into var a long string of characters.
I made a text version of the file using copy and paste to observe the correct behavior.
I think that the cause is the new method of decoding, but I could not figure out how to solve.
#include-once #include <FileConstants.au3> #include <Constants.au3> ; if the Google Drive configuration file exists, it is read If FileExists("sync_config.db") Then ; open the Google Drive configuration file in reading $Handle_GoogleDrive_R = FileOpen("sync_config.db", $FO_READ) If $Handle_GoogleDrive_R = -1 Then ; Check if file opened for reading OK MsgBox(0, "Error", "An error occurred when reading the file " & "sync_config.db") Exit EndIf ; reading Google Drive configuration file $File_GoogleDrive = FileRead($Handle_GoogleDrive_R) ConsoleWrite("$File_GoogleDrive = " & $File_GoogleDrive & @CR) ; find folder path initial position $Start = 1 $Find = "local_sync_root_pathvalue\\?\" $Result = StringInStr($File_GoogleDrive, $Find, 0, 1, $Start) ; find folder path final position $Start = $Result + 29 $Find = "" $Result = StringInStr($File_GoogleDrive, $Find, 0, 1, $Start) $Len = $Result - $Start ; folder for Google Drive Service $sCloudFolder = StringMid($File_GoogleDrive, $Start, $Len) ConsoleWrite("$sCloudFolder = " & $sCloudFolder & @CR) ; close Google Drive configuration file FileClose($Handle_GoogleDrive_R) EndIf