Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change default the file's extension that will be saved? #15

Open
liwenjing93 opened this issue Feb 10, 2020 · 7 comments
Open

How to change default the file's extension that will be saved? #15

liwenjing93 opened this issue Feb 10, 2020 · 7 comments

Comments

@liwenjing93
Copy link

liwenjing93 commented Feb 10, 2020

Hi @EslaMx7, I regularly save images from clipboard, and I like to save them with .Jpg instead of .Png format, because .jpg will have a smaller file size than .png. However, everytime I want to save an image, I have to choose AGAIN .jpg because the default option is always .png. It has always annoyed me a lot.

image

I hope you could make some changes into that software in the next release, so that I could change the default option from png to jpg or another extension.

Thank you so much, your software is really useful. I love it so much.

Best Regards,

@liwenjing93 liwenjing93 changed the title How to change default file's extension that will be saved? How to change default the file's extension that will be saved? Feb 10, 2020
@EslaMx7
Copy link
Owner

EslaMx7 commented Feb 12, 2020

@liwenjing93 Thank you very much for your feedback!
I will make sure to have this issue fixed in the next release very soon.

@liwenjing93
Copy link
Author

I will make sure to have this issue fixed in the next release very soon.
Thank you!!!

@edwardjohnson11
Copy link

Choosing a default would be great!

Additionally, would also be great if an underscore is used in the automatically generated file name, between the date and the time, so as to avoid hyperlink issues: 13-04-2020_21-38-23

@subz390
Copy link

subz390 commented Sep 12, 2021

BUMP +1 on being able to set the default file extension.
For the majority of saving applications I choose jpg as it takes up less space.

@barn852
Copy link

barn852 commented Jan 21, 2022

Yes, it would be so good to change or have option for default image format. I think most people use jpg for any kind of image, except for some specific purpose.

@subz390
Copy link

subz390 commented Jan 22, 2022

For anyone who's interested here's an AutoHotkey script that'll send keyboard inputs to select the jpg save as extension and press enter.

  1. Install AutoHotkey
  2. Copy the script into a file with an .ahk extension and double click the file to run it.
  3. To start up with Windows put the file in the Windows startup folder.

For reference I've added the modifier keys in comments so you can set your key combination preference.

#SingleInstance, Force
SendMode Input ; Forces Send and SendRaw to use SendInput buffering for speed.
SetWorkingDir, %A_ScriptDir%
#MaxThreadsPerHotkey, 1 ; no re-entrant hotkey handling

; ! Alt
; + Shift
; ^ Ctrl
; ^+ Ctrl Shift

; ====================================================
; PasteIntoFile
; sets the save as extension to jpg
; Ctrl Shift j
#IfWinActive ahk_exe PasteIntoFile.exe
^+j::
    Send, {Tab}{Down}{Tab}{Tab}{Tab}{Tab}{Enter}
return

ahkinstructions

@barn852
Copy link

barn852 commented Apr 2, 2022

Thanks @subz390 for the idea of using AutoHotkey. I have modified it so the script changes png to jpg any time PasteIntoFile is executed. Maybe it is not the nicest solution, but it works. If you want to use it for other extension, just replace png/jpg accordingly.

#SingleInstance, Force
While 1{
  WinWaitActive ahk_exe PasteIntoFile.exe
  ControlGetText Val,Edit1,ahk_exe PasteIntoFile.exe
  If (Val="png")
    ControlSend Edit1,{Down},ahk_exe PasteIntoFile.exe
}

update1: changed the code, the previous did not work well
update2: I have just found eltos' fork that has a config to set the default image format. No need for the the ahk script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants