Prompt?

I just keep finding new and challenging ways to use Dopus, eh?

As part of a script I'm writing, I'd like the ability to use a variable that is inputted by the user. It doesn't have to be super clean or tons of features - I'd just like to be able to type something in a box, then hit a script button - and have the script read the box (I'm thinking perhaps I can extract the information from the LOCATION box - since you CAN type in there ...

In practice, this is what I'd like to do ...

  1. Enter a value (this will be used to rename photos to something meaningful later) like: "disneytrip"
  2. Hit a button with a script that does a mass file rename on a selected group of pictures in a predefined folder, with a predefined path using the variable "disneytrip" as part of the command.... (psuedo code):

rename c:\pics*.bmp variable:disneytrip_.bmp sequentialnumbering=on startnumber=1

... this would be only the FIRST of many commands in the script.

The more I think about it, the less likely I think this is - however, knowing Dopus, there is always something tucked away.

What would be REALLY handy would be a simple input box you could call and assign a parameter to for scripting:

INPUT TEXT="Enter a new name for the pictures:" DEFAULTVALUE="disneypics" VARIABLE=%1
RENAME "C:\pics*.bmp" "c:\pics%1_.bmp" sequentialnumbering=on startnumber=1

Imagine if we had the ability to do a simple query with simple variables (we don't need a full programming language here - no polymorphism required :slight_smile: ) but just something we can use to automate things EVEN FURTHER. Dopus already saves me so much time its not even funny - adding this little feature (if it isn't already hidden in there somewhere) would make it even better.

I use the following command to strip characters from all selected filenames. It uses the {dlgstring} argument to present the user with string entry dialog - which sounds like what you want. See Chapter 16 of the manual (page 186 specifically) for more information on these arguments.

rename pattern {dlgstring} to ~ findrep

In this case, any text I enter is removed when the selected files are renamed. I would think you can modify this to suit your needs.

YES! That's it! Whoo hoo!

Thanks! I'll get started from there!

See, I knew Dopus already had it ...

I was working off the HELP file, not the manual .. that's probably my first mistake...

It's in the help file too. :slight_smile:

Under External Command Control Codes.