Some "automation" question (on save / save as file dialogs)

What other productivity software are you working with...
Post Reply
matewo
Posts: 70
Joined: 03 Jun 2018 21:35

Some "automation" question (on save / save as file dialogs)

Post by matewo »

Hi All,

when I save content in applications, the Save / Save As dialog shows a predefined (and most of the time marked / selected) file name. How could I modify the file name in an efficient way instead of editing it manually? Comparable to XYplorer's Rename Special > Batch Rename: *--<datem yyyy-mm-dd>?

Maybe a tool like AutoHotKey / CopyQ could do this? If you have any other ideas / tools, please name them!

I think, modifying / extending the (generic) Windows Save Dialog with a drop-in replacement from outside the application is not possible?!

Thanks and best regards, Markus

highend
Posts: 13333
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Some "automation" question (on save / save as file dialogs)

Post by highend »

Copy that selection, run it through a .xys script, paste it back?

Or via AHK (the easiest language for such stuff).
I think, modifying / extending the (generic) Windows Save Dialog with a drop-in replacement from outside the application is not possible?!
Ofc it is. But you should be an experienced C++ coder to be able to accomplish that
One of my scripts helped you out? Please donate via Paypal

Norn
Posts: 417
Joined: 24 Oct 2021 16:10

Re: Some "automation" question (on save / save as file dialogs)

Post by Norn »

Yes, using AutoHokey is the easiest.

Code: Select all

#Requires AutoHotkey v2.0

#HotIf WinActive("ahk_class #32770")
^s::   ; Ctrl + S
{
  name := ControlGetText("Edit1", "A")
  SplitPath name, , , &ext, &basename
  newName := basename . "--" . FormatTime(, "yyyy-MM-dd") . "." . ext
  ControlHide("Edit1", "A")
  ControlSetText(newName, "Edit1", "A")
  ControlSend "{Ctrl down}a{Ctrl up}", "Edit1", "A"
  ControlShow("Edit1", "A")
}
#HotIf
Win10, Win11 @100% 2560x1440 22H2

matewo
Posts: 70
Joined: 03 Jun 2018 21:35

Re: Some "automation" question (on save / save as file dialogs)

Post by matewo »

highend wrote: 11 Sep 2023 16:15 Copy that selection, run it through a .xys script, paste it back?
I hoped, I could do it with a (one) shortcut key. For this case, AHK might be better suited than XYplorer, or?
Ofc it is. But you should be an experienced C++ coder to be able to accomplish that
Which am I. NOT :)

Thanks anyway!

matewo
Posts: 70
Joined: 03 Jun 2018 21:35

Re: Some "automation" question (on save / save as file dialogs)

Post by matewo »

Norn wrote: 11 Sep 2023 22:06 Yes, using AutoHokey is the easiest.

Code: Select all

#Requires AutoHotkey v2.0

#HotIf WinActive("ahk_class #32770")
[...]
#HotIf
Thanks, Norn! I will give it a try! Am not experienced with AutoHotKey (AHK). Time to learn it, though!

Post Reply