-
Posts
18 -
Joined
-
Last visited
Everything posted by Hackhers
-
Is it possible to Post'ing swipe message (WM_LBUTTONDOWN->WM_MOUSEMOVE->WM->WM_LBUTTONUP)
-
Is there any source for this ?
-
ImageSearch.dll missing source ?
Hackhers replied to Hackhers's topic in AutoIt General Help and Support
Bump -
Here is the au3 file: #include-once ; ------------------------------------------------------------------------------ ; ; AutoIt Version: 3.0 ; Language: English ; Description: Functions that assist with Image Search ; Require that the ImageSearchDLL.dll be loadable ; ; ------------------------------------------------------------------------------ ;=============================================================================== ; ; Description: Find the position of an image on the desktop ; Syntax: _ImageSearchArea, _ImageSearch ; Parameter(s): ; $findImage - the image file location or HBitmap to locate on the ; desktop or in the Specified HBitmap ; $tolerance - 0 for no tolerance (0-255). Needed when colors of ; image differ from desktop. e.g GIF ; $resultPosition - Set where the returned x,y location of the image is. ; 1 for centre of image, 0 for top left of image ; $x $y - Return the x and y location of the image ; ; $HBMP - optional hbitmap to search in. sending 0 will search the desktop. ; ; Return Value(s): On Success - Returns 1 ; On Failure - Returns 0 ; ; Note: Use _ImageSearch to search the entire desktop, _ImageSearchArea to specify ; a desktop region to search ; ;=============================================================================== Func _ImageSearch($findImage,$resultPosition,ByRef $x, ByRef $y,$tolerance, $HBMP=0) return _ImageSearchArea($findImage,$resultPosition,0,0,@DesktopWidth,@DesktopHeight,$x,$y,$tolerance,$HBMP) EndFunc Func _ImageSearchArea($findImage,$resultPosition,$x1,$y1,$right,$bottom,ByRef $x, ByRef $y, $tolerance,$HBMP=0) ;MsgBox(0,"asd","" & $x1 & " " & $y1 & " " & $right & " " & $bottom) If IsString($findImage) Then if $tolerance>0 then $findImage = "*" & $tolerance & " " & $findImage If $HBMP = 0 Then $result = DllCall("ImageSearchDLL.dll","str","ImageSearch","int",$x1,"int",$y1,"int",$right,"int",$bottom,"str",$findImage) Else $result = DllCall("ImageSearchDLL.dll","str","ImageSearchEx","int",$x1,"int",$y1,"int",$right,"int",$bottom,"str",$findImage,"ptr",$HBMP) EndIf Else $result = DllCall("ImageSearchDLL.dll","str","ImageSearchExt","int",$x1,"int",$y1,"int",$right,"int",$bottom, "int",$tolerance, "ptr",$findImage,"ptr",$HBMP) EndIf ; If error exit if $result[0]="0" then return 0 ; Otherwise get the x,y location of the match and the size of the image to ; compute the centre of search $array = StringSplit($result[0],"|") $x=Int(Number($array[2])) $y=Int(Number($array[3])) if $resultPosition=1 then $x=$x + Int(Number($array[4])/2) $y=$y + Int(Number($array[5])/2) endif return 1 EndFunc ;=============================================================================== ; ; Description: Wait for a specified number of seconds for an image to appear ; ; Syntax: _WaitForImageSearch, _WaitForImagesSearch ; Parameter(s): ; $waitSecs - seconds to try and find the image ; $findImage - the image to locate on the desktop ; $tolerance - 0 for no tolerance (0-255). Needed when colors of ; image differ from desktop. e.g GIF ; $resultPosition - Set where the returned x,y location of the image is. ; 1 for centre of image, 0 for top left of image ; $x $y - Return the x and y location of the image ; ; Return Value(s): On Success - Returns 1 ; On Failure - Returns 0 ; ; ;=============================================================================== Func _WaitForImageSearch($findImage,$waitSecs,$resultPosition,ByRef $x, ByRef $y,$tolerance,$HBMP=0) $waitSecs = $waitSecs * 1000 $startTime=TimerInit() While TimerDiff($startTime) < $waitSecs sleep(100) $result=_ImageSearch($findImage,$resultPosition,$x, $y,$tolerance,$HBMP) if $result > 0 Then return 1 EndIf WEnd return 0 EndFunc ;=============================================================================== ; ; Description: Wait for a specified number of seconds for any of a set of ; images to appear ; ; Syntax: _WaitForImagesSearch ; Parameter(s): ; $waitSecs - seconds to try and find the image ; $findImage - the ARRAY of images to locate on the desktop ; - ARRAY[0] is set to the number of images to loop through ; ARRAY[1] is the first image ; $tolerance - 0 for no tolerance (0-255). Needed when colors of ; image differ from desktop. e.g GIF ; $resultPosition - Set where the returned x,y location of the image is. ; 1 for centre of image, 0 for top left of image ; $x $y - Return the x and y location of the image ; ; Return Value(s): On Success - Returns the index of the successful find ; On Failure - Returns 0 ; ; ;=============================================================================== Func _WaitForImagesSearch($findImage,$waitSecs,$resultPosition,ByRef $x, ByRef $y,$tolerance,$HBMP=0) $waitSecs = $waitSecs * 1000 $startTime=TimerInit() While TimerDiff($startTime) < $waitSecs for $i = 1 to $findImage[0] sleep(100) $result=_ImageSearch($findImage[$i],$resultPosition,$x, $y,$tolerance,$HBMP) if $result > 0 Then return $i EndIf Next WEnd return 0 EndFunc But I cant find ImageSearchEx nor ImageSearchExt in cpp source any one have it ?
-
Yep thanks, Part that I don't know is why we use @4 at "_ultraDil@4" part, And Is there any way to use it like that by changing the c++ code: $serverLib = DllOpen(@ScriptDir & "/testserver.dll") $result = DllCall($serverLib, "str", "ultraDil", "str", "TR") MsgBox(0,"",$result[0]) DllClose($serverLib)
-
I use Visual Studio 2015 but Platform toolset is Visual Studio 2010
-
Hey there, Since DllCall is using stdcall as I see in forums I'm trying to change cdecl to stdcall but It still not working. Any ideas ? Auto IT code: $serverLib = DllOpen(@ScriptDir & "/TestServer.dll") $result = DllCall($serverLib, "str", "ultraDil", "str", "TR") DllClose($serverLib) C++ Code: #include <stdio.h> #include <windows.h> #include <iostream> #include <string.h> #define EOF (-1) #define debug true std::wstring s2ws(const std::string& s) { int len; int slength = (int)s.length() + 1; len = MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, 0, 0); wchar_t* buf = new wchar_t[len]; MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, buf, len); std::wstring r(buf); delete[] buf; return r; } char diller[6][3] = { "TR", "NE", "DE", "FR", "IT", "ES" }; char TRyazi[10][32] = { { "Bele" }, { "sla" }, { "rdu" }, { "Buyu" }, { "klan" }, { "" }, { "" }, { "" }, { "" }, { "" } }; TCHAR fileName[MAX_PATH + 1]; #ifdef __cplusplus // If used by C++ code, extern "C" { // we need to export the C interface #endif __declspec(dllexport) char* __stdcall ultraDil(char* a) { std::string dil(a); std::string dondur(""); std::string ekle("|"); int i = 0; for (i = 0; i < 10; i++) { if (dil.compare("TR") == 0) { dondur += TRyazi[i]; } dondur += ekle; } char * cstr = new char[dondur.length() + 1]; std::strcpy(cstr, dondur.c_str()); return cstr; } #ifdef __cplusplus } #endif
-
How to save bitmap inside dll (or load as HBitMap)
Hackhers replied to Hackhers's topic in AutoIt General Help and Support
Thank you ! -
How to save bitmap inside dll (or load as HBitMap)
Hackhers replied to Hackhers's topic in AutoIt General Help and Support
Thank you so much for response, but I dont want to show it on GUI can you please make it return as hHBitmap ? (Sorry if It's silly question I'm kinda confused) -
Hello, I'm trying to get bitmap image from DLL and load as HBitMap image but cant figure out how. So I tried to save it but still no luck. Here is dll, if you can give the load as hBitMap it will be the best ! #RequireAdmin #include <APIMiscConstants.au3> #include <APIResConstants.au3> #include <GUIConstantsEx.au3> #include <Memory.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> #include <WinAPIMisc.au3> #include <WinAPIRes.au3> Local Const $sJpg = @ScriptDir & '\sest.bmp' ; Load Resources.dll to memory Local $hInstance = _WinAPI_LoadLibraryEx(@ScriptDir & '\TestServer.dll', $LOAD_LIBRARY_AS_DATAFILE) If Not $hInstance Then MsgBox(BitOR($MB_ICONERROR, $MB_SYSTEMMODAL), 'Error', @ScriptDir & '\TestServer.dll') Exit EndIf ; Load JPEG resource from Resources.dll library Local $hResource = _WinAPI_FindResource($hInstance, 2, 106 ) Local $iSize = _WinAPI_SizeOfResource($hInstance, $hResource) Local $hData = _WinAPI_LoadResource($hInstance, $hResource) Local $pData = _WinAPI_LockResource($hData) MsgBox(0, default, "!" & $iSize & "!" & $hData & "!" ) ; Save resource to .bmp file Local $hFile = FileOpen($sJpg, 2 + 16) Local $tData = DllStructCreate('byte[' & $iSize & ']', $pData) FileWrite($hFile, DllStructGetData($tData, 1)) FileClose($hFile) TestServer.dll
-
How to make Au3Stripper_Ignore_Variables Work
Hackhers replied to Hackhers's topic in AutoIt General Help and Support
I'm already googled it like 10-20 times. But results is not much self explaning. I'm trying to make it work like 3 days now. I dont want any one to make a script for me or something challenging, all I want is just explain how it works. If I have enough knowledge about this I dont ask for paid support or write this kind text to him. May be you are right about I'm being impatient or whatever you call. If there is enough documentation I didn't even ask for help all I can find is these links and they are writing I already know. https://www.autoitscript.com/wiki/AutoIt3Wrapper_Directives https://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/Au3Stripper.html -
How to make Au3Stripper_Ignore_Variables Work
Hackhers replied to Hackhers's topic in AutoIt General Help and Support
No one ? It supposed to be easy not that hard -
Hey there I'm trying these code to Au3Stripper_Ignore_Variables work but It's not. #RequireAdmin #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator #AutoIt3Wrapper_Run_AU3Check=n #AutoIt3Wrapper_Tidy_Stop_OnError=n #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters #Au3Stripper_Ignore_Variables=BarbComp ArchComp GoblComp GiantComp WallComp WizaComp MiniComp HogsComp DragComp BallComp PekkComp HealComp ValkComp GoleComp WitcComp LavaComp CurBarb CurArch CurGiant CurGobl CurWall CurBall CurWiza CurHeal CurMini CurHogs CurValk CurGole CurWitc CurLava CurDrag CurPekk #Au3Stripper_Parameters=/mi 10 /rm /so #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****I already tried like $BarbCom $ArchComp... still nothing
-
I really appreciate your work Even AutoIt cant handle this error, because of that long line AutoIt gives wrong line number. It sees that line as 1 line but In editör It's not
- 432 replies
-
- encryption
- metacode
-
(and 3 more)
Tagged with:
-
Hey, I adressed the issue. It's problem with Curl.au3 library. You can get it from over here https://www.autoitscript.com/forum/topic/173067-curl-udf-autoit-binary-code-version-of-libcurl-with-ssl-support/
- 432 replies
-
- encryption
- metacode
-
(and 3 more)
Tagged with:
-
Hey, Im trying to fake google's mousedown event to get link but I dont have luck Here is my code #include <IE.au3> #include <MsgBoxConstants.au3> local $s_q = "autoit" local $i_resultnum = 100 local $lng = "tr" local $url = 'http://www.google.com/search?hl='&$lng&'&q=' & StringReplace(StringReplace($s_q, "+", "%2B"), " ", "+") & '&num=' & $i_resultnum ; $s_Source = _INetGetSource('http://www.google.com/search?hl='&$lng&'&q=' & StringReplace(StringReplace($s_q, "+", "%2B"), " ", "+") & '&num=' & $i_resultnum) $oIE = _IECreate($url, 0, 1) Local $oLinks = _IELinkGetCollection($oIE) Local $iNumLinks = @extended Local $sTxt = $iNumLinks & " links found" & @CRLF & @CRLF For $oLink In $oLinks if $oLink.href == "http://www.autoitscript.com/" Then MsgBox(0, default, "sadga") _IEAction($oLink, "focus") _IEAction($oLink, "blur") _IEAction($oLink, "click") EndIf Next
-
I cant make it work, I have tried bunch of things. I really cant understand what metadata and how to open it. But It seems its open already for me. (See: http://prntscr.com/8carro) After that I open codecrypter.au3 with these options http://prntscr.com/8cas85 Finally I got the error: http://prntscr.com/8casje I use windows 10
- 432 replies
-
- encryption
- metacode
-
(and 3 more)
Tagged with:
-
Hey, I need to convert saved bitmap file to hbitmap varaible how can I do that ?