Sign in to follow this  
Followers 0
Shifthappens

Need help with PixelGetColor within a window

6 posts in this topic

Well, i'm trying to integrate PixelGetColor to make a program I made for my computer at first be viable for his and others without changing their whole interface.

What do I mean by this? - I have a program which is ran maximized at 800x600 while my computer's main screen is 1024x768, so when I give my program to friends, they have to modify their dimensions the same.

I'm trying to find if there's a way to make it just read the coordinates from the Window of the program (The 800x600) and ignore the fact that the computer's resolution is 1024x768. The program is ran in windows mode by the way, and not full screen.

Any help is much appreciated, thanks.

-Shifthappens

Share this post


Link to post
Share on other sites



There is probably a clever way that someone knows, but here is a way I did this. The problem I had was creating a macro for a game that anyone can use whatever the resolution they run it in. What I did was make the macro work in 1000x1000 resolution and then at the beginning of the macro ask them what resolution the game is running in. For example if they were running in actual resolution of 1600x900 then the macro would do this: Input $Horizontal,$Vertical ---

Ex.

$vertical=900

$horizontal=1600

$vratio=$vertical/1000

$hratio=$horizontal/1000

and then after making the macro work in 1000x1000 I would do a find/replace " ," with "*$hratio,$vratio*" so that it would automatically adjust for the new resolution.


[font="Franklin Gothic Medium"]---Al[/font]

Share this post


Link to post
Share on other sites

There is probably a clever way that someone knows, but here is a way I did this. The problem I had was creating a macro for a game that anyone can use whatever the resolution they run it in. What I did was make the macro work in 1000x1000 resolution and then at the beginning of the macro ask them what resolution the game is running in. For example if they were running in actual resolution of 1600x900 then the macro would do this: Input $Horizontal,$Vertical ---

Ex.

$vertical=900

$horizontal=1600

$vratio=$vertical/1000

$hratio=$horizontal/1000

and then after making the macro work in 1000x1000 I would do a find/replace " ," with "*$hratio,$vratio*" so that it would automatically adjust for the new resolution.

Could you please help me with this? I have my au3 but it's been a while since i've scripted anything. Thanks very much btw, really appreciate it.

Share this post


Link to post
Share on other sites

Could you please help me with this? I have my au3 but it's been a while since i've scripted anything. Thanks very much btw, really appreciate it.

opt("PixelCoordMode", 0)

?

If you had an example of what your trying to do (Code) I could help you with this=)

I'm maybe not getting what your asking for=)

Share this post


Link to post
Share on other sites

I have read your post a few times and can say that I am still not sure what your problem is.... either it is not very clear or I am really tired.

I think you may want to look at @desktopwidth and @desktopheight in the help file.


Share this post


Link to post
Share on other sites

Opt("MouseCoordMode", 2)

look it up

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0