Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Shortcut for menu/Automatically Fill Values/Clipboard: line per track? (Read 3151 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Shortcut for menu/Automatically Fill Values/Clipboard: line per track?

I often use Foobar2000:Properties/Automatically Fill Values and want to make a Keyboard-Shortcut for this way:

Context Menu --> Properties --> Tools --> Automatically fill values...

As Source I use only „Clipboard: line per track“. I have to constantly change this, because the Programm Foobar2000 offers first „File names“...

As Pattern I use only %artist%;%album artist%;%album%;%date%;%title%;%track number%;%genre%. I have to constantly klick this, because the Field Pattern is empty.

Can I get this without Choosing and changing anything? There is only this 1 Plattern!

Is there a posibility to have this fixed Configuration on a Shortcut like Strg+Y?

Thanks for helping
AldiMp3

Shortcut for menu/Automatically Fill Values/Clipboard: line per track?

Reply #1
For tasks like this, there is the (free, open-source) program AutoHotkey. A script for your task could look like this:

Code: [Select]
^Y::
send !{Enter}; Properties dialog
sleep, 50
send !T; Tools menu
sleep, 50
send f; Fill values
sleep, 50
send {down}; Clipboard
sleep, 50
send +{TAB 3}  {space}; Paste button
send {TAB 5}; select pattern field
send `%album artist`% - `%tracknumber`% - `%title`%
;send !O; press OK. Uncomment this line only if the script works as expected
return


Have a look in the documentation, especially for the send function. The last line is in comment, so that it won't close the dialog. (Semicolon begins a comment.)

Shortcut for menu/Automatically Fill Values/Clipboard: line per track?

Reply #2
great idea it works with this script:

^Y::
send !{Enter}
sleep, 50
send !Tf               
sleep, 50
send c{TAB 2}
send `%artist`%_`%album artist`%_`%album`%_`%date`%_`%title`%_`%track number`%_`%genre`%
send !O
sleep, 50
send !O
return

thank you very much
AldiMp3

Shortcut for menu/Automatically Fill Values/Clipboard: line per track?

Reply #3
my next steps are:

STRG+M
Context Menu --> Tagging ---> Attach pictures --> Front cover

with Strg+M I make for tagged files a new folder + file name structures and the needed front cover is always the first picture in the cover-folder (sorted by last modification)

Is it possible to enlarged the script with Foobar-Shortcuts and another context-Menu, so that all works with Strg+Y?

For a Newbee it isn't easy to make this alone

Thanks for helping
AldiMp3

Shortcut for menu/Automatically Fill Values/Clipboard: line per track?

Reply #4
Just let your script "send ^M" before the return. (Maybe add another sleep 50 to wait for the Properties Dialog to properly close.)

Shortcut for menu/Automatically Fill Values/Clipboard: line per track?

Reply #5
For tasks like this, there is the (free, open-source) program AutoHotkey.

Wow thanks very much ojdo, like AldiMp3, I was looking in the foobar2000 shortcut preferences with no luck. I’m also an AHK great fan and user but I did not think of it for this problem ! Maybe because I’m used to a very configurable foobar2000, I’m not used to need external soft for it.

Here I share my AHK setup (I don’t use clipboard, I use Other…), it’s a special formatting I like that may not suit you but you can change it with foobar2000 syntax.
It does these things to ARTIST, TITLE and ALBUM (and ALBUM ARTIST*) :
  • → UPPERCASE
  • ' → ’
  • ... → …

Code: [Select]
; ######################################
; FOOBAR2000 : AUTOMATICALLY FILL VALUES
; ######################################
#ifwinactive ahk_exe foobar2000.exe
^y::
sendinput !{enter}; warning, must select some files first
winwait, Properties
ifwinnotactive, Properties, winactivate, Properties
winwaitactive, Properties
sendinput !tf
winwait, Automatically Fill Values
ifwinnotactive, Automatically Fill Values, , winactivate, Automatically Fill Values
winwaitactive, Automatically Fill Values
sendinput o{tab}
sendinput % "$replace($replace($upper(%artist% :: %album% :: %title% [:: $meta(album artist)]),'',’),...,…)"
sendinput {tab 2}
sendinput % "%artist% :: %album% :: %title% :: %album artist% "
sendinput !o
return

(*) Incidentally adds album artist even on non various-artists albums (VAA) :/ (quite dumb but I didn’t want to have both a VAA pattern shortcut and a non-VAA pattern shortcut, so I delete the album artist tag manually after shortcut, maybe there is better way I didn’t find yet).
edit : fixed using $meta(album artist) instead of %album artist% (very frequent fix).

What I added compared with your great help is :
  • Only triggers in foobar2000 (but same known problem : I don’t check if there is selected lines in fb2k first as it would require difficult code with ControlGet that I have no clue about)
  • Waits for specific windows instead of relying on sleep timers
  • Using sendinput is both faster and safer than send

So if someone can help me with my ALBUM ARTIST problem and test if selected problem, you’re very welcome.