magmet00

searching for working imagesearch and i cant handle a d3dwindow

10 posts in this topic

#1 ·  Posted

Do you have a working imagesearch.au3 with working dll?

and how can i gethandle and send keyboard/mouse commands to hidden d3d window?

 

i have tried imagesearch2015 but im getting dll error every time and tried older imagesearchs too in forum what i found.

i have tried many things to send commands to hidden/background d3dwindow still nothing works.

Can you help me please?

 

Share this post


Link to post
Share on other sites



#2 ·  Posted

What game? Might get better results.

Share this post


Link to post
Share on other sites

#3 ·  Posted

Its not about game. all these topics for notepad everything works on notepad. Really noone sharing a working udf or something for a d3dwindow handle

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Maybe because no one is using a d3dwindow handle (my only knowledge of it is some obscure Logitech software). How about you provide less a little more information about the application you're trying to automate, rather than expecting everyone to simply guess at what you want?

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Its a bin file and window class is d3d, just cant handle window. I can active it select window or simple things with just window tittle. Maybe need PID or something? I want  ideas

and im looking for an imagesearch too im getting dllcall error. How can i fix it?

Made many things with pixel search but pixelsearch not enough for all

 

 

Edited by magmet00

Share this post


Link to post
Share on other sites

#6 ·  Posted

Again, you're not providing the code you're using. So you're asking us to first guess at what you're doing and then troubleshoot for you. What is returned when you hover over the window with the Window Info Tool? Show the results


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

$hwindow = WinGetHandle($title)

KeySend($hwindow,0x58)
SimulKey($hwindow, 0x58, 0, "skip", 100)

ControlClick($hwindow, "", "[CLASS:D3D Window]", "right", "1", 606, 499)

ControlSend($hwindow, "", "[CLASS:D3D Window]", "x")

 

and other 

Func _Send_Virtual_Key($iCode)
    If Not IsInt($iCode) Then Return
    DllCall('user32.dll', 'int', 'keybd_event', 'int', $iCode, 'int', 0, 'int', 0, 'ptr', 0)
    DllCall('user32.dll', 'int', 'keybd_event', 'int', $iCode, 'int', 0, 'int', 2, 'ptr', 0)
EndFunc

imagesearch.zip

keytextsend.au3

simulekeys.au3

clickdrag.au3

Edited by magmet00

Share this post


Link to post
Share on other sites

#8 ·  Posted

Well, as you are purposely not answering the questions posed, it becomes apparent you do not want any real assistance. Good luck on your endeavors :)

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

I made many codes cant share all because its working fine.

As i said imagesearch not works.. firtly searching for a solution for it

Just a simple part of them:

Func ash()
    sleep(300)
    $CoordAsh1 = PixelSearch(290, 55, 360, 90, 0x47B373)
    $CoordAsh2 = PixelSearch(310, 55, 400, 70, 0xB8B9B3)
    $CoordAsh3 = PixelSearch(255, 55, 355, 90, 0x292031)
    If IsArray($CoordAsh1) = True and IsArray($CoordAsh2) = True and IsArray($CoordAsh3) = True Then
          SetLog("Found the ash", $COLOR_RED)
          $searchsrcount = 0
          try1()
     Else
          sleep(100)
          SetLog("Cant find ash", $COLOR_RED)
          send("{tab}")
          sleep(100)
          $searchsrcount = $searchsrcount + 1
          sleep(150)
    EndIf
     If $searchsrcount > 15 Then
        SoundSetWaveVolume(100)
        Beep(500, 1000)
     EndIf
EndFunc

Edited by magmet00

Share this post


Link to post
Share on other sites

#10 ·  Posted

11 minutes ago, magmet00 said:

I made many codes cant share all because its working fine.

As you seem to avoid answering the question, I can only assume this is game related and as such close the topic.
PM me with prove I am wrong and I will open it again for you.

