Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 22:56

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Image Search on background window (inactive, minimized on system tray)

Discussion on Image Search on background window (inactive, minimized on system tray) within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2014
Posts: 132
Received Thanks: 31
Image Search on background window (inactive, minimized on system tray)

It's possible ? emgu cv or open cv ?
lenclstr746 is offline  
Old 01/19/2018, 18:26   #2



 
Serraniel's Avatar
 
elite*gold: 0
The Black Market: 205/1/0
Join Date: May 2010
Posts: 6,853
Received Thanks: 5,106
Arrow C/C++ -> .NET Languages

#moved
Serraniel is offline  
Old 01/20/2018, 13:43   #3
 
elite*gold: 67
Join Date: Aug 2014
Posts: 1,323
Received Thanks: 928
Quote:
Originally Posted by lenclstr746 View Post
It's possible ? emgu cv or open cv ?
Depends on the window. If its DirectX or OpenGL it most likely suspends the rendering while in bg.
Xio. is offline  
Old 01/25/2018, 15:28   #4
 
YatoDev's Avatar
 
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
A method i prefered when i made pixel bots is to move the window out of the visible screen bounds and change it's window style and ex style class to make it stay active.
Then you may use a window hook to force it stay there and not gain focus.
After that you can send window messages to force inputs without affecting the end user.

and:
is what i used years ago.
YatoDev is offline  
Thanks
1 User
Old 02/18/2018, 08:59   #5
 
exane^'s Avatar
 
elite*gold: 0
Join Date: Jul 2017
Posts: 157
Received Thanks: 347
Maybe this will help. I use it for my darkorbit bot. Though the window has to be visible and not minimized for this to work - just move it offscreen. The screen also has to be turned on.

Code:
public static Bitmap Snapshot(IntPtr handle, Rectangle rectangle)
{
	Bitmap bitmap;
	try
	{
		IntPtr windowDC = User32.GetWindowDC(handle);
		IntPtr compDC = Gdi32.CreateCompatibleDC(windowDC);
		IntPtr bmpPtr = Gdi32.CreateCompatibleBitmap(windowDC, rectangle.Width, rectangle.Height);
		IntPtr objPtr = Gdi32.SelectObject(compDC, bmpPtr);
		Gdi32.BitBlt(compDC, 0, 0, rectangle.Width, rectangle.Height, windowDC, rectangle.X, rectangle.Y, 13369376);

		bitmap = System.Drawing.Image.FromHbitmap(bmpPtr);

		User32.ReleaseDC(handle, windowDC);
		Gdi32.DeleteObject(bmpPtr);
		Gdi32.DeleteObject(objPtr);
		Gdi32.DeleteDC(compDC);
		
	}
	catch (Exception e)
	{
		Console.WriteLine(e);
		bitmap = null;
	}
	return bitmap;
}
After that, you continue with image search.
exane^ is offline  
Reply


Similar Threads Similar Threads
Get image a window (minimized, invisible)
04/02/2017 - AutoIt - 0 Replies
I want get picture a window with auto it I've tried Fastfinf but fastfind get image window and on :( ı want only window :( pls help me Sorry for my bad english I solved my problem :) with fastfind
(auto it) Search Image a background window or minimized window
03/21/2017 - AutoIt - 4 Replies
Hi guys, I want search a image for background window and send mouse click image x y please help :) :) (auto it)
minimize to system tray or background
04/17/2008 - Conquer Online 2 - 0 Replies
hey, sorry if this has been asked before but i was wondering if there was any way of minimizing the CO client either to the sys tray or having it run in the background? my dad has taken a disliking to it and decides to close it everytime i leave my tro in the tg, but i dont think hes smart enough to open ctrl+alt+del to shut the process or to check the sys tray. any feedback is apreciated.
Train Summons with minimized window
04/16/2006 - CO2 Guides & Templates - 5 Replies
Go to desolate area (house works best), open copartner, set mouse: right quickest, set sit to F2, put name of summon in monster name ie. FireRatA, CopperGuard set plvl around: 0, set your summon on your right click. text2schild.php?smilienummer=1&text=Enjoy!' border='0' alt='Enjoy!' />
How do I: Click or Send Keys to a minimized window
04/08/2006 - General Coding - 6 Replies
I am making a bot for ConquerOnline, and I need to know how to send clicks or keys to a minimized window, like COPartner does. Thanks for any help.



All times are GMT +1. The time now is 22:57.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.