Jump to content
Sign in to follow this  
Strike21

Pressing keys

Recommended Posts

Strike21

Hi, i'm german so excuse my poor english skills.

I need a script to let autoit press "Tab - F - and a click to my mouse positions" 3 times in a row

And this script has to stay active all the time and should do the combination when i press "Q".

I wrote this

HotKeySet("{ASC 081}", "Terminate")

Func Terminate()

Exit 0

EndFunc

Send("{ASC 070}")

MouseClick("left", 125, 67, 2)

Send("{TAB}")

Send("{ASC 070}")

MouseClick("left", 125, 67, 2)

Send("{TAB}")

Send("{ASC 070}")

MouseClick("left", 125, 67, 2)

Send("{TAB}")

Send("{ASC 070}")

MouseClick("left", 125, 67, 2)

Send("{TAB}")

But i think thats totally wrong and i don't know how to let autoit to make a click at the mouse position or a click in general

Can u help me or post a working version of mine?

Share this post


Link to post
Share on other sites
oMBRa

replace all {ASC ...} with the key you actually want to send or set an hotkey, to click at the current mouse position use "MouseClick ( "button")" with no x/y coordinates, finally add a loop, check in the help file for "while"

Share this post


Link to post
Share on other sites
GEOSoft

Put it in a loop?

For $i = 1 To 3
    Send("{TAB}{ASC 070}")
    MouseClick("left", 125, 67, 2)
Next

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
Strike21

i'm too stupid to make it.

how do i set

For $i = 1 To 3

Send("{TAB}{F}")

MouseClick("button")

Next

to the hotkey Q?

So when i press Q the script makes the combination 3 times and then stops. When I press Q again it has to do it again.

Share this post


Link to post
Share on other sites
CodyBarrett

hotkeyset ('q','Function')
while 1
sleep (100)
wend

Func Function ()
msgbox (0,'','Successfully called!') ;just for testing purposes
For $i = 1 To 3
Send("{TAB}{F}")
MouseClick("button")
Next
endfunc

is that what you want?

Share this post


Link to post
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
Sign in to follow this  

×