Sign in to follow this  
Followers 0
Aktonius

Any way to type a key thats used by sethotkey?

6 posts in this topic

#1 ·  Posted (edited)

I can do the thing inside hotkey func like

if notactivewindow then return

but this will still keep the key unusuable so i wont be able to use it in skype for example unless i completely disable hotkey.

Edited by Aktonius

Share this post


Link to post
Share on other sites



but this will still keep the key unusuable so i wont be able to use it in skype for example unless i completely disable hotkey.

correct and what is the problem with that?

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Jos, i want to use a key like (0-9 on keyboard) in specific situations(while i am chatting in skype for example) but when that key is needed for hotkey(example firefox is active) i want it to act as hotkey.

I have app that heavily relies on hotkeys, so if say my users load the app, have fun using it in specific situation and then decide they want to chat on skype they would need to delete all hotkkeys that they want to use on skype which as you can assume is not fun way to go around it.

Edited by Aktonius

Share this post


Link to post
Share on other sites

Jos, i want to use a key like (0-9 on keyboard) in specific situations(while i am chatting in skype for example) but when that key is needed for hotkey(example firefox is active) i want it to act as hotkey

Just test which Window is active in the Hotkey Function and do a Send() for the key when its not the window to want to act upon.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

ahhh, how simple , /redface

Edited by Aktonius

Share this post


Link to post
Share on other sites

Checking the active window will work well if you have application specific hotkeys. IF you have hotkeys that need to work in many applications it might be worth it to use _IsPressed as it doesn't stop the key from being send to the active application.

I have an example

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