christian11

pixelsearch on multiple monitor/extended display

24 posts in this topic




#2 ·  Posted (edited)

Pixelsearch is one oft the worst and unsafest ways to automate a application. There are much better ways for automation, so please: tell the name of the apllication you want to automate for finding a good solution.

Edited by AutoBert

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

im trying to automate google chrome with two displays. using controlsend in inactive window any suggestions?

Edited by christian11

Share this post


Link to post
Share on other sites

There is a Chrome.au3 (by seangriffin) available. Automate the most common tasks in Chrome with the Chrome UDF.

Share this post


Link to post
Share on other sites

Don't use 0 as your left and top values as these numbers can be negative if your secondary monitor is positioned above or to the left of your main monitor. Might be why it's not working for you.


My Scripts:

False Positive Reporter - Mass email all anti virus vendors with an attachment of your program for easy whitelisting.

PortableApps.com App Creation Wizard  - A simple GUI-based Wizard for creating PortableApps.

AutoISO  - Automatic ISO Image creation using ImgBurn.

SoundBoard - Play any song or sound you want at the press of a hotkey

Share this post


Link to post
Share on other sites
38 minutes ago, christian11 said:

so it would be 

green=PixelSearch(-1, -1, @DesktopWidth, @DesktopHeight, 0x00FF00)

is it correct??

no would raise a syntax error.

Share this post


Link to post
Share on other sites
10 hours ago, AutoBert said:

There is a Chrome.au3 (by seangriffin) available. Automate the most common tasks in Chrome with the Chrome UDF.

 

Share this post


Link to post
Share on other sites

unfortunately chrome.au3 didnt work in extended screen

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

On 5/29/2016 at 5:34 PM, christian11 said:

so it would be 

green=PixelSearch(-1, -1, @DesktopWidth, @DesktopHeight, 0x00FF00)

is it correct??

No. As an example, let's say your monitor setup is the following:

Monitor 1 (main) has a resolution of 1920x1080. This monitor is to the right of Monitor 2

Monitor 2 (secondary) has a resolution of 1024x768. This monitor is to the left of Monitor 1.

 

The top left pixel of the monitor 1 is 0x0.

The top right pixel of the monitor 1 is 1920x0.

The center pixel of monitor 1 is 960x540.

The bottom left pixel of the monitor 1 is 0x1080.

The bottom right pixel of the monitor 1 is 1920x1080.

 

The top left pixel of the monitor 2 is -1024x0.

The top right pixel of the monitor 2 is -1x0.

The center pixel of monitor 2 is -512x384.

The bottom left pixel of the monitor 2 is -1024x768.

The bottom right pixel of the monitor 2 is -1x768.

 

Try to think of it like plotting boxes on a horizontally (x) inverted axis graph. Right is +x, Down is +y, Left is -x, and Up is -y.

If you are unsure as where your monitors are positioned, refer to Control Panel's Display Resolution page. 

"Control Panel\All Control Panel Items\Display\Screen Resolution"

 

Edited by BetaLeaf
Fixed coordinates.

My Scripts:

False Positive Reporter - Mass email all anti virus vendors with an attachment of your program for easy whitelisting.

PortableApps.com App Creation Wizard  - A simple GUI-based Wizard for creating PortableApps.

AutoISO  - Automatic ISO Image creation using ImgBurn.

SoundBoard - Play any song or sound you want at the press of a hotkey

Share this post


Link to post
Share on other sites

Because we are stuborn haha :P. The op asked for help in pixelsearch so help in pixelsearch I gave. Yea pixelsearch is bad in most cases but sometimes it's the only option that works. It's all case by case.


My Scripts:

False Positive Reporter - Mass email all anti virus vendors with an attachment of your program for easy whitelisting.

PortableApps.com App Creation Wizard  - A simple GUI-based Wizard for creating PortableApps.

AutoISO  - Automatic ISO Image creation using ImgBurn.

SoundBoard - Play any song or sound you want at the press of a hotkey

Share this post


Link to post
Share on other sites
5 hours ago, Bert said:

in this case it is NOT the only option that works.

Look man I'm just trying to help. We don't know what the op is even trying to do, we haven't seen the full code. How can you be so sure stuff doesn't work when you don't know what the op is trying to do. For all we know, he might be trying to automate a Java based speed test. We just don't know so don't be so sure. Everything is case by case, some stuff works, others dont. Sorry if you don't like my opinion.

1 person likes this

My Scripts:

False Positive Reporter - Mass email all anti virus vendors with an attachment of your program for easy whitelisting.

PortableApps.com App Creation Wizard  - A simple GUI-based Wizard for creating PortableApps.

AutoISO  - Automatic ISO Image creation using ImgBurn.

SoundBoard - Play any song or sound you want at the press of a hotkey

Share this post


Link to post
Share on other sites

OP is trying to automate chrome so pixelsearch is not easy with chrome so alternatives are better.

Share this post


Link to post
Share on other sites
2 hours ago, BetaLeaf said:

Look man I'm just trying to help. We don't know what the op is even trying to do, we haven't seen the full code.

We don't know what op trying to do in case of he's not saying exactly what he want to do and isn't anwering:

 

21 hours ago, Bert said:

please post your code

and when a MVP ask, it's usual noone give further support until question is answered.

Share this post


Link to post
Share on other sites
1 hour ago, AutoBert said:

and when a MVP ask, it's usual noone give further support until question is answered.

Not sure where you picked that up from...


When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

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