Celebrating the 22th anniversary of the UltraVNC: https://forum.uvnc.com/viewtopic.php?t=38031
Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Bluesky/AT Protocol: https://bsky.app/profile/ultravnc.bsky.social
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

Reading screen image using winvnc

Post Reply
Pick
Posts: 1
Joined: 2004-11-07 08:11

Reading screen image using winvnc

Post by Pick »

I am trying to use ultravnc to control a program that I don't have the source code for. I want to watch the screen looking for certain images in certain locations, then I'll do some mouse clicks. So, I added a routine into vncbuffer.cpp, and called it from vncdesktopthread.cpp near line 919, as shown below:

//Check all regions for changed and cached parts
//This is very cpu intensive, only check once for all viewers
if (!checkrgn.is_empty())

m_desktop->m_buffer.CheckRegion(changedrgn,cachedrgn, checkrgn);

//******START OF ADDED CODE
m_desktop->m_buffer.CheckScreen ();
//******END OF ADDED CODE

updates.add_changed(changedrgn);
updates.add_cached(cachedrgn);

Then, in my CheckScreen routine, I watch m_mainbuff for the images. (I've also tried watching m_backbuff.) I can see the images appear over on the vncviewer computer, so I know they're there and have been sent out. Sometimes my routine sees them and sometimes it doesn't. It seems as though there is another place in winvnc where the screen can be read and sent out. Does anyone know if there is? I've tried fiddling with the settings quite a bit and some things seem to help, but I haven't found anything that makes it work perfectly all the time. I am working with Windows 2000.
rmoller
40
40
Posts: 93
Joined: 2004-08-20 09:32

Post by rmoller »

Hello,

VNC is porbably not what you want,

http://www.autoitscript.com/autoit3/

will allow you to automate responses to
any GUI program. and it is free.

Godspeed

Rasmus Moller
Post Reply