Scripts with user input


#1

Is there a way to get user input for a script?

The problem is that right now I have different actions to add "Acoustic", "Live", "Unplugged", "Demo", "Unreleased", etc. to the title of songs, when actually, all those actions do the same: Format the TITLE value to add a string. Sometimes I need to add a different string to the titles, and I have to create a new action for that. If my action asked me for input, I could do all the above things (and new things I might need in the future) with a single action.

Also, sometimes I like to remove a certain string from a tag field. If scripts could get user input and work with that, one single action could be used to remove any undesired value from your tags.

I'm sure there are other possible uses for this, but these are the ones I need the most.

My suggestion is to implement something like variables. The first time a variable is used, the script will ask the user for input, and from there on, it will retain its value while the script is running.

For example:
Format value TITLE: %title% '['$1(Enter string to append)']'

Would show a small inputbox with the name of the action as the title and the text in between () as the message, and of course, a textbox. After that, $1 will contain the value entered by the user. If he entered "Acoustic", the tag would perform the same as the action I'm currently using: Format value TITLE: %title% '[Acoustic]'.

What do you think, would this be possible to implement with the current scripting system? Do you share my view on the benefits this would bring?
Looking forward to your replies. :slight_smile:


#2

So you mean something like a parameter-request? This would be really helpful and hopefully Florian includes this helpful feature, as it would speed up renaming hundreds of files without selecting ervery two minutes a new set of actions.


#3

Yes! That's exactly what I mean :smiley:


#4

I hate to bump my own topic, but after waiting almost a week and seeing Florian replying in many other topics, I can't help but to wonder if maybe he has missed this one. Hopefully this will bring the topic to his attention and we can get some feedback from him on this suggestion. :slight_smile:


#5

Yes, I also like that idea! I'll put it on my internal wish list.

Best regards,
Florian


#6

Ah, this is great, Florian! I've been eagerly waiting for your approval. Thanks a lot! I can't wait to see this implemented :smiley:

Do you think it will be possible to show a message when asking for a value, like I explained on the first post? Because if I have many actions checked that use user input, it would be nice to know what the action needs from me.

For example, get an input box with the text: "Enter the text to append to the song title". Of course, it would be best if users could write their own messages, so the actions are even more versatile. E.g.: "What string to remove?", "Enter comments", etc.

I thought it would be best if I described it to you first, before you start working on it and write code that doesn't allow it, hehe. :stuck_out_tongue:


#7

This would be really helpful because everybody has his/her own style how to name/describe an action. :slight_smile:


#8

May I ask to extend the functionality even further?
I think it would be very helpful to have an optional default value. :sorcerer:

For example:
Format value TITLE: %title% '['$1(Enter type of music;Acoustic)']'

With the given optional default value "Acoustic" the input field is not empty but shows the value "Acoustic" to be edited or just confirmed with OK.


Garybaldi66: smile · joke · fun
International School Berlin - The Berlin British School


#9

The default input value seems like a good idea to me, as long as it's already highlighted when the window pops up. That way users can just start typing without having to erase the default value before.

Good idea! And great to see I'm not the only one liking this :slight_smile: Thanks for the support.


#10

Well, this thread is nearly 4 years old, but I noticed that Florian showed interest in doing this...
Any chance of it being implemented soon?

It would off-load some of the issues that users currently face... For example, a given page doesn't contain all of the data that I want to put into a tag. I can ask the user to provide the value. If the user leaves the value blank, I can ignore the tag. Otherwise, put the user entered value in the tag.


#11

I couldn't agree more.
In fact I was just about to propose the same thing.
I just can't understant why Florian said he put it in his list some 8 years ago, but never developed it.
What a pity.
Is it so hard to develop?
Can I help?
By the way Mp3Tag is not open source, or is it?


#12

I was going to post a new topic about this...but see it's already here. :smiley:

It would be easy to go overboard on "variables"...but the ability to have an action pop up a simple text input dialog and collect a user inputted string ... and then use that text in an Action would go a long long way...and greatly reduce the number of similar actions.

I have lots of similar actions...variations like this:

  1. Add "XX" to the CONTENTGROUP field.
  2. Add "YY" to the CONTENTGROUP field
  3. Add "XX, YY" to the CONTENTGROUP field
  4. Add "AAA" to the TITLE field
  5. Add "BBB" to the TITLE field

(Note, "XX", "YY", etc. are not real values...just examples.)

If I could type in a value, rather than have to pre-define it, I could simplify my Actions extensively.

Another, sightly different feature that would also be helpful...would be to allow me to specify a set of values in the Action that the user can pick from...then use the selected value in the Action. (BUT the simple "enter a value" solution would suffice in most cases.)

Many thanks to Florian for such a great tool!


#13

This is exactly what happens with me and I think the same happens with many other people.
The Actions feature is very good, but it is lacking this kind of possibility.


#14

Hmm, isn't it the opposite?
Each additional manual input has nothing of 'simplifying' for a process, but carries the risk of incorrect data entries.

On the other hand, me too I have occasionally the need for an interactive action dialog "Ask for user input".

There are already some forum threads which deal with this task, ...
not embedded into a group of actions, but simulating a bit of interaction.

Genre - Standard (Vorgaben) ändern
Creating a Drop Down Menu
COMMENT-Feld als Auswahlfeld - geht das?
??? Can we get Nested Actions?

DD.20140731.1334.CEST