Command line interface for a screenshot ??

Jim Warner
2010-09-10
2013-01-20
  • Jim Warner
    Jim Warner
    2010-09-10

    Hi - very interesting tool, may end up being just what I need.  However, one quick question:

    * I configured Greenshot to store the screenshot as a jpeg file; works great.

    * I'd like to have an application call Greenshot to do the screenshot, and using the current preferences, have Greenshot store the shot as a jpeg file.

    * Might have the app do this call to Greenshot from a Dos app, or ?other?

     
  • Jim Warner
    Jim Warner
    2010-09-10

    sorry for jumbled appearance; guess this forum doesn't support text method of formatting :)

     
  • Jens Klingen
    Jens Klingen
    2010-10-16

    Hi there,

    Currently, this is not possible, unfortunately.

    My colleague is working on a feature to open images in the Greenshot editor from the comment line, maybe we could expand this, so that it is possible to initiate a screenshot from the command line, too. However, I cannot promise anything - as you see, there are quite a lot of feature ideas…

    Best regards,
    Jens

     
  • Robin Krom
    Robin Krom
    2011-01-12

    This is actually something I want to do, having some kind of "api" to make Greenshot take a greenshot…
    My Idea was to use the clipboard for it, set a "greenshot" program and will will walk though the commands… the only problem there might be security…. still need to work it out.

    Can you explain in more details what you need?

    Best wishes,
    Robin

     
  • Jim Warner
    Jim Warner
    2011-01-13

    Hi Robin - well, I came up with a work around, so I don't have the same needs as when I started this thread.  What I was wanting to do(at the time) was have an app call Gshot to take a shot, store it as a jpeg, then exit back to the app.  That way, whenever I wanted a screenshot, I could grab it, but only when I wanted it.
    ….
    What I ended up doing was coding up some Windows keystroke macros(via www.autohotkey.com/) for various intervals and I use my app(s) to control Gshot via the various Autohotkey macros.  These macros simulate pressing the Ctl-PrtScr in various intervals(1 sec, 2 sec, .9 sec, etc.).  I then just start up Gshot once, at the beginning of a session, and depending upon what I want, my app(s) fire up different macros to control how often screenshots are taken.

    Works very nicely, but took a while to put all of this together…

    Any other questions, lemme know…

     
  • Jim Warner
    Jim Warner
    2011-01-13

    I might mention that a somewhat clumsy way to have Gshot just take a pic might be to have an app fire up Gshot, then fire up a macro similar to what I use that will press the Ctl-PrtScr just once.  The app could then kill both Gshot and the macro, say via the Windows 'taskkill' command(maybe from a Dos/batch file session).  Kind of a sledge hammer approach, and might be a bit costly on cpu if done really frequently, but it would probably work.  I could see doing this from an app that just wanted a screenshot occasionally.

     

  • Anonymous
    2012-11-06

    Hi Guys,
    I use greenshot a lot. Best screnshooter ever :)
    Usually I just cut a nice screenshot from random windows, and as they are put on clipboard I can easily past them in emails, etc. In some cases I need to edit the screenshot, draw some lines, other markups. In this cases I have to rightclcik the Greenshot Tray Icon, and than select "open image from clipboard". I have this situation in approximatley 33% of the cases. So setting Greenshot to allways pop up after every screenshot would be counterproductive, though it would be great to have a keyboard shortcut for "open last screenshot in editor".

    Another thing I need is some automatism (instead of clicking) to make my screenshots "torn edge" / "bordered" / "Grayscale". A shortcut would be the best, for this too, or at least a keyboard Letter assignment to these tools in the image editor window, like R=Rectangle, E=Elipse,… similarly T=TornEdge, D=DropShadow, etc…

    I guess these Ideas are quite far from development directions…
    so as a power Autohotkey user I thought if Greenshot had a commandline interface all of this could be solved on my own.

    Can you please let me know what are my outlooks for the above mentioned two topics? I make about 20 screenshots a day so I would really like to tune this process as productive and fast as possible.

    thanks.
    Giny8i8

     
  • Robin Krom
    Robin Krom
    2012-11-06

    I was just about to call it a day, but still wanted to answer.
    Tomorrow I'll read your post again, and think about it.

     

  • Anonymous
    2012-11-07

    I am waiting patiently :)

     
  • Robin Krom
    Robin Krom
    2012-11-08

    Hi giny8i8,

    We certainly want to make Greenshot usable from AutoIt/AutoHotkey and other scripting tools, like the commandline JavaScript etc. I even know how to do this, but currently I just don't have the time to finish this… Automation of the editor is a bit of a different thing, it will be possible some day but would take even more time as I need to rewrite some things in the core of Greenshot.

    A key to open the last screenshot in the editor? If you use the clipboard it might be gone, on the file system you might have renamed it, things we need to consider. We actually are considering a different approach, but as this is long term it will be to far in the future…

    We want to make solutions that don't confuse people and can be used by the masses. This is one of the reasons we have made the Office plugin, exporting directly to Outlook saves using the clipboard which is one of the worst things Microsoft ever made! The people I work with in my regular job make the mistake to use the clipboard so often, and than I get an 5MB email just because there is an image in it!!

    Anyway there is still a long way to go for Greenshot, and the hardest part is to make everyone happy. Therefore we need people who describe what they do and what costs them the most time. Than we can see how to optimize productivity! You are thinking in solutions which is more or less our job ;-)

    Try to describe what you do, especially what costs a lot of time, without telling us what might solve it. Can you do that for us?

    Best wishes,
    Robin

     

  • Anonymous
    2012-11-15

    Hi Robin,
    Sure. Sorry for thinking in solutions. In my current job it is expected from me, it became a habit.
    I thought that besides giving tips, I am describing my needs correctly, but I'll try it again:

    1. -- Open last screenshot - shortcut -------------------

    A cutomizeable keyboard  shortcut to open Greenshot with the last screenshot in the editor.
    -- OR
    If that is not possible, than there  is a tray-icon-rightclcik-option  currently in greenshot: "open last screenshot in editor" I would like to have a keyboard shortcut for this.

    In "destination" setting I use only "save as file" and "copy to clipboard". I would like to see the greenshot window only if I need it for annotations  (33% of the cases), in this cases I would like to access it fast, with a shortcut, and not with the tray-icon-rightclcik-option.

    2.  -- Add effects to all taken screenshot - setting -------------------

    It would be nice to have a toggle setting to enable/disable  "torn edge" / "bordered" / "Grayscale" effects to all (!) screenshots I make.

    For example I like torn edge effect, but I have to apply it manually on every screenshot, that is counter productive. Expected result: I would like to 1 - make the screenshot, than 2 - paste it in a document with the edges already torn, without seeing the Greenshot window.

    3. -- Key assignment for  Effects -------------------

    A keyboard Letter assignment (like R=Rectangle, E=Elipse,…) would be nice for these effect tools in the image editor  window for quick access:
    - Border
    - TornEdge
    - DropShadow,
    - GrayScale
    - invert
    -- OR
    At least a  keyboard Letter assignment  to pop up the effects button menu, to select the needed effect.
    -- OR
    A separated menu (like: File, Edit, Object, Help…) for the Effects for quick keyboard access

    Currently Effects can be selected only by mouseclick (or I did not find the shortcut), this is counterproductive.


    regarding these 3 topics, it would be easy to fabricate a solution for myself if there were a command line interface for Greenshot, hence I am posting in this topic. Maybe my requests should be separated to different threads. If that is needed, please advice where…

    Thanks.
    Giny8i8

     
  • Robin Krom
    Robin Krom
    2012-11-15

    Yeah, we really need to do something about the effects, you said it right "no shortcuts". This should happen soon.
    About your "2" read this here, it describes pretty much what I alread have in mind: https://sourceforge.net/tracker/index.php?func=detail&aid=3587479&group_id=191585&atid=937975

    And for your "1" we would like to create a history, which can be used to export/edit captures that you have taken. Should be callable via a hotkey, if the user configures this or by clicking the icon.

    For now we are still working on the basics, we have a lot of work to do before this is available.

     

  • Anonymous
    2012-11-16

    Hi Robin,

    1. -- Open last screenshot - shortcut ------------------- ?

    History sounds nice, though that is not really what I need, I am not interested in any previous screenshots, only in the latest one.
    So in the meanwhile…:

    There  is a tray-icon-rightclcik-option  currently in greenshot: "open last screenshot in editor" can I get  a tiny customizeable  keyboard shortcut for this function (probably in: Settings > General > Hotkeys … ?) My suggestion for the default shortcut for this is Alt+Shift+PrintScrn as it is easy to press with left hand on the ASDF base position.

    2.  -- Add effects to all taken screenshot - setting ------------------- ?

    What you linked is a sort of "Settings Template" feature. If I get it right, there will be an Effects section in the template, so I can set my permanent effect settings there? This way, (if I set it in the template) all my screenshots will have the "Torn" effect for instance? - Please confirm!

    3. -- Key assignment for  Effects ------------------- X

    So Effects key assignments are on their way. I am happy about this :) good news, thanks.


    Thanks for the update it made my day :)
    Please answer 1 and 2!

    Thanks.
    Giny8i8

     

  • Anonymous
    2012-11-28

    Hi Robin,
    I wonder if you had time to look into this one?

     
  • Robin Krom
    Robin Krom
    2012-11-28

    Hi Giny8i8,

    What version of Greenshot are you actually using?
    Somehow I find your questions not representing the current 1.0 version.

    1) The "open last screenshot in editor" is no longer there and we added the dynamic destination picker which might solve your issue differently as you might want but it could be a working solution. For the 1.1 I will have a look to make something which will make it possible to configure what happens if you left-click the icon.

    2) If you want to have a torn effect on all your captures, this will be possible.

    Best wishes,
    Robin

     

  • Anonymous
    2012-11-29

    Hi Robin,
    I am using: Greenshot 1.0.6 Build 2228 (64 bit)
    And I made a mistake above, the item is not called  "open last screenshot in editor" but "open image from clipboard". Sorry for misleading… So My corrected question is:

    -  "open image from clipboard" Shortcut -
    There  is a tray-icon-rightclcik-option  currently in greenshot: "open image from clipboard" can I get  a tiny customizeable  keyboard shortcut for this function (probably in: Settings > General > Hotkeys … ?) My suggestion for the default shortcut for this is Alt+Shift+PrintScrn as it is easy to press with left hand on the ASDF base position.

     
  • Robin Krom
    Robin Krom
    2012-11-29

    Aha, understood. Would it help if I made the left-click on the icon configurable to do your bidding?
    I can make some quick actions available, like open last in explorer, open last in editor, open image from clipboard etc.
    This would be possible for the 1.1, although I'm not sure about if I manage to make the settings available in the GUI.

    The hotkey would be to specific, so you'll have to wait until I manage to make all the actions configurable… this will take much longer.

    Best wishes,
    Robin