Sign in to follow this  
Followers 0
Achilles

HotKeySet

3 posts in this topic

Alright, I understand how to use it fine but I'm making a program that lets me use various unused keys to open programs. For example you push the ` button and it opens firefox, however I'm doing this for various keys and have decided to add a disable/enable key so that if program is disabled then it doesn't open the program but instead sends the respective letter that was pressed. The problem is that I get some sort of system overload because whenever it sends the "`" it triggers the function again which creates an infinite loop, any ideas?


My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites



Heh.. I did that once. Would have really slowed my system down if it wern't for that buffer overflow.

HotKeySet("`", "Function")

While 1
    Sleep(60000)
WEnd

Func Function()
    HotKeySet(@HotKeyPressed)
    Send(@HotKeyPressed)
    HotKeySet(@HotKeyPressed, "Function")
EndFunc
Thanks, that's what exactly what I was looking for and more.. I hadn't seen the @HotKeyPressed before and that should help me too

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

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  
Followers 0