Page 1 of 1

Dynamic scripting w/ user set variables

Posted: 28 Jan 2008 23:31
by RalphM
It's quite amazing how far scripting has evolved already.
Thanks a lot again Don.

I'd like to share an idea with you to make scripting maybe even more powerful and reduce the nbr of scripts one has to create.

If there was a new scripting command to ask the user at runtime for input, then we could save the time to create & manage similar scripts for almost identical jobs with slightly different inputs.

Let's say I want to rename my holiday pictures according to the following scheme:

Holidays_xx_yy_01.jpg
Holidays_xx_yy_02.jpg
...

whereas xx and yy would be set at runtime by user input and are valid until the script ends only.

The command could look like the following and would open a popup window with variable nbr ($01) and the caption in the titlebar, a text field for the user input and Ok / Cancel buttons:

::UserInput $01 "Caption"

and in the context of the above example:

::UserInput $01 "Enter location of holidays"::UserInput $02 "Enter date of holidays"::#121 "Holidays_<$01>_<$02><#01>

Posted: 29 Jan 2008 00:39
by jacky
For sure it would be great.

I have no idea about syntax, but I'm pretty sure this is somewhere on Don's list already, as it's been mentioned in the past, as well as the ability to get the user to chose a file/folder I think...

Posted: 29 Jan 2008 08:58
by admin
Indeed, something like this is on my mental map! Still in the breeder... but for sure it will add another level of power. Man, this is going fast... :D

Re: Dynamic scripting w/ user set variables

Posted: 29 Jan 2008 14:44
by admin
RalphM wrote:I'd like to share an idea with you to make scripting maybe even more powerful and reduce the nbr of scripts one has to create.
Done! 8)

Re: Dynamic scripting w/ user set variables

Posted: 30 Jan 2008 00:33
by RalphM
admin wrote:Done! 8)
Quick as always and I'm a bit proud you even liked my naming of that new command, and yes, the default value field was a nice addition too.
Didn't have time yet to test it, but will post again as soon as I got a chance to check it out.

Re: Dynamic scripting w/ user set variables

Posted: 30 Jan 2008 08:37
by admin
RalphM wrote:
admin wrote:Done! 8)
Quick as always and I'm a bit proud you even liked my naming of that new command, and yes, the default value field was a nice addition too.
Didn't have time yet to test it, but will post again as soon as I got a chance to check it out.
Well, today I decided to change the naming a bit! :mrgreen: But I officially declare: Your suggestion was so powerful in form and content that it just converted me to a coding zombie who robotically followed your orders.