hevoxer Posted April 2, 2011 Share Posted April 2, 2011 Ohh, I forgot that the exe is compressed ;p thats why I didn't saw my string Link to comment Share on other sites More sharing options...
hevoxer Posted April 2, 2011 Share Posted April 2, 2011 I have compiled script to exe without UPX compression and there is my string inside, so function _ResourceGetAsString() didn't work Link to comment Share on other sites More sharing options...
taietel Posted April 2, 2011 Share Posted April 2, 2011 hevoxer, I have tested your script with a txt file and it works, after I have compile it. I'm on XP SP3 x86. taietel Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
hevoxer Posted April 2, 2011 Share Posted April 2, 2011 Starting AutoIt3Wrapper v.2.0.0.1 Environment(Language:0415 Keyboard:00000415 OS:WIN_XP/Dodatek Service Pack 3 CPU:X86 OS:X86) interesting what cause this bug? Link to comment Share on other sites More sharing options...
taietel Posted April 2, 2011 Share Posted April 2, 2011 I have different wrapper version (AutoIt3Wrapper v.2.0.1.34), but I don't think this is the cause... I will check tomorrow... Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
hevoxer Posted April 3, 2011 Share Posted April 3, 2011 (edited) ok, thanks! I also think so, maybe there is something wrong with dll library? I checked including resources with AutoIt3Wrapper v.2.0.1.24 and finally everything is fine, uff. I see my strings in message box. The strangest thing is that on the autoitscript download page ('http://www.autoitscript.com/site/autoit-script-editor/downloads/') there is still version 2.0.0.1 inside ScieTe install package and the newest Wrapper to download as separate file is 2.0.1.24. From where did you get version 2.0.1.34? At the end I would like to thank you taiatel for your attention without it I will never solve my problem. Edited April 3, 2011 by hevoxer Link to comment Share on other sites More sharing options...
taietel Posted April 3, 2011 Share Posted April 3, 2011 I am sorry for the delay, but I had problems with login on forum.hevoxer, I'm glad your problem was solved! Happy coding,taietel Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
Zedna Posted April 6, 2011 Author Share Posted April 6, 2011 I checked including resources with AutoIt3Wrapper v.2.0.1.24 and finally everything is fine, uff. I see my strings in message box. The strangest thing is that on the autoitscript download page ('http://www.autoitscript.com/site/autoit-script-editor/downloads/') there is still version 2.0.0.1 inside ScieTe install package and the newest Wrapper to download as separate file is 2.0.1.24. From where did you get version 2.0.1.34? For latest beta version look herehttp://www.autoitscript.com/autoit3/scite/download/beta_SciTE4AutoIt3/ Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search Link to comment Share on other sites More sharing options...
Aktonius Posted June 6, 2011 Share Posted June 6, 2011 Does anyone know why is my .jpg resized(bigger) after compilation? I am using everything as .jpg example from example.au3 Link to comment Share on other sites More sharing options...
Zedna Posted June 6, 2011 Author Share Posted June 6, 2011 Does anyone know why is my .jpg resized(bigger) after compilation?I am using everything as .jpg example from example.au3There are some posts about image from resource resizing in this topic.Solution wrote somebody more clever than me ;-)Please try to find it here, I can add that link to first post for others.If you don't find it I will try to find it later. Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search Link to comment Share on other sites More sharing options...
guinness Posted June 6, 2011 Share Posted June 6, 2011 I don't know if you knew Zedna, but the UDF is only compatible with x32. I recently found out after I compiled a Script for x64. Ones of these days I will sit down and have have a look through Resources UDF to see what the problems is UDF List:  _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Zedna Posted June 6, 2011 Author Share Posted June 6, 2011 I don't know if you knew Zedna, but the UDF is only compatible with x32. I recently found out after I compiled a Script for x64. Ones of these days I will sit down and have have a look through Resources UDF to see what the problems is Thanks!I can remember something with Unicode or X64 was discussed here already before, we tried API calls with W (widechar)and there was probably int instead of correct ptr_ datatype somewhere in DllCalls.Currently I have no acces to X64 for testing so thanks for help. Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search Link to comment Share on other sites More sharing options...
guinness Posted June 13, 2011 Share Posted June 13, 2011 (edited) I hope you don't mind but I edited _SetBitmapToCtrl() so now the value of -1 can be used for the last ControlID created, just like GUICtrlSetData(-1, "Update") & the Native Functions do.The idea came from a Function I created called Example use of Function:GUICtrlCreateLabel("", 5, 5, 40, 40) _ResourceSetImageToCtrl(-1, "EXAMPLE")Function:expandcollapse popupFunc _SetBitmapToCtrl($iControlID, $hBitmap) Local Const $BM_SETIMAGE = 0xF7, $BS_BITMAP = 0x0080, $GWL_STYLE = -16, $IMAGE_BITMAP = 0, $SS_BITMAP = 0xE, $STM_SETIMAGE = 0x0172 Local $hControlID, $hPreviousBitmap, $iControlID_BITMAP, $iControlID_SETIMAGE, $iStyle $hControlID = GUICtrlGetHandle($iControlID) If $hControlID = 0 Then Return SetError(1, 0, 0) EndIf $iControlID = _WinAPI_GetDlgCtrlID($hControlID) If @error Then Return SetError(2, 0, 0) EndIf Switch _WinAPI_GetClassName($iControlID) Case "Button" ; Button, Checkbox, Radiobutton, Groupbox $iControlID_SETIMAGE = $BM_SETIMAGE $iControlID_BITMAP = $BS_BITMAP Case "Static" ; Picture, Icon, Label $iControlID_SETIMAGE = $STM_SETIMAGE $iControlID_BITMAP = $SS_BITMAP Case Else Return SetError(3, 0, 0) EndSwitch ; Set SS_Bitmap/BS_Bitmap Style To The Control. $iStyle = _WinAPI_GetWindowLong($hControlID, $GWL_STYLE) If @error Then Return SetError(4, 0, 0) EndIf _WinAPI_SetWindowLong($hControlID, $GWL_STYLE, BitOR($iStyle, $iControlID_BITMAP)) If @error Then Return SetError(5, 0, 0) EndIf ; Set Image To The Control. $hPreviousBitmap = GUICtrlSendMsg($iControlID, $iControlID_SETIMAGE, $IMAGE_BITMAP, $hBitmap) ; _SendMessage($hControlID, $iControlID_SETIMAGE, $IMAGE_BITMAP, $hBitmap) If @error Then Return SetError(6, 0, 0) EndIf If $hPreviousBitmap Then _WinAPI_DeleteObject($hPreviousBitmap) EndIf Return 1 EndFunc ;==>_SetBitmapToCtrl Edited June 13, 2011 by guinness UDF List:  _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Zedna Posted June 14, 2011 Author Share Posted June 14, 2011 I hope you don't mind but I edited _SetBitmapToCtrl() so now the value of -1 can be used for the last ControlID created, just like GUICtrlSetData(-1, "Update") & the Native Functions do. The idea came from a Function I created called Example use of Function: GUICtrlCreateLabel("", 5, 5, 40, 40) _ResourceSetImageToCtrl(-1, "EXAMPLE") Nice. Thanks! I will add this to my Resources UDF. Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search Link to comment Share on other sites More sharing options...
Zedna Posted June 21, 2011 Author Share Posted June 21, 2011 (edited) New version, see first post. 2011-06-20 - fixed x64 compatibility (type: int->ptr) - internal change: FindResourceA -> FindResourceW (& type: str->wstr) - _SetBitmapToCtrl() --> $CtrlId parameter now supports also -1 (thanks guinness) - _WinAPI_LoadLibraryEx($DLL, $LOAD_LIBRARY_AS_DATAFILE) instead of _WinAPI_LoadLibrary($DLL) (thanks arcker) - added au3.user.calltips.api, au3.userudfs.properties (thanks guinness) - merged resource_au3.zip + resource_data.zip to one file resources.zip Thanks to all cooperating people! I will incorporate more tips for this UDF posted in this topic... Edited June 21, 2011 by Zedna Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search Link to comment Share on other sites More sharing options...
guinness Posted June 21, 2011 Share Posted June 21, 2011 Nice update. I forgot I did the tips I will be upgrading all my programs today so I will let you know of any problems I encounter. UDF List:  _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
guinness Posted June 21, 2011 Share Posted June 21, 2011 Zedna just one thing I've found so far is the UDF fails with #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6. I've edit my Version for now and used #forceref in some places. Thanks. UDF List:  _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Unc3nZureD Posted August 8, 2011 Share Posted August 8, 2011 (edited) I want to make a little universal tool. It's an injector - used to inejct DLLs into other programs. It depends on the user what is he/she using it for. I found a nice UDF for the inject so currently that's not a problem. So now I can easily make this tool. But my problem is the following: What if I want to inject my DLL to a given process without showing the dll to any1? So i have to use this resources UDF. But currently I can't understand the using of it. Can you give me a little help? _InjectDll($hWnd, $dllpath) I can set the hwnd, but how can I include the DLL to my program and after start, how to associate it to the $dllpath? Edited August 16, 2011 by Unc3nZureD Link to comment Share on other sites More sharing options...
Zedna Posted August 8, 2011 Author Share Posted August 8, 2011 _InjectDll($hWnd, $dllpath)I can set the hwnd, but how can I include the DLL to my program and after start, how to associate it to the $dllpath?Post link to sources of _InjectDll($hWnd, $dllpath) Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search Link to comment Share on other sites More sharing options...
marko001 Posted August 12, 2011 Share Posted August 12, 2011 Hi Zedna, I tried playing with your Resources.au3 but can't find a solution with this: expandcollapse popup#AutoIt3Wrapper_UseX64=n #AutoIt3Wrapper_Res_File_Add=test.bmp, rt_bitmap, TEST_BMP #include <ImageSearch.au3> #include <Resources.au3> Global $x=0,$y=0 Global $image = @ScriptDir & "\test.bmp" Sleep (1000) _normal() Sleep (1000) MouseMove(0,0,0) _with_ResourceGet() Sleep (1000) MouseMove(0,0,0) _with_ResourceGetAsImage() Sleep (1000) MouseMove(0,0,0) _with_ResourceGetAsBitmap() Func _with_ResourceGetAsBitmap() $hBmp = _ResourceGetAsBitmap("TEST_BMP", $RT_BITMAP);same results using ,$RT_RCDATA) if _ImageSearcharea($hBmp,1,1632,362,1755,409,$x,$y,100) = 1 Then MouseMove($x,$y,0) MsgBox(0,"Found","Found @ " & $x & " - " & $y & @CR) Else MsgBox(0,"Error","Not Found" & @CR) EndIf EndFunc Func _with_ResourceGetAsImage() $hBmp = _ResourceGetAsImage("TEST_BMP", $RT_BITMAP);same results using $RT_RCDATA) if _ImageSearcharea($hBmp,1,1632,362,1755,409,$x,$y,100) = 1 Then MouseMove($x,$y,0) MsgBox(0,"Found","Found @ " & $x & " - " & $y & @CR) Else MsgBox(0,"Error","Not Found" & @CR) EndIf EndFunc Func _with_ResourceGet() $hBmp = _ResourceGet("TEST_BMP", $RT_BITMAP) if _ImageSearcharea($hBmp,1,1632,362,1755,409,$x,$y,100) = 1 Then MouseMove($x,$y,0) MsgBox(0,"Found","Found @ " & $x & " - " & $y & @CR) Else MsgBox(0,"Error","Not Found" & @CR) EndIf EndFunc func _normal() if _ImageSearcharea($image,1,1632,362,1755,409,$x,$y,100) = 1 Then MouseMove($x,$y,0) MsgBox(0,"Found","Found @ " & $x & " - " & $y & @CR) Else MsgBox(0,"Error","Not Found" & @CR) EndIf EndFunc All three "Resource" functions return me "Not Found". Is there a solution or am I doing something wrong? Thanks, M. guestscripter 1 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