Jump to content

beg for some help (noob inside)


Syldegil
 Share

Recommended Posts

ok i am just trying to get an easy macro .

i would like that when i press {HOME} , autoit press for me F2 and do a mouse right click and then a mouse left click .

if possible , the smallest delay beetween F2 and MouseClick("right") and MouseClick("left")

should be rather simple , but i didnot found (yet) an exemple of things like this . i found lots of things very cool but not a so easy exemple .

here s what i tryed to make it :

HotKeySet("{HOME}", "go")

Func go()

Send("{F2}")

MouseClick("right")

MouseClick("left")

EndFunc

thx a lot for reading and maybee helping .

( sorry for my bad english , i am french ) .

Link to comment
Share on other sites

thx a lot for reading and maybee helping .

( sorry for my bad english , i am french ) .

your code does exactly what you described in the post. So, what's the problem?

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

well when i press home , it doesnt work .

i dont notice the mouse click .

doing it for a game ( bf2 ) and it doesnt work in the game too .

well, add a msgbox() before "EndFunc" and see if the message shows if you press HOME.

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

thx for the tip of the loop , i didnot though of it .

is there different way for autoit to send the command ?

i mean , i feel now that with the loop , the script work in windows but doesnt in the game . ( i am not 100% sure the script works in windows but i am 100% sure it doesnt ingame lol ,)

so i was wondering if the way to send the command that autoit use works in the game .

Link to comment
Share on other sites

  • Moderators

Persen is probably right. You can try to do this:

#Include <Misc.au3>
While 1
If _Ispressed(0x24) Then
Send("{F2}")
MouseClick("right")
MouseClick("left")
EndIf
Sleep(50)
Wend

This requires the Beta version of AutoIt. Can be found here!

_IsPressed is included in the standard release 3.2 now.

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

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