Either way: Ensure you fully understand  our forum rules before continuing. 

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Similar Content

    • lganta
      By lganta
      Hello!
      I created some scripts for a simple farming bot a few years ago and they rely on ControlSend.
      A year ago I quit that game and then installed Windows 10 (was using windows 7).
      Recently I installed that game and tried running them again and they seem to work (I have some messages displayed on the screen with the state of the bot ), except for the ControlSend part (which obviously is crucial).
      I started debugging the scripts so I created a basic script that makes use of Send. I tested this with Notepad in focus and works just fine and then with my game window in focus and it didn't work (it's supposed to write that text in an input box from the game).
      #include <MsgBoxConstants.au3> Sleep(3000); Send("some text"); MsgBox($MB_OK, "Notification", "Control was sent!");  
      Is there a way for the creators of the game to create some kind of security system against this? Or something happens because I updated to Windows 10?
      Is there something I'm missing?
      Thank you!
    • DeathChicken
      By DeathChicken
      If possible please add or edit the comments to explain how this works.
       
      ;includes functions from other things
      #include <GDIPlus.au3>
      #include <ScreenCapture.au3>
      ;hotkeys
      HotKeySet("{ESC}", _exit)
      HotKeySet("{F1}", _scan)
      ;global variables
      Global $win_title                    ;name of the window
      Global $area_x                        ;
      Global $area_y                        ;
      Global $area_w                       ;
      Global $area_h                        ;
      Global $cursor                         ;
      Global $rect_file                      ;
      Global $hbmpscreen              ;
      Global $i=  1043                      ;moves the rect
      Global $ii=    378                      ;moves the rect
      Global $x=1044                        ;inner rect offset
      Global $y=501                          ;inner rect offset
      Global $hbmprect                    ;image inside rect
      Global $hscreen                        ;image whole screen
                                         
      _GDIPlus_Startup()                    ;?
      ;display hotkeys on screen
      ToolTip("Press F1 to scan | Press ESC to Exit",0,0)
                                          ;infinite loop to keep prog running
      While 1
          Sleep(100)
      WEnd
      Func _scan()
      ;~ reads your screen area:
      _read()
      ;~ converts screen captured into bmp
      _convert()
      ;~ .  Loads converted bmp to be read
      _loadBMP()
      ;~ compares the bmp of your scanned screen to the actual screen that is being displayed
      _compare()
      EndFunc
                                          ;reads screen
      Func _read()
          $hscreen = _ScreenCapture_CaptureWnd("", WinGetHandle($win_title), $area_x, $area_y, $area_x + $area_w, $area_y + $area_h, $cursor)
      EndFunc
                                          ;converts screen into bmp
      Func _convert()
          _GDIPlus_BitmapCreateFromHBITMAP($hscreen)
      EndFunc
                                          ;loads converted screen
      Func _loadBMP()
      _GDIPlus_BitmapCreateFromFile($rect_file)
      EndFunc
                                          ;compares savedBMP to current screen
      Func _compare()
      ;If(                              below code                                     ) = (                   below code           ) Then
      If _GDIPlus_BitmapGetPixel($hbmpscreen, ($i + $x) - $area_x, ($ii + $y) - $area_y) = _GDIPlus_BitmapGetPixel($hbmprect, $x, $y) Then
      ;display message box titled found with a message of found
      MsgBox("","","found")
      ;if above is not correct then
      EndIf
      EndFunc
                                          ;exit func
      Func _exit()
          Exit
      EndFunc
    • rawkhopper
      By rawkhopper
      Hello everyone,
      I have a script that is automating a piece of sluggish software.  I want to automate it with a bit of caution and I am not sure the best way to do it.  ControlSend works great most of the time.  If I have it enter 10 into a text box every once in a while it will enter 1 or 11 and then hit enter.
      To overcome this I use MouseClick to select the text I just entered and then see if it matches the string it was supposed to put in before it hits enter.  This seems to work but what I love about ControlSend is there is less room for human interaction messing it up.  
      Yes I could block input but I prefer not to do that (permissions).
      Is there a better way of doing this?  Any Help would be much appreciated.
      Anyway here is the snippet of the script in question:
      Func KVSend () WinActivate ( "Window", "" ) Local $WindowPos = WinGetPos("Window", "") If $kV < 30 Then WinActivate ( "Window", "" ) ControlClick ("Window", "", 1001) ;Click in Accel Voltage box Sleep (100) ControlSend ("Window", "", 1001, $kV) ; \ kV Sleep (100) MouseMove($WindowPos[0]+130,$WindowPos[1]+75,1) MouseClick($MOUSE_CLICK_LEFT) MouseClick($MOUSE_CLICK_LEFT) Send ("^c") Local $clip = ClipGet () If $clip = $kV Then ControlSend ("Window", "", 1001, "{ENTER}") ;Hit ENTER if value is correct Sleep (100) ControlClick ("Window", "", 1518) ;Lens Clear Else Send ("{BACKSPACE}") KVSend() ; If value is incorrect try again EndIf EndIf  
    • Guy_
      By Guy_
      Was testing ControlSend("My Window Name", "", "", "^c") vs the normal Send("^c") or _SendEx("^c") to copy selected text from a window...
      In Windows, I have a setting that when I click the Ctrl key only, my mouse pointer is "highlighted" [that I could of course disable].
      If I use Send("^c"), or do this manually, the mouse pointer is never highlighted, as I wish it to be.
      With ControlSend it *does* highlight...
      I thought that maybe the Ctrl key goes up a few ms too soon in that one and increased AutoItSetOption("SendKeyDownDelay", 5) to way higher, but it doesn't make a difference.
      As it doesn't seem possible to do "^ down", could it be prevented in some way?
      Beside the slight annoyance, it simply alerted me that these seem to work differently [and of course, they are different].
      I also get the early impression that ControlSend [to copy] seems in no way quicker to get something on the clipboard, maybe even slower?
      Thanks 
    • SkysLastChance
      By SkysLastChance
      How would I go about writing a IF Then statement if the conrol send fails?
      Run ("Notepad.exe") WinWaitActive ("Untitled - Notepad") ControlSend("Untitled - Notepad", "", "Edit1", ("Provider Practice Record")) I have been running into lag alot. So my script has been missing input. I would like to be able to have it retry to put in "Provider Practice Record" if it misses. 
      I am assuming  a if then statement is what I need but I am not sure what ControlSend will return if it tries to send to Edit1 and it is not there. 
      Or do I need to just add a timeout?