Sign in to follow this  
Followers 0
DangerousDan

hotkeyset f12 key?

4 posts in this topic

#1 ·  Posted (edited)

I can't get this function to work for the F12 key. every other key works just fine. any suggestions?

CODE
while 1

sethotkeys()

WEnd

func sethotkeys()

hotkeyset("{F1}","lastpressed")

hotkeyset("{F2}","lastpressed")

hotkeyset("{F3}","lastpressed")

hotkeyset("{F4}","lastpressed")

hotkeyset("{F5}","lastpressed")

hotkeyset("{F6}","lastpressed")

hotkeyset("{F7}","lastpressed")

hotkeyset("{F8}","lastpressed")

hotkeyset("{F9}","lastpressed")

hotkeyset("{F10}","lastpressed")

hotkeyset("{F11}","lastpressed")

hotkeyset("{F12}","lastpressed")

hotkeyset("+{F1}","lastpressed")

hotkeyset("+{F2}","lastpressed")

hotkeyset("+{F3}","lastpressed")

hotkeyset("+{F4}","lastpressed")

hotkeyset("+{F5}","lastpressed")

hotkeyset("+{F6}","lastpressed")

hotkeyset("+{F7}","lastpressed")

hotkeyset("+{F8}","lastpressed")

hotkeyset("+{F9}","lastpressed")

hotkeyset("+{F10}","lastpressed")

hotkeyset("+{F11}","lastpressed")

hotkeyset("+{F12}","lastpressed")

hotkeyset("{enter}","lastpressed")

hotkeyset("{pgup}","lastpressed")

hotkeyset("{pgdn}","lastpressed")

hotkeyset("{esc}","exitprog")

EndFunc

func exitprog()

keysup()

Exit

EndFunc

func keysup()

send("{shiftup}{ctrlup}{altup}")

EndFunc

func lastpressed()

unsethotkeys()

$lastpressed=@HotKeyPressed

Select

case $lastpressed="{f1}"

msgbox(0,"",$lastpressed)

case $lastpressed="{f2}"

msgbox(0,"",$lastpressed)

case $lastpressed="{f3}"

msgbox(0,"",$lastpressed)

case $lastpressed="{f4}"

msgbox(0,"",$lastpressed)

case $lastpressed="{f5}"

msgbox(0,"",$lastpressed)

case $lastpressed="{f6}"

msgbox(0,"",$lastpressed)

case $lastpressed="{f7}"

msgbox(0,"",$lastpressed)

case $lastpressed="{f8}"

msgbox(0,"",$lastpressed)

case $lastpressed="{f9}"

msgbox(0,"",$lastpressed)

case $lastpressed="{F10}"

msgbox(0,"",$lastpressed)

case $lastpressed="{f11}"

msgbox(0,"",$lastpressed)

case $lastpressed="{f12}"

msgbox(0,"",$lastpressed)

case $lastpressed="+{f1}"

msgbox(0,"",$lastpressed)

case $lastpressed="+{f2}"

msgbox(0,"",$lastpressed)

case $lastpressed="+{f3}"

msgbox(0,"",$lastpressed)

case $lastpressed="+{f4}"

msgbox(0,"",$lastpressed)

case $lastpressed="+{f5}"

msgbox(0,"",$lastpressed)

case $lastpressed="+{f6}"

msgbox(0,"",$lastpressed)

case $lastpressed="+{f7}"

msgbox(0,"",$lastpressed)

case $lastpressed="+{f8}"

msgbox(0,"",$lastpressed)

case $lastpressed="+{f9}"

msgbox(0,"",$lastpressed)

case $lastpressed="+{F10}"

msgbox(0,"",$lastpressed)

case $lastpressed="+{f11}"

msgbox(0,"",$lastpressed)

case $lastpressed="+{f12}"

msgbox(0,"",$lastpressed)

case $lastpressed="{enter}"

msgbox(0,"",$lastpressed)

case $lastpressed="{pgup}"

msgbox(0,"",$lastpressed)

case $lastpressed="{pgdn}"

msgbox(0,"",$lastpressed)

EndSelect

EndFunc

func unsethotkeys()

hotkeyset("{F1}")

hotkeyset("{F2}")

hotkeyset("{F3}")

hotkeyset("{F4}")

hotkeyset("{F5}")

hotkeyset("{F6}")

hotkeyset("{F7}")

hotkeyset("{F8}")

hotkeyset("{F9}")

hotkeyset("{F10}")

hotkeyset("{F11}")

hotkeyset("{F12}")

hotkeyset("+{F1}")

hotkeyset("+{F2}")

hotkeyset("+{F3}")

hotkeyset("+{F4}")

hotkeyset("+{F5}")

hotkeyset("+{F6}")

hotkeyset("+{F7}")

hotkeyset("+{F8}")

hotkeyset("+{F9}")

hotkeyset("+{F10}")

hotkeyset("+{F11}")

hotkeyset("+{F12}")

hotkeyset("{enter}")

hotkeyset("{pgup}")

hotkeyset("{pgdn}")

EndFunc

Edited by DangerousDan

Share this post


Link to post
Share on other sites



From Help File

The following hotkeys cannot be set:

Ctrl+Alt+Delete It is reserved by Windows

F12 It is also reserved by Windows, according to its API.

NumPad's Enter Key Instead, use {Enter} which captures both Enter keys on the keyboard.

Win+B,D,E,F,L,M,R,U; and Win+Shift+M These are built-in Windows shortcuts. Note: Win+B and Win+L might only be reserved on Windows XP and above.

Alt, Ctrl, Shift, Win These are the modifier keys themselves!

Other Any global hotkeys a user has defined using third-party software, any combos of two or more "base keys" such as '{F1}{F2}', and any keys of the form '{LALT}' or '{ALTDOWN}'.


Giggity

Share this post


Link to post
Share on other sites

you wouldn't have thought I'd read that help file, would you... should have read it again I guess. thanks for your help:)

Share this post


Link to post
Share on other sites

No problem. I didn't know it, I just figured if the others work and it doesn't, it must not be allowed.


Giggity

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