topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 1:39 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Hotkey commnads via icons  (Read 15169 times)

Earthcoder

  • Participant
  • Joined in 2007
  • *
  • Posts: 48
    • View Profile
    • Donate to Member
Hotkey commnads via icons
« on: October 14, 2009, 07:15 AM »
Hello

Is it possiable to have a icon on the bar that will run a hotkey trigger instead of pressing the hotkey.

e.g. I have a notes program (stickies) that when you press Win+S opens a new sticky is it possiable to add this hotkey to the tool bar so you just click a icon and it does the hotkey for you, i would find this very good as have alot of programs that use hotkeys but would much perfer to click a icon that would emulate the pressing of keys.

i have alot of programs that i have hotkeys set too but much perfer to just click a icon for it.



Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: Hotkey commnads via icons
« Reply #1 on: October 14, 2009, 08:15 AM »
There's no reason that you couldn't make an AutoHotKey script (or AutoIt3) and add that to the menu.

For example, the following opens the Windows Search window (Windows+f)
Code: AutoIt [Select]
  1. Send, #f

You could easily make the scripts specific to specific windows if needed too.

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 689
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Re: Hotkey commnads via icons
« Reply #2 on: October 14, 2009, 09:39 AM »
Isn't it easier to press win+s compared to moving your mouse to the toolbar and clicking on a button?
<a href="https://sridharkatakam.com">My blog</a>

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: Hotkey commnads via icons
« Reply #3 on: October 14, 2009, 10:05 AM »
Ours is not to wonder why...

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Hotkey commnads via icons
« Reply #4 on: October 14, 2009, 11:03 AM »
Isn't it easier to press win+s compared to moving your mouse to the toolbar and clicking on a button?

it might be faster to do that -- but if you read his post he basically says he has lots hotkeys and would prefer a visual representation of icons to click instead of having to remember which keys to hit to do what, which makes sense to me.

although i could add support to LBC to send hotkey stuff, i think Perry's suggestion is the best -- download AutoHotkey and write very simple scripts in that, which will allow you to trigger hotkeys but also do all kinds of other stuff easily.

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: Hotkey commnads via icons
« Reply #5 on: October 14, 2009, 07:58 PM »
although i could add support to LBC to send hotkey stuff, i think Perry's suggestion is the best -- download AutoHotkey and write very simple scripts in that, which will allow you to trigger hotkeys but also do all kinds of other stuff easily.

yep...
  • it'd support remapping of hotkeys out of the box (so to speak)
  • and you could chain hotkeys together to make it even more functional
  • ...not to mention all the "other stuff"  ;)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Hotkey commnads via icons
« Reply #6 on: October 14, 2009, 08:01 PM »
one thing i could do is add a "run code" box in a node configuration that would allow you to put in some ahk code text directly in a node, and which would run autohotkey on the supplied code -- would just make it easier to run simple actions like this.

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: Hotkey commnads via icons
« Reply #7 on: October 14, 2009, 08:34 PM »
Yes, I thought of that, but what about the AutoIt3 users, or the vbScript users, or javaScript, etc?

I guess that's where having a file extension comes in handy.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Hotkey commnads via icons
« Reply #8 on: October 14, 2009, 08:35 PM »
yep, i was thinking that as well - let user specify file extension for the code.

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: Hotkey commnads via icons
« Reply #9 on: October 14, 2009, 08:36 PM »
Then I think you've got a winner!  :-*

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,149
    • View Profile
    • Donate to Member
Re: Hotkey commnads via icons
« Reply #10 on: November 19, 2009, 06:28 AM »
Maybe you can use the "Arguments:" box at "Application/Command/File/URL" Tab for this issue?

Just add an feature to save this Arguments as temporary file in %tmp%
and give this temp-file as parameter to the app defined in "Application/Command"-field.

After executing delete the file.

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,149
    • View Profile
    • Donate to Member
Re: Hotkey commnads via icons
« Reply #11 on: November 20, 2009, 02:49 AM »
Or maybe better provide an %arg% parameter.

I think about using this %arg% in "Application/Command"-field.

If LBC find %Arg%, the content of the Arguments-field is saved as temp file with an extension given after %arg%
and the placeholder "%arg%.ext" is replaced by the name of this temp file
and the "Application/Command" is executed with this expanded command.

That way i could use
Application/Command: cScript %Arg%.Vbs //B //T:20
execute: cScript %tmp%\xfgskxnnkj.Vbs //B //T:20
or
Application/Command: AutoHotkey.exe [Switches] %Arg%.Ahk [Script Parameters]
execute: AutoHotkey.exe [Switches] %tmp%\iudshjbbf.Ahk [Script Parameters]
 

bensbush

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: Hotkey commnads via icons
« Reply #12 on: September 21, 2010, 10:39 AM »
Hello,

I am an owner of a slate-pc (tablet without keyboard) and i've been looking for a program that can send hotkeys via icons like for ages.. =)
And what is discussed here really get's pretty close to that, what i'm searching for.
Though i'm not completely sure whether an ahk-script would solve my problem.

Consider this scenario:
A very simple task, that occurs like a thousand times daily. I just want to copy some text from one program to another.
OK. I select the text. I click on the dedicated symbol in LBC. At this moment LBC gets the handle and the ahk-script would send the ctrl+c to LBC and not to the active window, where the selected text is.
Same with pasting the text.
 
So one disadvantage with this script-solution would be that some special hotkeys for special programs need to be sent directly to that special program.
I think, having symbols that can send keystrokes to the active window is an essential function especially for tablet/slate pc's.
There are countless hotkeys, that could be used, to make life easier on a machine without keyboard. This would boost the handling with tablet/slate pc to a newer level!!
Unfortunately I haven't found one single application yet, that can do this.
Any suggestions??

Regards,
Bensbush

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Hotkey commnads via icons
« Reply #13 on: September 21, 2010, 12:35 PM »
At this moment LBC gets the handle and the ahk-script would send the ctrl+c to LBC and not to the active window, where the selected text is.
Same with pasting the text. So one disadvantage with this script-solution would be that some special hotkeys for special programs need to be sent directly to that special program.

great point Bensbush!

you have convinced me to look into this -- and i'll see if i can't have LBC be able to send hotkeys, which should be easy, but also remember the last active window and restore it, useful for sending the hotkeys to and also maybe just in general when launching applications it would be better to restore the last window focus before doing so (or at least have an option for that).

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Hotkey commnads via icons
« Reply #14 on: April 16, 2012, 01:37 AM »
The ability to simulate hotkeys when pushing a button has now been added to LaunchBar Commander 1.32.01.
It restores the last active window and so can be used to send keys to that window and even paste specific text into it.