unform25 Posted August 17, 2007 Share Posted August 17, 2007 Ok, I've been writing a macro for Eve like so many before me. But I'm having a problem with firing the lasers the way I want them to. Here's what I have so far. CODE Func LaseTheRoid() For $Locked = 1 To 3 WinActivate("E" & $CurrentClient) WinWaitActive("E" & $CurrentClient) ;click first lock before activating a laser, repeate moving left MouseClick("LEFT",$WindowSize[0] + $LockedItem[0] - (($Locked - 1) * $LockLaserOffset),$WindowSize[1] + $LockedItem[1]) Sleep(500) WinActivate("E" & $CurrentClient) WinWaitActive("E" & $CurrentClient) ;sending the F keys to activate lasers, currently not working Send("{F "&$Locked&"}") Next EndFunc I'm trying to have the Fkey sent determined by wich loop its on. But all I get is "$" sent and it goes straight to the chat window. I now that I can do this with a long If/ElseIf/Then statement but that would just look like crap to me. The real bugger is that this is the last thing I need to fix before this version is fully functional, so any help you could send my way would be very much appreciated. Link to comment Share on other sites More sharing options...
Gif Posted August 17, 2007 Share Posted August 17, 2007 (edited) try:Func LaseTheRoid() For $Locked = 1 To 3 WinActivate("E" & $CurrentClient) WinWaitActive("E" & $CurrentClient) ;click first lock before activating a laser, repeate moving left MouseClick("LEFT",$WindowSize[0] + $LockedItem[0] - (($Locked - 1) * $LockLaserOffset),$WindowSize[1] + $LockedItem[1]) Sleep(500) WinActivate("E" & $CurrentClient) WinWaitActive("E" & $CurrentClient) ;sending the F keys to activate lasers, currently not working Send("{F"&$Locked&"}") Next EndFunc Edited August 17, 2007 by Gif Link to comment Share on other sites More sharing options...
unform25 Posted August 17, 2007 Author Share Posted August 17, 2007 I'm not seeing the difference between my func and yours. Link to comment Share on other sites More sharing options...
unform25 Posted August 17, 2007 Author Share Posted August 17, 2007 Wait, do you think a single space would be the problem? Link to comment Share on other sites More sharing options...
mikehunt114 Posted August 17, 2007 Share Posted August 17, 2007 Try it... IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
unform25 Posted August 17, 2007 Author Share Posted August 17, 2007 I can't untill morning when i get off work and go back to my tent. Eve server's blocked here. But I'll post if it worked or not. thanks Link to comment Share on other sites More sharing options...
Gif Posted August 17, 2007 Share Posted August 17, 2007 I can't untill morning when i get off work and go back to my tent. Eve server's blocked here. But I'll post if it worked or not. thanks i tried: For $i = 1 To 3 Send("{F"&$i&"}") next and it works, the problem is if you use that space it presses the F key multiple times, instead F($i) uses the number of loop to press an Fkey, you can tst it for yourself with my above example.... Link to comment Share on other sites More sharing options...
unform25 Posted August 17, 2007 Author Share Posted August 17, 2007 Sweet, ty very much. the bot should work now. now for my next trick i need to figure out how to getpixel while another window is covering it......that's gonna take a while, and probably some more forums searching/asking. Link to comment Share on other sites More sharing options...
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