# How do I run a script

**URL:** <https://community.mp3tag.de/t/how-do-i-run-a-script/60453>\
**Category:** Support\
**Created:** [March 23, 2023, 12:20am UTC](https://community.mp3tag.de/t/how-do-i-run-a-script/60453 "2023-03-23T00:20:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ceefax](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ceefax/32/13604_2.png) [@ceefax](https://community.mp3tag.de/u/ceefax)\
**Post date:** [March 23, 2023, 12:20am UTC](https://community.mp3tag.de/t/how-do-i-run-a-script/60453/1 "2023-03-23T00:20:30Z")

</div>

I havent the foggiest idea of how to run a script. I found the following to create .cue files but dont know where to start to run it. I also need to run it on on m4b files so i guess I have to change a few things.

Just knowing thats possible would be great.

$filename(%album%.cue,utf-8)PERFORMER "$iflonger(%albumartist%,0,%albumartist%,%artist%)"  
TITLE "%album%"  
$loop(%\_filename\_rel%)FILE "%\_filename\_rel%" $if($eql($upper(%\_extension%),MP3),MP3,WAVE)  
TRACK $right(0%track%,2) AUDIO  
TITLE "%title%"  
PERFORMER "$iflonger(%artist%,0,%artist%,%albumartist%)"  
INDEX 01 00:00:00  
$loopend()

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [March 23, 2023, 6:15am UTC](https://community.mp3tag.de/t/how-do-i-run-a-script/60453/2 "2023-03-23T06:15:03Z")

</div>

> [@ceefax](#):
>
> I havent the foggiest idea of how to run a script.

See the documentation on export:

> **[Exporting Tag and File Information – Mp3tag Documentation](https://docs.mp3tag.de/export/)**
>
> Documentation on exporting tag and file information to text-based file formats. Mp3tag is the universal Tag Editor.

> [@ceefax](#):
>
> I found the following

Do you refer to this thread?

> [@.cue sheet export](https://community.mp3tag.de/t/cue-sheet-export/53909):
>
> $filename(%album%.cue,utf-8)PERFORMER "$iflonger(%albumartist%,0,%albumartist%,%artist%)" TITLE "%album%" $loop(%\_filename\_rel%)FILE "%\_filename\_rel%" $if($eql($upper(%\_extension%),MP3),MP3,WAVE) TRACK $right(0%track%,2) AUDIO TITLE "%title%" PERFORMER "$iflonger(%artist%,0,%artist%,%albumartist%)" INDEX 01 00:00:00 $loopend() I have not found any ready to use solution for this specific task, so I wrote one myself. Enjoy. If you can offer any alterations - please do.

---

<div class="post-metadata">

**Author:** ![ceefax](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ceefax/32/13604_2.png) [@ceefax](https://community.mp3tag.de/u/ceefax)\
**Post date:** [March 23, 2023, 8:53am UTC](https://community.mp3tag.de/t/how-do-i-run-a-script/60453/3 "2023-03-23T08:53:24Z")

</div>

yes, but i have no idea how to use scripts.

---

<div class="post-metadata">

**Author:** ![Metabug](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/49beb7/32.png) [@Metabug](https://community.mp3tag.de/u/Metabug)\
**Post date:** [March 23, 2023, 10:42am UTC](https://community.mp3tag.de/t/how-do-i-run-a-script/60453/4 "2023-03-23T10:42:30Z")

</div>

Initial setup:  
Step 1: Open MP3Tag  
Step 2: Add all items you want to work with (or just anything, otherwise next step will be greyed out)  
Step 3: (Menu) "File" -\> "Export..." or press Ctrl+E  
Step 4: "New", type any name for the script (I just saved it under "cue" name), Ok/Enter  
Step 5: Your default text editor will launch with /mp3tag/export/your\_script\_name.mte file opened, edit it, save it

Usage:  
Step 1: Open MP3Tag  
Step 2: Add all items you want to work with  
Step 3: (Menu) "File" -\> "Export..." or press Ctrl+E  
Step 4: Select your\_script\_name export configuration

---

<div class="post-metadata">

**Author:** ![ceefax](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ceefax/32/13604_2.png) [@ceefax](https://community.mp3tag.de/u/ceefax)\
**Post date:** [March 23, 2023, 2:28pm UTC](https://community.mp3tag.de/t/how-do-i-run-a-script/60453/5 "2023-03-23T14:28:09Z")

</div>

thanks..i'll take a look this evening, most appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [April 22, 2023, 2:28pm UTC](https://community.mp3tag.de/t/how-do-i-run-a-script/60453/6 "2023-04-22T14:28:14Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
