youtuber Posted March 27, 2020 Share Posted March 27, 2020 (edited) Without the need for third party software like ResourceHacker. Spoiler As you can see in the picture, I want to make lang id value 2057, I tried it but there is no change. #AutoIt3Wrapper_Res_Language=2057 ;~ #AutoIt3Wrapper_Res_File_Add|SCRIPT, rt_rcdata, SCRIPT, 2057 There is an udf here and it is no longer supported, I don't know how to change it. https://www.autoitscript.com/forum/topic/162499-resourcesex-udf/?do=findComment&comment=1423358 Edited March 27, 2020 by youtuber Link to comment Share on other sites More sharing options...
Developers Jos Posted March 27, 2020 Developers Share Posted March 27, 2020 As far as I remember, AutoIt3Wrapper uses the "#AutoIt3Wrapper_Res_Language=2057" for the Version resource only. The RCDATA language setting is done by AutoIt3 itself and I don't see a #PRAGMA option for it. Why would the RCDATA language be changed for this block? 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...
youtuber Posted March 27, 2020 Author Share Posted March 27, 2020 (edited) 3 hours ago, Jos said: Why would the RCDATA language be changed for this block? The answer is in your question 😊 Why all sources have language code "2057" but SCRIPT source alone "0" ? https://prnt.sc/rntjed Edited March 27, 2020 by youtuber Link to comment Share on other sites More sharing options...
Developers Jos Posted March 27, 2020 Developers Share Posted March 27, 2020 ... but why do you need it to be 2057 for this resource..... In other words: why do you care? This resource is the script and doesn't set the language field.... So what? 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...
youtuber Posted March 27, 2020 Author Share Posted March 27, 2020 It just caught my attention, is it forbidden to change it? Link to comment Share on other sites More sharing options...
youtuber Posted March 30, 2020 Author Share Posted March 30, 2020 I did an experiment for this but it doesn't change I have an error in my codes expandcollapse popup#Include <WinAPI.au3> _UpdateResource(@ScriptDir & "\" & "AUTOIT.exe",10 ,"RCData",2057,False,"SCRIPT") Func _UpdateResource($sFile = "",$lpType = "" ,$lpName = "", _ $wLanguage = "",$bDiscard = False,$InpResFile = "") $hUpdate = _BeginUpdateResource($sFile) Local $result, $hFile, $tSize, $tBuffer, $pBuffer,$bread = 0 $hFile = _WinAPI_CreateFile($InpResFile, 2, 2) IF @error Then Return 0 $tSize = FileGetSize($InpResFile) IF @error Then Return 0 $tBuffer = DllStructCreate("char Text[" & $tSize & "]") IF @error Then Return 0 $pBuffer = DllStructGetPtr($tBuffer) IF @error Then Return 0 _WinAPI_ReadFile($hFile, $pBuffer, FileGetSize($InpResFile), $bread, 0) IF @error Then Return 0 _WinAPI_CloseHandle($hFile) IF @error Then Return 0 $result = DllCall("kernel32.dll","int","UpdateResource","hwnd",$hUpdate,"long",$lpType,"str",$lpName,"short",$wLanguage, _ "ptr",$pBuffer, _ "DWORD",$tSize) IF @error Then Return 0 Else _EndUpdateResource($hUpdate,$bDiscard) Return 1 EndIf EndFunc Func _BeginUpdateResource($sFile) $aReturn = DllCall("kernel32.dll","int","BeginUpdateResource","str",$sFile,"int",False) Return $aReturn[0] EndFunc Func _EndUpdateResource($hResource,$bDiscard = 0) $result = DllCall("kernel32.dll", "int", "EndUpdateResource", "int", $hResource, "int", $bDiscard) EndFunc 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