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, 12:39 am
  • 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: Feature Request for Hotkey  (Read 7794 times)

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 563
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Feature Request for Hotkey
« on: May 07, 2014, 05:44 PM »
Mouser,  I am dying here.  I *really* want the ability to assign global hotkeys for "Copy last image to clipboard" AND "Copy last image file-path to clipboard".  I am becoming very weary of navigating the menu on the tray icon.

You see, I *love* having the last screenshot image on my clipboard and I use that all the time.  But I just as often need the image's file path.  If I had hotkeys, I could attach the functions to the extra buttons on my mouse and I'd be really happy.

Hopefully there is joy in the future for me!

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: Feature Request for Hotkey
« Reply #1 on: May 08, 2014, 06:23 PM »
I have been planning to rewrite the hotkey system in SC to make it much more flexible and let user configure some custom hotkeys.. so it is on my todo list.
However, let me say this -- one EASY thing for me to add would be some commandline switches or windows-messages that would do common things like you are asking, that you could use with a standalone hotkey tool.
Do you have a standalone hotkey tool that is capable of sending windows messages to a running app?

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 563
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: Feature Request for Hotkey
« Reply #2 on: May 08, 2014, 07:21 PM »
Mouser,

Actually, commandline switches would be even better!  I am an avid autohotkey fan, and I also use powerpro.

Commandline switches would be WONDERFUL!!!!

Yes, I can send messages too, using autohotkey or powerpro.

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: Feature Request for Hotkey
« Reply #3 on: May 08, 2014, 07:37 PM »
Commandline switches would be easier to code, but i fear it might introduce a delay that would be annoying for these particular functions.
Ok let me see what i can add.

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 563
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: Feature Request for Hotkey
« Reply #4 on: May 08, 2014, 07:48 PM »
Mouser - there is another way.

A normal commandline switch will run a new instance of the program, which would require your program to detect an already running version, do it's thing, and then exit.

However, if you add a hidden window with a textbox and a submit button to SC, then you can create a second commandline app that finds that hidden box and types commands into the text box and pushes the submit button.  The second app will do nothing more than receive the commandline, post the simple text, push the button, then exit.

This way, you practically get commandlines to a running application without having to exit.
I have an autohotkey sample of this if you want.
I also made this post on StackExchange about a different method using C#.

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: Feature Request for Hotkey
« Reply #5 on: May 08, 2014, 08:23 PM »
Well i already have code to detect second instance and pass on the commandline paramwters to the first instance.

But, you have a point and an idea -- which is to make a tiny dummy second instance exe that serves no other purpose than to pass along the commandline to the first running instance.
Not a bad idea at all -- and in fact could be done as a generic utility that would work with all of my apps..

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 563
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: Feature Request for Hotkey
« Reply #6 on: May 08, 2014, 10:13 PM »
If you use the same utility for each app, you'll have to have a way for the utility to distinguish between each program's hidden window.

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: Feature Request for Hotkey
« Reply #7 on: May 09, 2014, 11:50 AM »
Can you try the latest beta:

here (or portable).

And try invoking a second instance after the first is running, with commandlines:
   -ccpath  (copy current/last screenshot filepath to clipboard)
   -ccbitmap (copy current/last screenshot image bitmap to clipboard)
   -ccfile (copy current/last screenshot file to clipboard)

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 563
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: Feature Request for Hotkey
« Reply #8 on: May 10, 2014, 10:56 AM »
Mouser,  that works like a charm.  I used autohotkey to set the hotkeys and it works like a charm.

Thank you very much, Mouser!

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: Feature Request for Hotkey
« Reply #9 on: May 10, 2014, 12:56 PM »
Excellent.  I'm happy to hear requests for more such commandline functions, and I will try to make a smaller helper utility and/or support windows messages for faster triggering of these functions.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,964
    • View Profile
    • Donate to Member
Re: Feature Request for Hotkey
« Reply #10 on: May 14, 2014, 09:00 AM »
I'm a commandline noob - do I understand this correctly? ...

SC is e.g. set to save path to clipboard after capture.
I make another shortcut with, say "SC path" -ccfile.
If I start this second instance via FARR, the last screenshot will be copied to the clipboard.

if so, I'm still unsure of the details:
1) does it take a new screenshot and copy that to clipboard?
2) if so, is it full screen image then? or can I still e.g. capture selected area with this new instance?
Tom

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: Feature Request for Hotkey
« Reply #11 on: May 14, 2014, 09:01 AM »
-ccfile doesnt trigger a capture, it simply copies the last capture to clipboard.

if you really want a commandline capture (and copy to clipboard, etc.), use MiniCap.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,964
    • View Profile
    • Donate to Member
Re: Feature Request for Hotkey
« Reply #12 on: May 14, 2014, 09:05 AM »
-ccfile doesnt trigger a capture, it simply copies the last capture to clipboard.

if you really want a commandline capture (and copy to clipboard, etc.), use MiniCap.

I'm happy with the first, will definitely have use for that, thanks to you both!
Tom