Hello,
Is there a strategy in Windows that will let my LC application detect a "hotkey" when the user is actively using another application and my LC application is running in the background?
Users will be in excel and I'd like to execute an action in my app when they hit a hotkey.
Strategies I've considered but not found solutions for:
- sending a vbscript message to my LC application
- using a 3rd party hotkey application and having it talk to my LC application somehow
Thank you,
-Frankel
Hotkey when other application is in focus?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 132
- Joined: Mon Jan 14, 2013 3:37 pm
Re: Hotkey when other application is in focus?
Hello Frankel,
You'll need to create your own LiveCode external that can install a low-level keyboard hook.
For more information, head over to the "Developers" section of the livecode website, and choose "Desktop Externals" on the left-hand side.
You may need to do some C++ or C# coding. You'll need to use the SetWindowsHookEx function in particular.
I hope this helps.
Regards,
- Ledigimate
-- EDIT: It may not have to be a low-level hook. A normal keyboard hook may suffice.
You'll need to create your own LiveCode external that can install a low-level keyboard hook.
For more information, head over to the "Developers" section of the livecode website, and choose "Desktop Externals" on the left-hand side.
You may need to do some C++ or C# coding. You'll need to use the SetWindowsHookEx function in particular.
I hope this helps.
Regards,
- Ledigimate
-- EDIT: It may not have to be a low-level hook. A normal keyboard hook may suffice.
010100000110010101100001011000110110010100111101010011000110111101110110011001010010101101010100011100100111010101110100011010000010101101001010011101010111001101110100011010010110001101100101
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Hotkey when other application is in focus?
Gottit:
http://livecode.com/developers/guides/d ... externals/
as a Linux user I am slightly miffed that this guide seems only to refer to how to do things on Windows and Macintosh.
http://livecode.com/developers/guides/d ... externals/
as a Linux user I am slightly miffed that this guide seems only to refer to how to do things on Windows and Macintosh.
Re: Hotkey when other application is in focus?
Hi Richmond,richmond62 wrote: as a Linux user I am slightly miffed that this guide seems only to refer to how to do things on Windows and Macintosh
This works for linux externals too..
At least it has worked for me few years ago (eg: rev2perl / sunnyperl)
Regards,
Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Hotkey when other application is in focus?
I wonder where the helpful pictures have gone?
image1 src="/wp-content/uploads/2013/10/desktop_externals_1.jpg" />
isn't all that useful.
image1 src="/wp-content/uploads/2013/10/desktop_externals_1.jpg" />
isn't all that useful.