Jump to content

Controlsend Quick Question


Maxvan1
 Share

Recommended Posts

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).

Link to comment
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}")

Link to comment
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?

Link to comment
Share on other sites

  • Moderators

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?

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.

Link to comment
Share on other sites

  • Moderators

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

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.

Link to comment
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....
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...