AutoHotkey Community

It is currently May 25th, 2012, 10:01 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: June 30th, 2007, 5:43 am 
i want to make loop on that code but while i am in other window and maybe the color chages.....

that code is in window1 and when i make it loop on it and i am on window2

it dosent work!! coz PixelGetColor works for current window only
how to make PixelGetColor on window1 and while i am busy with window2


Code:
PixelGetColor, color, 625, 753

  if (color = 0x393939)
  {
MouseClick RIGHT, 877, 25
 }


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 30th, 2007, 5:54 am 
Offline

Joined: May 24th, 2007, 3:45 am
Posts: 1121
I'm guesing the problem is that by default, PixelGetColor uses coordinates relative to the active window. So obviously if you make a different window active it will be messed up. You can use CoordMode Pixel, Screen to switch to coordinates relative to the screen, but you'll have to adjust your coordinates to compensate. However you should also be aware that if the pixel you need to check is covered by another window, you wont' be able to check it, at all.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 30th, 2007, 6:35 am 
Offline

Joined: April 22nd, 2007, 6:33 pm
Posts: 1832
you could do something ridiculous like work out the wanted windows relative position on the screen, so that you always know its coordinates rather than relative coordinates in the active window, so that when its inactive then you still know its last coordinates, and now for the ridicuolous part....make it so that a loop is formed with any window in z ordering above the specific window has a 1 pixel transparent dot at the part that is being checked? lol. would be complex code, but should work, and would also be a tiny bit messy that you would appear to have a dead pixel on your screen if there was anything over the wanted window


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 30th, 2007, 3:09 pm 
i want to do that plz


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 1st, 2007, 7:57 pm 
Offline

Joined: October 9th, 2006, 8:19 pm
Posts: 236
Location: Finland
qallaf wrote:
i want to do that plz
So what's the problem?
If you want to check a pixel under a window / windows, then make the above window(s) "tranparent".
Value 255 means opaque (not at all tranparent / translucent), I think, but you can still get the pixel under such window(s).

The Manual wrote:
A window that is partially transparent or that has one of its colors marked invisible (TransColor) typically yields colors for the window behind itself rather than its own.

_________________
Pekka Vartto


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 2nd, 2007, 2:26 am 
Offline

Joined: April 22nd, 2007, 6:33 pm
Posts: 1832
i dont think its quite as easy as that. you have to do this to only the windows above the one youre checking. it would be very complex code


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 2nd, 2007, 4:00 am 
Offline

Joined: May 24th, 2007, 3:45 am
Posts: 1121
You know, the reverse would be alot easier. Make the widnow you're interested in AlwaysOnTop, then hide everything but the one pixel you want to check using WinSet Region.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 2nd, 2007, 9:47 am 
Offline

Joined: June 16th, 2007, 6:43 pm
Posts: 35
ManaUser wrote:
You know, the reverse would be alot easier. Make the widnow you're interested in AlwaysOnTop, then hide everything but the one pixel you want to check using WinSet Region.


I like that idea.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 2nd, 2007, 10:47 am 
Offline

Joined: October 9th, 2006, 8:19 pm
Posts: 236
Location: Finland
ManaUser wrote:
... the reverse would be alot easier.
Indeed!

Also having many transparent windows (even level 255) causes "performance penalty". Even one tranparency seems to be too much if the window in case is video window :)

But AlwaysOnTop is not always possible. At least I don't know a way to have WMP:s normal window on top of fullsreen WMP (in fullsreen mode there's really two WMP windows!).

_________________
Pekka Vartto


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], just me, Klark92 and 72 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group