taultunleashed logoNew GetPixel function's don't seem to work : EverQuest 2 Premium Discussions
newtopic  postreply
 [ 5 posts ] 
blue large dot

New GetPixel function's don't seem to work : EverQuest 2 Premium Discussions

Posted: December 16th, 2004, 6:27 am
 
richyrich
richyrich's Reps:
User avatar
I tried to test the new GetPixel with window handle functions and it bombs out.
Here is a modified version of the GetPixelColorDemo.vbs file.
The fgwin seems to to work fine, returns a 6 digit number.
But when I go to pass it to the GetPixelColor() function as the 3rd param, it bombs. I have tried just a 0, since that would be default. Have also tried CLng(0) to see if it forces it to Long, no luck.

Any help Admin/Wyv?

Dim x,y,color,r,g,b,fgwin

fgwin=Win32API.XUGetForegroundWindow()

staMouse.Text = fgwin
XUScriptHost.Sleep 3000
do while bRunning
XUScriptHost.GetCursorPos x,y
color = XUScriptHost.GetPixelColor(x,y,fgwin)
r = XUScriptHost.ExtractRGB_Red(color)
g = XUScriptHost.ExtractRGB_Green(color)
b = XUScriptHost.ExtractRGB_Blue(color)
staMouse.Text = "X:" & x & " Y:" & y
staColor.Text = "R:" & r & " G:" & g & " B:" & b & " =>" & color
XUScriptHost.Sleep 100
loop


Reply with quote
Posted: December 16th, 2004, 1:48 pm
 
wyvernx

Total Posts: 6718
Joined: May 1st, 2004, 4:00 am
wyvernx's Reps: 21
User avatar
administrator
premium
Yea it broke my plugin last nite and was having other problems so I had admin roll it back.

here is what I have done.

If you use windowed mode in eq2, the getpixelcolor works very well.

_________________
Use Search first, ask questions later!


Reply with quote
Posted: December 16th, 2004, 3:55 pm
 
richyrich
richyrich's Reps:
User avatar
Does Windowed mode mess up my X,Y functions? Are they relative the the game window?


Reply with quote
Posted: December 16th, 2004, 4:40 pm
 
wyvernx

Total Posts: 6718
Joined: May 1st, 2004, 4:00 am
wyvernx's Reps: 21
User avatar
administrator
premium
Yes it will mess up x,y functions unless you convert them.

Ie if you want to read game coordinate x,y you will need to call GetClientRect and then use those offsets with your x,y.

Ie clientrect.left + x, clientrect.top + y

etc.

Admin is still working on that function, but that might let ya get by until he can add back in tthe hwnd which reads the window coordinates directly.

_________________
Use Search first, ask questions later!


Reply with quote
Posted: December 17th, 2004, 7:24 am
 
richyrich
richyrich's Reps:
User avatar
I'm good until he fixes it again - I wrote most of my code to read health/power to take this into account, but when I get into reading bitmaps from the screen, could get harder, but at least I can play with windowed mode until then... hopefully he'll get it working soon.


Reply with quote
Want Advertisements After The Last Post Removed? Create A Free Account!

blue large dot Who is online
Users browsing this forum: No registered users and 213 guests

Popular Sections
SWTOR Cheats
Guild Wars 2 Cheats
Guild Wars 2 Hacks
Guild Wars 2 Bots
Diablo 3 Cheats
Guild Wars 2 Mods

Popular Sections
WoW Cataclysm Cheats & Exploits
WoW Cataclysm Hacks & Bots
Star Wars The Old Republic Cheats
SWTOR Mods
Torchlight 2 Cheats
SWTOR Space Mission Bots
Site Nav and RSS
RSS Feed of EverQuest 2 Premium Discussions RSS Feed 
Sitemap of EverQuest 2 Premium Discussions Sitemap 
SitemapIndex SitemapIndex
RSS Feed RSS Feed
Channel list Channel list
left bottom corner Site and Contents Copyright 2001-2012 All Rights Reserved TaultUnleashed.com bottom corner
top left
top right
createaccount
Username:   Password:   Remember Me?