# Suggestion: 'Splice' command for WS

**URL:** https://community.mp3tag.de/t/suggestion-splice-command-for-ws/61854
**Category:** Web Sources Discussion
**Created:** [August 18, 2023, 6:17pm UTC](https://community.mp3tag.de/t/suggestion-splice-command-for-ws/61854 "2023-08-18T18:17:31Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![rboss](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/5f9b8f/32.png) [@rboss](https://community.mp3tag.de/u/rboss)
#### Post date: [November 24, 2023, 2:47pm UTC](https://community.mp3tag.de/t/suggestion-splice-command-for-ws/61854/2 "2023-11-24T14:47:42Z")

</div>

With version 3.22 and the addition of a configuration schema, the previous suggestion becomes (more) viable.

Instead of 'cheating' a value in `CurrentUrl`, I'm revising the suggested 'splice' command into a `SayVar "key"` command, with the idea of user inputs from the dedicated Settings menu item being called directly in the script.

Example:

Currently, adding an input box in the settings file, like

```auto
  "type": "number",
	  "key": "testNumber",
	  "title": "Enter cover size",
	  "description": "Enter a number",
	  "default": 42

```

and calling it in the script, using `IfVar`

```auto
IfVar "testNumber" "42"
	...
	replace "600x600bb" "42x42bb"
EndIf

```

is working. This example allows to define a cover size in the settings menu, and get the cover art in that size; but only if the input is "42".

For this example to work with any input number, it would imply coding `IfVar` clauses for every numeric value, which is impractical. Instead, with a dedicated command, the value would be called directly into the current buffer, like

```auto
...
replace "600x600bb" ""
SayVar "testNumber"
Say "x"
SayVar "testNumber"
Say "bb"
...

```

which would return the same results as before (42x42bb), but would also allow for any numeric/string value to be used.

Another example would be to get the current values on the settings schema in an output, like

```auto
OutputTo "CurrentSettings"
Say "testChoices:"
SayVar "testChoices"
Say "|"
Say "testEnter:"
SayVar "testEnter"
Say "|"
Say "testNumber:"
SayVar "testNumber"
Say "|"
Say "testCheck:"
SayVar "testCheck"
Say "|"
...

```

which would be useful, for example, in debugging.

This is merely a (revised) suggestion for consideration. Feedback would be appreciated.

---

_[View the full topic](https://community.mp3tag.de/t/suggestion-splice-command-for-ws/61854)._
