Azothoras Posted February 21, 2008 Posted February 21, 2008 I've searched this forum for over a year and I've almost always found an answer although I don't now. I want to use the controlclick function in my script but the tricky part is that I wish to have ctrl pressed while I controlclick. $Rand1 = Random($size[0] / 2 - $win, $size[0] / 2 + $win) $Rand2 = Random($size[1] / 2 - $win, $size[1] / 2 + $win) Send("{CTRLDOWN}") ControlClick($Conquer_Handle, "", "[CLASS:#32770; INSTANCE:1]", "left", 1, $Rand1, $Rand2) Send("{CTRLUP}") With this code the controlclick works but my in-game character won't jump as it does if you press ctrl and then click. If I use the regular MouseClick("left",$Rand1, $Rand2,1,0) function then it jumps although this way I can't minimize the window hehe. Anyone got any solution. ps I've also tried using ControlSend($Conquer_Handle, "", "[CLASS:#32770; INSTANCE:1]", "{CTRLDOWN}") Doesn't work either. I've also tried using the MouseClickPlus but this function doesn't work at all...
Styles2304 Posted February 21, 2008 Posted February 21, 2008 (edited) This is just my 2 cents but I would say $Rand1 = Random($size[0] / 2 - $win, $size[0] / 2 + $win) $Rand2 = Random($size[1] / 2 - $win, $size[1] / 2 + $win) Send("{CTRL DOWN}") Sleep (75) ControlClick($Conquer_Handle, "", "[CLASS:#32770; INSTANCE:1]", "left", 1, $Rand1, $Rand2) Send("{CTRL UP}") I dunno just throwing it out there . . . maybe play with that sleep. I mean it's possible it's clicking too fast for the game engine to recognize. Edited February 21, 2008 by Styles2304
Azothoras Posted February 22, 2008 Author Posted February 22, 2008 $Rand1 = Random($size[0] / 2 - $win, $size[0] / 2 + $win) $Rand2 = Random($size[1] / 2 - $win, $size[1] / 2 + $win) Send("{CTRLDOWN}") MouseClick("left",$Rand1, $Rand2,1,0) Send("{CTRLUP}") This works... Although ControlClick doesn't work and the sleep thingy doesn't work either Ty anyway mate
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