Maxvan1 Posted January 20, 2007 Posted January 20, 2007 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).
Uten Posted January 20, 2007 Posted January 20, 2007 ControlSend is supposed to work with a specified application/control. (it might work with empty "" references I have not tried that). Try: Send("{F11}") Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
Maxvan1 Posted January 20, 2007 Author Posted January 20, 2007 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.
Maxvan1 Posted January 20, 2007 Author Posted January 20, 2007 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?
Moderators SmOke_N Posted January 20, 2007 Moderators Posted January 20, 2007 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 ThenControlSend ( "", "", "", "{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.
Maxvan1 Posted January 20, 2007 Author Posted January 20, 2007 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...
Moderators SmOke_N Posted January 20, 2007 Moderators Posted January 20, 2007 (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 January 20, 2007 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.
Maxvan1 Posted January 20, 2007 Author Posted January 20, 2007 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....
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now