Announcement

Collapse
No announcement yet.

Command line option: save clipboard image to file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Command line option: save clipboard image to file

    Could the following be considered:

    A switch could that saves the image in the clipboard to a file, something like /fromclip
    (Maybe as a bonus, save text in clipboard also as an image?)

    I searched for clipboard in the forum didn't find anything and in the help file only has /clippaste and /clipcopy.
    ?

    #2
    try:

    i_view64.exe /clippaste /convert=<filename>

    where <filename> is the name of the file to paste to.

    The following script should work (I wrote it to save a print screen to a file) (PrtSc key on my computer):

    REM create filename from time
    set CUR_YYYY=%date:~10,4%
    set CUR_MM=%date:~4,2%
    set CUR_DD=%date:~7,2%
    set CUR_HH=%time:~0,2%
    if %CUR_HH% lss 10 (set CUR_HH=0%time:~1,1%)
    set CUR_NN=%time:~3,2%
    set CUR_SS=%time:~6,2%
    set CUR_MS=%time:~9,2%
    set SUBFILENAME=Capture_%CUR_YYYY%%CUR_MM%%CUR_DD%-%CUR_HH%%CUR_NN%%CUR_SS%.jpg

    REM save PrtSc and open in IrfanView
    "C:\Program Files\IrfanView\i_view64.exe" /clippaste /convert=%SUBFILENAME%
    start "C:\Program Files\IrfanView\i_view64.exe" %SUBFILENAME%
    Last edited by IrfanUserGuyxyx; 15.06.2024, 08:38 PM.

    Comment


      #3
      Originally posted by IrfanUserGuyxyx View Post
      try:

      i_view64.exe /clippaste /convert=<filename>

      where <filename> is the name of the file to paste to.

      The following script should work (I wrote it to save a print screen to a file) (PrtSc key on my computer):

      REM create filename from time
      set CUR_YYYY=%date:~10,4%
      set CUR_MM=%date:~4,2%
      set CUR_DD=%date:~7,2%
      set CUR_HH=%time:~0,2%
      if %CUR_HH% lss 10 (set CUR_HH=0%time:~1,1%)
      set CUR_NN=%time:~3,2%
      set CUR_SS=%time:~6,2%
      set CUR_MS=%time:~9,2%
      set SUBFILENAME=Capture_%CUR_YYYY%%CUR_MM%%CUR_DD%-%CUR_HH%%CUR_NN%%CUR_SS%.jpg

      REM save PrtSc and open in IrfanView
      "C:\Program Files\IrfanView\i_view64.exe" /clippaste /convert=%SUBFILENAME%
      start "C:\Program Files\IrfanView\i_view64.exe" %SUBFILENAME%

      Thank you!

      (Sorry for my very late response)

      Comment

      Working...
      X