Jump to content
Sign in to follow this  
flippertie

Assign script to a Function Key?

Recommended Posts

flippertie

This may be a little off topic - but it would make Autoit much more useful to me.

How can I assign a script to run each time I press a function key. If possible I'd like it there al the time, but if it only works when I'm in a certaim application that would be OK.

So for example I hit F9 and a script runs to do something really mundane that I need to do 20 times a day -

Thanks!

Share this post


Link to post
Share on other sites
phillip123adams

This may be a little off topic - but it would make Autoit much more useful to me.

How can I assign a script to run each time I press a function key.  If possible I'd like it there al the time, but if it only works when I'm in a certaim application that would be OK.

So for example I hit F9 and a script runs to do something really mundane that I need to do 20 times a day -

Thanks!

<{POST_SNAPBACK}>

Yes, this is possible. See HotKeySet in the help file. Then construct an endless loop, with a small Sleep period, to keep the hot key(s) active.

Phillip

Share this post


Link to post
Share on other sites
CyberSlug

You could create a start menu or desktop shortcut to your script. Right-click the shortcut, choose Properties, and assign a hotkey. (You can use any function key except F1, by the way)

Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites
Rex

You could create a start menu or desktop shortcut to your script.  Right-click the shortcut, choose Properties, and assign a hotkey.  (You can use any function key except F1, by the way)

<{POST_SNAPBACK}>

Well execpt F1 and F3, F1 goes Help, and F3 goes search.

In Xp that is. Not sure with 2k >

@flippertie

With CyberSlug's way the script don't have run in the back with a sleep command.

It only runs when you hit the Hot Key, and then ends when the function is over.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.