Sign in to follow this  
Followers 0
Maxvan1

Controlsend Quick Question

8 posts in this topic

I am trying to make it controlsend F11, but it keeps comming up with an error. Here is what the line reads... controlsend( "", "", "", "{F11}"

OR, how can I make it controlsend CTRL+V. I need it to paste (F11 is my other paste hotkey).

Share this post


Link to post
Share on other sites



ControlSend is supposed to work with a specified application/control. (it might work with empty "" references I have not tried that).

Try: Send("{F11}")

Share this post


Link to post
Share on other sites

ControlSend is supposed to work with a specified application/control. (it might work with empty "" references I have not tried that).

Try: Send("{F11}")

That worked. Thank you.

Share this post


Link to post
Share on other sites

Another Quesion, I want to make it so if my pixel search is sucessful then it copies the page (printscreen) and right now I am using

$aPixelSearch = PixelSearch(944,144,975,151,0xE0E5E8,3)

If True Then

ControlSend ( "", "", "", "{PRINTSCREEN}")

But that just makes everything copy, regaurdless if the pixelsearch was sucessful. How can I do that?

Share this post


Link to post
Share on other sites

Another Quesion, I want to make it so if my pixel search is sucessful then it copies the page (printscreen) and right now I am using

$aPixelSearch = PixelSearch(944,144,975,151,0xE0E5E8,3)

If True Then

ControlSend ( "", "", "", "{PRINTSCREEN}")

But that just makes everything copy, regaurdless if the pixelsearch was sucessful. How can I do that?

How would you do it manually, that's generally where you want to start?

Alt + PrintScreen?


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Manually I would just press print screen once. But I only want it to press print screen if it sees that pixel. If it does not see that pixel...

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Manually I would just press print screen once. But I only want it to press print screen if it sees that pixel. If it does not see that pixel...

If (PixelGetColor(x,y) == nColor) Then ControlSend()

Edit:

Or... to you use your example (sorry, I misread it before)

$aPixelSearch = PixelSearch(944,144,975,151,0xE0E5E8,3)
If IsArray($aPixelSearch) Then ControlSend()
Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

If (PixelGetColor(x,y) == nColor) Then ControlSend()

Edit:

Or... to you use your example (sorry, I misread it before)

$aPixelSearch = PixelSearch(944,144,975,151,0xE0E5E8,3)
If IsArray($aPixelSearch) Then ControlSend()
I think that it is looking for the wrong color. I need it to look for E0E5E8, not 0xE0E5E8. 0xE0E5E8 is like a teal color. I tried to take the 0x out but then the code doesnt work....

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