Dynamic scripting w/ user set variables
Posted: 28 Jan 2008 23:31
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>
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>