kara2004 Posted March 4, 2018 Share Posted March 4, 2018 Hi Jos, using your latest AutoIt3Wrapper-Script for compliing leads me to an error in line 2150: "... "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper_new.au3" (2150) : ==> Subscript used on non-accessible variable.: If $result[0] <> 1 Then __ConsoleWrite("+ UpdateResources other: $result[0] = " & $result[0] & " - LastError:" & _WinAPI_GetLastError() & ":" & _WinAPI_GetLastErrorMessage() & @CRLF) If $result^ ERROR" I added a debug line (MsgBox) after the command which shows me the vars used for DLL call and the return code: Case Else ; 10, 16, 24 *** RT_RCDATA, RT_VERSION and RT_MANIFEST *** and Other $tSize = FileGetSize($InpResFile) $tBuffer = DllStructCreate("byte Text[" & $tSize & "]") ; Create the buffer. $pBuffer = DllStructGetPtr($tBuffer) _WinAPI_ReadFile($hFile, $pBuffer, $tSize, $bread, 0) If $hFile Then _WinAPI_CloseHandle($hFile) If $bread > 0 Then $result = DllCall("kernel32.dll", "int", "UpdateResourceW", "ptr", $rh, $RType_Type, $RType, $RName_Type, $RName, "ushort", $RLanguage, "ptr", $pBuffer, "dword", $tSize) MsgBox(0, "DEBUG", "ts=" & $tSize & " rh=" & $rh & " rtt=" & $RType_Type & " rt=" & $RType & " rnt=" & $RName_Type & " rn=" & $RName & " rlng=" & $RLanguage & " -->" & @error) If $result[0] <> 1 Then __ConsoleWrite("+ UpdateResources other: $result[0] = " & $result[0] & " - LastError:" & _WinAPI_GetLastError() & ":" & _WinAPI_GetLastErrorMessage() & @CRLF) Return $result[0] EndIf Return 0 EndSwitch Result is a missing value ($RType_Type) which leads to error 1 in DllCall: "ts=568 rh=0x001C009C rtt= rt=16 rnt=long rn=1 rlng=1031 -->1" Using the same debug output in the previous version I get a correct value an the expected Array containing the results: "ts=568 rh=0x00E100F4 rtt=long rt=16 rnt=long rn=1 rlng=1031 -->0" Searching a little bit in the script I found two lines commented out for some reasons at line 1828 and 1829: ; set parameter types If IsString($RType) Then $RType_Type = "wstr" $RType = StringReplace(StringUpper($RType), "RT_", "") ; Else ; $RType_Type = "long" EndIf After re-enabling them to ; set parameter types If IsString($RType) Then $RType_Type = "wstr" $RType = StringReplace(StringUpper($RType), "RT_", "") Else $RType_Type = "long" EndIf the script works as before. If this solution is correct, please fix it - otherwise you have to take a look at your script whats going wrong. Greetings kara2004 Link to comment Share on other sites More sharing options...
Developers Jos Posted March 4, 2018 Developers Share Posted March 4, 2018 @jpm, Why did you comment this part in your update as that seems to cause issues? Is there a reason which we need to look at? @kara2004, Thanks for reporting. I have restored those 2 lines in the current Beta. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
jpm Posted March 4, 2018 Share Posted March 4, 2018 Yes I did, sorry my bad I was thinking the previous setting was always true Link to comment Share on other sites More sharing options...
Developers Jos Posted March 4, 2018 Developers Share Posted March 4, 2018 No problem... s..t happens SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
jpm Posted March 4, 2018 Share Posted March 4, 2018 There are 2 places Link to comment Share on other sites More sharing options...
Developers Jos Posted March 4, 2018 Developers Share Posted March 4, 2018 Check and updated! SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
kara2004 Posted March 4, 2018 Author Share Posted March 4, 2018 Hello Jos & jpm, that's a really quick fix. Thank you very much. kara2004 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now