Jump to content

Kore

Members
  • Posts

    10
  • Joined

  • Last visited

Kore's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. thx just was wondering if it was possible or not. I will try some methods.
  2. Is it possible to use "mousedrag" on two windows at the same time? Or is it only one window at a time as there is only one mouse.
  3. Thx got it working BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST)
  4. Oh nm, $hGUI = GUICreate($sTitle, $width, $height, $iX, $iY, $WS_POPUP, $WS_EX_LAYERED)
  5. Do i add that to the Func _GUICreate_Alpha?
  6. #include <GDIPlus.au3> #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> #include <StaticConstants.au3> Global Const $AC_SRC_ALPHA = 1 Opt("GUIOnEventMode", 1) _GDIPlus_Startup() $pngSrc = @ScriptDir & "\line.png" GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST") $GUI = _GUICreate_Alpha("Look at the shiny", $pngSrc) GUISetState() GUICtrlSetState(1, $GUI_ONTOP) While 1 Sleep(100) WEnd Func _GUICreate_Alpha($sTitle, $sPath, $iX=276, $iY=780, $iOpacity=255) Local $hGUI, $hImage, $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend $hImage = _GDIPlus_ImageLoadFromFile($sPath) $width = _GDIPlus_ImageGetWidth($hImage) $height = _GDIPlus_ImageGetHeight($hImage) $hGUI = GUICreate($sTitle, $width, $height, $iX, $iY, $WS_POPUP, $WS_EX_LAYERED) $hScrDC = _WinAPI_GetDC(0) $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC) $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap) $tSize = DllStructCreate($tagSIZE) $pSize = DllStructGetPtr($tSize) DllStructSetData($tSize, "X", $width) DllStructSetData($tSize, "Y", $height) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha", $iOpacity) DllStructSetData($tBlend, "Format", 1) _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, 2) _WinAPI_ReleaseDC(0, $hScrDC) _WinAPI_SelectObject($hMemDC, $hOld) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteObject($hImage) _WinAPI_DeleteDC($hMemDC) EndFunc ;==>_GUICreate_Alpha Is there a way to make $GUI = _GUICreate_Alpha("Look at the shiny", $pngSrc) - not show up in the taskbar? Also is it possible to have this always on top of windows? I tried: GUICtrlSetState(1, $GUI_ONTOP)
  7. How do I display a png image in a specific x / y location without a GUI background to it?
  8. I found another way, using size detection etc from Size array from WinPos.
  9. ImageSearchArea('Check.png', 1, $Top, $Left, $Bottom, $Right, $x, $y, 0) 1920x1080 resolution $Top = 20 $Left = 960 $Bottom = 600 $Right = 980 The Top, Left, Bottom, Right is Desktop location Is it possible to make it load / scan within a specific window instead of locked to Desktop location? Because currently if i move the window its scanning in the scan locations stay on desktop location not within specific window. Func checkForImage() local $search = _ImageSearchArea('Check.png', 1, $Top, $Left, $Bottom, $Right, $x, $y, 0) If $search = 1 Then MouseMove($x, $y, 2) EndIf EndFunc Sorry kinda new to the ImageSearchArea functionality.
  10. #include <Misc.au3> #include <ImageSearch.au3> Global $x = 0 Global $y = 0 local $array[5] $array[0] = "1.bmp" $array[1] = "2.bmp" $array[2] = "3.bmp" $array[3] = "4.bmp" $array[4] = "5.bmp" $result = 0 While 1 If WinActive("Game") Then HotKeySet("^e", "Start") Else Sleep(10000) EndIf WEnd Func Start() Send("{e}") Sleep(800) For $i = 0 To 4 If _ImageSearch($array[$i],0,$x,$y,2) Then Opt("MouseClickDelay", 9) Opt("MouseClickDownDelay", 9) MouseMove($x, $y, 2) MouseClick("right", $x, $y, 1, 9) EndIf Next Send("{ESC}") EndFunc What i want it to do. Search for the images in the array, making sure they all have the mouse right click on each of them IF found. Problem, it seems to find say like Image 3 then it will stop on it and will not continue to 4,5 etc. how do i fix this? Thank you for your help!
×
×
  • Create New...