Pass variables to a script

Inside the button:
[[OBSOLETE] "Abusing" Rename Scripts to do other things with file info)
(See the examples linked at the top of the post once you're understood the example in the post itself. The linked examples let you put everything into a button without creating a rename preset.)

Outside the button:
[One Hotkey for 2 commands)

FAQ:
Why can't I edit my posts?