Jump to content

Sending Fkeys problem


Recommended Posts

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

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 by Gif
Link to comment
Share on other sites

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

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