# Use contents of an output variable as current input

**URL:** https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122
**Category:** Web Sources Discussion
**Created:** [November 11, 2025, 4:04pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122 "2025-11-11T16:04:47Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![arb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/41988e/32.png) [@arb](https://community.mp3tag.de/u/arb)
#### Post date: [November 11, 2025, 4:04pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/1 "2025-11-11T16:04:47Z")

</div>

It might be nice also having something like `PointFormat`, where multiple format transformations to the current selection are needed before a final `Say` to output:

```auto
OutputTo "TEMP_LANGUAGE"
json_select "language"
SayFormat "$left(%_current%,2)"

OutputTo "LANGUAGE"
RegexpReplace "^.*" "%TEMP_LANGUAGE%"
SayFormat "$caps(%TEMP_LANGUAGE%)

```

I'd also vouch for `PointAt` to load in output buffers or `%output%` to the pointer as `RegexpReplace "^.*"` can be funny with certain characters if not escaped or replaced before-hand due to regex limitations.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [November 11, 2025, 7:48pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/2 "2025-11-11T19:48:36Z")

</div>

I have this on my internal wish list

 ![image](https://community.mp3tag.de/uploads/default/original/3X/e/e/ee3e5330a7233f382eb26a7289b1d82f7ef1179f.png)

`Use "output"` and `UseFormat "%output1%|$upper(%output2%)"` are I think what you're also suggesting above.

---

<div class="post-metadata">

### Author: ![arb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/41988e/32.png) [@arb](https://community.mp3tag.de/u/arb)
#### Post date: [November 11, 2025, 7:52pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/3 "2025-11-11T19:52:56Z")

</div>

Looks good! What’s the | for in `UseFormat`?

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [November 11, 2025, 7:53pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/4 "2025-11-11T19:53:53Z")

</div>

It's just text that would separate the contents of `%output1%` and `%output2%`. It's free-form and just serves as an example.

---

<div class="post-metadata">

### Author: ![arb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/41988e/32.png) [@arb](https://community.mp3tag.de/u/arb)
#### Post date: [November 11, 2025, 7:58pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/5 "2025-11-11T19:58:40Z")

</div>

Ah, just for illustrative purposes, would be a bit much trying to process multiple outputs at once to be fair 😮‍💨_Also makes sense just having one command that would do the work of both ideas at once_. ← Edit: Ignore this please. Got confused.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [November 11, 2025, 8:02pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/6 "2025-11-11T20:02:58Z")

</div>

I'm not sure if we are having the same ideas about the feature. Can you elaborate a little on your last post?

---

<div class="post-metadata">

### Author: ![arb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/41988e/32.png) [@arb](https://community.mp3tag.de/u/arb)
#### Post date: [November 11, 2025, 8:11pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/7 "2025-11-11T20:11:40Z")

</div>

_Oh sorry, you’ve got the idea absolutely spot on._ _`Use` just seems redundant if `UseFormat` already does the job of loading an output into current input **and** uses format strings._ ← Edit: Ignore this please. Got confused.

I was also just guessing the function of | as if it were for processing both %outputs% but that seems a bit much 😅

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [November 11, 2025, 8:18pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/8 "2025-11-11T20:18:35Z")

</div>

OK, thanks for the extra explanation. I just wanted to be sure I wasn't missing anything and needed that extra bit of detail to follow your assumption about processing both outputs. 😅

Yes, `Use "output"` would produce the same result as `UseFormat "%output%"`, but the former can be implemented in a more performant way.

What to you think about the naming of the functions `Use` and `UseFormat` compared to `PointAt` and `PointFormat`? I feel that `Use*` is a little bit more direct.

* * *

I'm splitting this to a separate topic so that this suggestion can be tracked independently from the discussion about `SayFormat`.

---

<div class="post-metadata">

### Author: ![arb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/41988e/32.png) [@arb](https://community.mp3tag.de/u/arb)
#### Post date: [November 11, 2025, 8:32pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/9 "2025-11-11T20:32:33Z")

</div>

I had thought of `Point` purely because it’s a pointer-based system and that’s how I got my head around learning it, but that’s only ever really referenced as such in the documentation: [Developing Tag Sources – Mp3tag Documentation](https://docs.mp3tag.de/tag-sources/development/)

`Use` does feel more appropriate given the point of a pointer is simply that’s what you **use** to manipulate data in its current input.

`Current` might be more to the point overall. I’ll leave it to a majority vote on what 😆

Now that I really think about it, `UseFormat` might actually have better utility **not** as a method for loading content into the current input, only to transform what’s currently inside it similarly to `SayFormat`. That would give far better purpose for `Use` as the opposite function of `Say`.

Apologies, realise I went round in a circle there. 🥲 Two separate commands for two separate uses as I originally pitched in my first post.

---

<div class="post-metadata">

### Author: ![yorickausyps](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/y/f6c823/32.png) [@yorickausyps](https://community.mp3tag.de/u/yorickausyps)
#### Post date: [November 12, 2025, 11:33am UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/10 "2025-11-12T11:33:33Z")

</div>

Currently I use in my scripts the command:  
`regexpreplace "^.*" "text with %outputs% inside"`  
to copy the contents of one or more output buffers, optionally surrounded by arbitrary characters or strings, to the input buffer.

If this could be replaced one to one by the command  
`use "text with %outputs% inside"`,  
the scripts would surely run faster, be easier to understand and not any more need escaping of special chracters for regular expression like the \ . Although it brings no new feature in, in my opinion this is enough benefit to be worth the effort.

A command `useformat "string"` seems to me to be not necessary, because its function would be already available with `sayformat "string"` and the new `use "%output%"`.

---

<div class="post-metadata">

### Author: ![arb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/41988e/32.png) [@arb](https://community.mp3tag.de/u/arb)
#### Post date: [November 12, 2025, 1:32pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/11 "2025-11-12T13:32:18Z")

</div>

> [@yorickausyps](#):
>
> `use "text with %outputs% inside"`

This. Means its not just outputs that can be used but ANY string.

> [@yorickausyps](#):
>
> `useformat "string"` seems to me to be not necessary

That’s where I got myself confused along the way because @Florian had the two named ideas under the same concept but really they would have completely different usecases.

`Use` strictly for loading into current input, `UseFormat` for transforming what is already in current input.

`UseFormat` means you don’t have to send `SayFormat` back and forth from temp outputs and current input if you need multiple commands to process the current input. `SayFormat` would then be the last step equivalent to `SayRest`.

---

<div class="post-metadata">

### Author: ![yorickausyps](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/y/f6c823/32.png) [@yorickausyps](https://community.mp3tag.de/u/yorickausyps)
#### Post date: [November 12, 2025, 7:03pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/12 "2025-11-12T19:03:56Z")

</div>

The proposal

> [@arb](#):
>
> `UseFormat` for transforming what is already in current input.

has raised the following question:

What result do we expect from the following command?

```auto
UseFormat "sort(%_current%)"

```

Should it append the sorted string at the end of the input buffer or clear the input buffer after it is read?  
The current implementation of `SayFormat` lets me suspect, `UseFormat` would also append the sorted string to the end of the unsorted and that doesn't seem useful to me.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [November 12, 2025, 9:09pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/13 "2025-11-12T21:09:20Z")

</div>

Maybe I wasn't clear in my initial description of the two proposed functions, let's try again.

* * *

The initial motivation was to use the contents of an output variable as the current input. This would make the current workaround using `RegexpReplace "^.*" "%output%"` obsolete.

The new function would **replace the current input buffer** , and would not emit anything to the current output.

I'd still go with two separate functions, one that serves as a counterpart to `Say`, and another that serves as a counterpart to `SayFormat`.

1. Function **Use S**  
Example: `Use "some text and %output%"`  
(this is equivalent to what the current workaround with `RegexpReplace "^.*"` does, except for the need to escape)

2. Function **UseFormat S**  
Example: `UseFormat "some text and $sort(%_current%,-)"`  
(this is something that isn't possible at the moment, only via `SayFormat` to a temporary output and then applying the `RegexpReplace "^.*"` workaround)

---

<div class="post-metadata">

### Author: ![arb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/41988e/32.png) [@arb](https://community.mp3tag.de/u/arb)
#### Post date: [November 12, 2025, 9:55pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/14 "2025-11-12T21:55:17Z")

</div>

```auto
UseFormat “$replace(%_current%,text,string)”

```

would work just like

```auto
Replace “text" "string"

```

with the actual benefit being UseFormat could use most format strings, not just $replace().

Fair point though as all `Say` commands do append rather than alter an existing value. That being said - and at the risk of complicating it again 😰 - unless there’s a need for an **n** parameter for `Use` and `UseFormat` to add newer content to the end of an existing current input similar to a `Say` command, it's simpler the two commands just **replace** existing content.

> [@Florian](#):
>
> - Function **Use S**  
> Example: `Use "some text and %output%"`  
> (this is equivalent to what the current workaround with `RegexpReplace "^.*"` does, except for the need to escape)
> - Function **UseFormat S**  
> Example: `UseFormat "some text and $sort(%_current%,-)"`  
> (this is something that isn't possible at the moment, only via `SayFormat` to a temporary output and then applying the `RegexpReplace "^.*"` workaround)

This looks about right!

---

<div class="post-metadata">

### Author: ![yorickausyps](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/y/f6c823/32.png) [@yorickausyps](https://community.mp3tag.de/u/yorickausyps)
#### Post date: [November 12, 2025, 10:06pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/15 "2025-11-12T22:06:40Z")

</div>

Many thanks for the clarification. Now I'm looking forward to testing the new commands and comparing the performance gain against the old hacks.

---

<div class="post-metadata">

### Author: ![arb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/41988e/32.png) [@arb](https://community.mp3tag.de/u/arb)
#### Post date: [November 12, 2025, 10:18pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/16 "2025-11-12T22:18:46Z")

</div>

...oh no. I do see the problem. What about:

```auto
UseFormat “$replace(moretext%_current%,text,string)”

```

Does "moretext" get added to the start?

Does it only accept `%outputs%`?

Or likely it just takes whatever text's given including `%_current%` if present _then_ replaces **all** of current input? That **would** bring us back to `UseFormat` being a fancier `Use`! 😭

But I guess that's the only complication. `UseFormat` would be commonly used with `%_current%` to manipulate mainly the current input anyway so it still means `Use` has a far more direct purpose. Again, `SayFormat` hasn't exactly replaced `Say`... yet. 🫣

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [November 13, 2025, 11:22am UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/17 "2025-11-13T11:22:30Z")

</div>

Here is an internal test version with `Use` and `UseFormat` as described [here](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/13).

[https://download.mp3tag.de/support/998C7FB6-CA71-44C7-B92D-DF73372C4A3E-3-31-11-2/mp3tagv331k2-x64-setup.exe](https://download.mp3tag.de/support/998C7FB6-CA71-44C7-B92D-DF73372C4A3E-3-31-11-2/mp3tagv331k2-x64-setup.exe)

---

<div class="post-metadata">

### Author: ![arb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/41988e/32.png) [@arb](https://community.mp3tag.de/u/arb)
#### Post date: [November 13, 2025, 1:01pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/18 "2025-11-13T13:01:01Z")

</div>

| Command | Line and Position |
| --- | --- |
| Set "TEST" "hello world" | |
| | |
| Use "test1" | test1 |
| Use "%TEST%" | hello world |
| Use "123%TEST%456" | 123hello world456 |
| Use "%\_current%" | %\_current% |
| Use "abc%\_current%def" | abc%\_current%def |
| | |
| UseFormat "test2" | test2 |
| UseFormat "%TEST%" | hello world |
| UseFormat "123%TEST%456" | 123hello world456 |
| UseFormat "%\_current%" | 123hello world456 |
| UseFormat "abc%\_current%def" | abc123hello world456def |
| | |
| UseFormat "$upper(%\_current%)" | ABC123HELLO WORLD456DEF |
| UseFormat "$upper(moretext%\_current%)" | MORETEXTABC123HELLO WORLD456DEF |

Works perfectly and as expected. Thank you very much!

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [November 13, 2025, 4:04pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/19 "2025-11-13T16:04:56Z")

</div>

Looking good! Thank you for trying the new commands and for sharing your findings.

---

<div class="post-metadata">

### Author: ![yorickausyps](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/y/f6c823/32.png) [@yorickausyps](https://community.mp3tag.de/u/yorickausyps)
#### Post date: [November 13, 2025, 4:53pm UTC](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122/20 "2025-11-13T16:53:37Z")

</div>

My performance test shows that the new `Use` commmand is round about 20% faster than the corresponding `Regexpreplace` and everything I've tested works fine here.  
Thank you for providing the new tools.

[Next page](https://community.mp3tag.de/t/use-contents-of-an-output-variable-as-current-input/70122.md?page=2)
