Dynamic scripting w/ user set variables

Features wanted...
Post Reply
RalphM
Posts: 2089
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Dynamic scripting w/ user set variables

Post 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>
Ralph :)
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post 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...
Proud XYplorer Fanatic

admin
Site Admin
Posts: 66294
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post 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

admin
Site Admin
Posts: 66294
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Dynamic scripting w/ user set variables

Post 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)

RalphM
Posts: 2089
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Dynamic scripting w/ user set variables

Post 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.
Ralph :)
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)

admin
Site Admin
Posts: 66294
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Dynamic scripting w/ user set variables

Post 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.

Post Reply