Diverse Buttons/Skripte für Audiodateien

Fertige Lösungen für Schalter, Skript-Addins, Umbenennen-Vorlagen, usw.
Einige Schalter und Script-Anwendungen funktionieren erst ab der Version 12
Antworten
B-IT
Beiträge: 47
Registriert: 11. Okt 2023 11:23

Diverse Buttons/Skripte für Audiodateien

Beitrag von B-IT »

Nachfolgend einige Buttons/Skripte für MP3-/FLAC-Dateien.

Zum Teil werden folgende kleine portable Helferlein benötigt (die im Übrigen noch mehr können!). Ob und welche steht immer im Button-Titel, Standardpfad des Exe-Dateien: "/dopusdata\User Data".

SelectEX
https://resource.dopus.com/t/command-se ... mand/20517
Flac/Metaflac
https://xiph.org/flac/index.html
Lame
https://lame.sourceforge.io/
ID3
https://blog.forret.com/2007/08/29/id3e ... mp3-files/
Tag (Seite existiert nicht mehr)
Tag.zip
(195.28 KiB) 184-mal heruntergeladen
Los geht's....

Taggen von MP3/FLAC vom Dateinamen:

Format Dateiname: "Interpret - Titel" (bsp. "Depeche Mode - Enjoy The Silence.mp3")

Code: Alles auswählen

<?xml version="1.0"?>
<button backcol="none" display="icon" textcol="none">
	<label>Taggen_(Interpret-Titel)</label>
	<tip>Dateiname in Metadata einfügen (MP3 &amp; FLAC)</tip>
	<user_label>Taggen (Interpret - Titel)</user_label>
	<icon1>#tag</icon1>
	<function type="normal">
		<instruction>@nodeselect</instruction>
		<instruction>Rename FILEINFO TO=&quot;{mp3artist}%{mp3title}&quot;</instruction>
		<instruction>@script vbscript</instruction>
		<instruction>Option Explicit</instruction>
		<instruction>Dim DOpusRTPath</instruction>
		<instruction>DOpusRTPath = &quot;C:\Program Files\Directory Opus\dopusrt.exe&quot;</instruction>
		<instruction>Dim Shell</instruction>
		<instruction>Set Shell = CreateObject(&quot;WScript.Shell&quot;)</instruction>
		<instruction>Function Rename_GetNewName ( strFileName, strFilePath, fIsFolder, strOldName, ByRef strNewName )</instruction>
		<instruction>    Dim re, strCommand, artist, title, path</instruction>
		<instruction>    Set re = new RegExp</instruction>
		<instruction>    re.Pattern = &quot;^(.*) - (.*)(\.mp3|\.flac)&quot;</instruction>
		<instruction>    artist = re.Replace(strFileName, &quot;$1&quot;)</instruction>
		<instruction>    title = re.Replace(strFileName, &quot;$2&quot;)</instruction>
		<instruction>    path = strFilePath &amp; &quot;\&quot; &amp; strFileName</instruction>
		<instruction>    strCommand = &quot;&quot;&quot;&quot; &amp; DOpusRTPath &amp; &quot;&quot;&quot; /cmd SetAttr &quot;&quot;&quot; &amp; path &amp; &quot;&quot;&quot; META &quot;&quot;artist:&quot; &amp; artist &amp; &quot;&quot;&quot; &quot;&quot;title:&quot; &amp; title &amp; &quot;&quot;&quot;&quot;</instruction>
		<instruction>    Shell.Run strCommand,0,false</instruction>
		<instruction>    Dopus.OutputString  &quot;Command: &quot; &amp; strCommand</instruction>
		<instruction>    strNewName = &quot;&quot;</instruction>
		<instruction>End Function</instruction>
	</function>
</button>
Format Dateiname: "Interpret - Nr. - Titel"

Code: Alles auswählen

<?xml version="1.0"?>
<button backcol="none" display="icon" textcol="none">
	<label>Taggen_(Interpret-Nr.-Titel)</label>
	<tip>Dateiname in Metadata einfügen (MP3 &amp; FLAC)</tip>
	<user_label>Taggen (Interpret - Nr. - Titel)</user_label>
	<icon1>#tag</icon1>
	<function type="normal">
		<instruction>@nodeselect</instruction>
		<instruction>Rename FILEINFO TO=&quot;{mp3artist}%{mp3track}%{mp3title}&quot;</instruction>
		<instruction>@script vbscript</instruction>
		<instruction>Option Explicit</instruction>
		<instruction>Dim DOpusRTPath</instruction>
		<instruction>DOpusRTPath = &quot;C:\Program Files\Directory Opus\dopusrt.exe&quot;</instruction>
		<instruction>Dim Shell</instruction>
		<instruction>Set Shell = CreateObject(&quot;WScript.Shell&quot;)</instruction>
		<instruction>Function Rename_GetNewName ( strFileName, strFilePath, fIsFolder, strOldName, ByRef strNewName )</instruction>
		<instruction>    Dim re, strCommand, artist, track, title, path</instruction>
		<instruction>    Set re = new RegExp</instruction>
		<instruction>    re.Pattern = &quot;(.*) - ([0-9]*) - (.*)(\.mp3|\.flac)&quot;</instruction>
		<instruction>    artist = re.Replace(strFileName, &quot;$1&quot;)</instruction>
		<instruction>    track = re.Replace(strFileName, &quot;$2&quot;)</instruction>
		<instruction>    title = re.Replace(strFileName, &quot;$3&quot;)</instruction>
		<instruction>    path = strFilePath &amp; &quot;\&quot; &amp; strFileName</instruction>
		<instruction>    strCommand = &quot;&quot;&quot;&quot; &amp; DOpusRTPath &amp; &quot;&quot;&quot; /cmd SetAttr &quot;&quot;&quot; &amp; path &amp; &quot;&quot;&quot; META &quot;&quot;artist:&quot; &amp; artist &amp; &quot;&quot;&quot; &quot;&quot;track:&quot; &amp; track &amp; &quot;&quot;&quot; &quot;&quot;title:&quot; &amp; title &amp; &quot;&quot;&quot;&quot;</instruction>
		<instruction>    Dopus.OutputString  &quot;Commande: &quot; &amp; strCommand</instruction>
		<instruction>    Shell.Run strCommand,0,false</instruction>
		<instruction>    strNewName = &quot;&quot;</instruction>
		<instruction>End Function</instruction>
	</function>
</button>
Format Dateiname: "Nr. - Interpret - Titel"

Code: Alles auswählen

<?xml version="1.0"?>
<button backcol="none" display="icon" textcol="none">
	<label>Taggen_(Nr.-Interpret-Titel)</label>
	<tip>Dateiname in Metadata einfügen (MP3 &amp; FLAC)</tip>
	<user_label>Taggen (Nr. - Interpret - Titel)</user_label>
	<icon1>#tag</icon1>
	<function type="normal">
		<instruction>@nodeselect</instruction>
		<instruction>Rename FILEINFO TO=&quot;{mp3track}%{mp3artist}%{mp3title}&quot;</instruction>
		<instruction>@script vbscript</instruction>
		<instruction>Option Explicit</instruction>
		<instruction>Dim DOpusRTPath</instruction>
		<instruction>DOpusRTPath = &quot;C:\Program Files\Directory Opus\dopusrt.exe&quot;</instruction>
		<instruction>Dim Shell</instruction>
		<instruction>Set Shell = CreateObject(&quot;WScript.Shell&quot;)</instruction>
		<instruction>Function Rename_GetNewName ( strFileName, strFilePath, fIsFolder, strOldName, ByRef strNewName )</instruction>
		<instruction>    Dim re, strCommand, artist, track, title, path</instruction>
		<instruction>    Set re = new RegExp</instruction>
		<instruction>    re.Pattern = &quot;([0-9]*) - (.*) - (.*)(\.mp3|\.flac)&quot;</instruction>
		<instruction>    track = re.Replace(strFileName, &quot;$1&quot;)</instruction>
		<instruction>    artist = re.Replace(strFileName, &quot;$2&quot;)</instruction>
		<instruction>    title = re.Replace(strFileName, &quot;$3&quot;)</instruction>
		<instruction>    path = strFilePath &amp; &quot;\&quot; &amp; strFileName</instruction>
		<instruction>    strCommand = &quot;&quot;&quot;&quot; &amp; DOpusRTPath &amp; &quot;&quot;&quot; /cmd SetAttr &quot;&quot;&quot; &amp; path &amp; &quot;&quot;&quot; META &quot;&quot;track:&quot; &amp; track &amp; &quot;&quot;&quot; &quot;&quot;artist:&quot; &amp; artist &amp; &quot;&quot;&quot; &quot;&quot;title:&quot; &amp; title &amp; &quot;&quot;&quot;&quot;</instruction>
		<instruction>    Dopus.OutputString  &quot;Commande: &quot; &amp; strCommand</instruction>
		<instruction>    Shell.Run strCommand,0,false</instruction>
		<instruction>    strNewName = &quot;&quot;</instruction>
		<instruction>End Function</instruction>
	</function>
</button>
Kopieren der MP3-Tags von einer Datei zur anderen (benötigt ID3.exe):

Code: Alles auswählen

<?xml version="1.0"?>
<button backcol="none" display="icon" textcol="none">
	<label>Tags_kopieren_MP3</label>
	<tip>Kopiert MP3-Tags aus selektierter Datei nach Zieldatei</tip>
	<user_label>MP3-Tags kopieren</user_label>
	<icon1>#tag</icon1>
	<function type="batch">
		<instruction>@set var = {dlgopen|Bitte Zieldatei wählen:|&quot;E:\Media\Musik\_Unsortiert&quot;}</instruction>
		<instruction>&quot;/dopusdata\User Data\ID3.exe&quot; -D &quot;{filepath}&quot; -2u &quot;{$var}&quot;</instruction>
	</function>
</button>
Löschen der MP3-Tags aller markierten Dateien (benötigt Tag.exe):

Code: Alles auswählen

<?xml version="1.0"?>
<button backcol="none" display="icon" textcol="none">
	<label>Tags_löschen_MP3</label>
	<tip>Löscht alle MP3-Tags aus selektierten Dateien</tip>
	<user_label>MP3-Tags löschen</user_label>
	<icon1>#tag</icon1>
	<function type="normal">
		<instruction>@nodeselect</instruction>
		<instruction>@runmode hide</instruction>
		<instruction>&quot;/dopusdata\User Data\Tag\Tag.exe&quot; --remove {filepath}</instruction>
	</function>
</button>
Löschen der FLAC-Tags aller markierten Dateien (benötigt Metaflac.exe):

Code: Alles auswählen

<?xml version="1.0"?>
<button backcol="none" display="icon" textcol="none">
	<label>Tags_löschen_FLAC</label>
	<tip>Löscht alle FLAC-Tags aus selektierten Dateien</tip>
	<user_label>FLAC-Tags löschen</user_label>
	<icon1>#tag</icon1>
	<function type="normal">
		<instruction>@runmode hide</instruction>
		<instruction>@nodeselect</instruction>
		<instruction>@sync: &quot;/dopusdata\User Data\Flac\Metaflac.exe&quot; --remove {filepath$}</instruction>
	</function>
</button>
FLAC/OGG/WAV zu MP3 konvertieren (benötigt Lame.exe):

Code: Alles auswählen

<?xml version="1.0"?>
<button backcol="none" display="icon" textcol="none">
	<label>MP3_encoden</label>
	<tip>FLAC/OGG/WAV zu MP3 konvertieren</tip>
	<user_label>MP3 encoden</user_label>
	<icon1>#filetype_mp3</icon1>
	<function type="script">
		<instruction>@nodeselect </instruction>
		<instruction>@script JScript</instruction>
		<instruction>function OnClick(clickData) {</instruction>
		<instruction>    var cmd = clickData.func.command;</instruction>
		<instruction>    var dlg = clickData.func.Dlg();</instruction>
		<instruction>    dlg.window = clickData.func.sourcetab;</instruction>
		<instruction>    dlg.template = &apos;mydlg&apos;;</instruction>
		<instruction>    </instruction>
		<instruction>    var retVal = dlg.Show();</instruction>
		<instruction>    if (retVal == 1) var encVal = &apos;-b 320&apos;;</instruction>
		<instruction>    if (retVal == 2) var encVal = &apos;-b 160&apos;;</instruction>
		<instruction>    if (retVal == 3) var encVal = &apos;-b 128&apos;;</instruction>
		<instruction>    if (retVal == 4) var encVal = &apos;-V 0 --vbr-new&apos;;</instruction>
		<instruction>    if (retVal == 5) var encVal = &apos;-V 4 --vbr-new&apos;;</instruction>
		<instruction />
		<instruction>	cmd.deselect = false;</instruction>
		<instruction>    cmd.RunCommand(&apos;@sync: &quot;/dopusdata\\User Data\\Lame\\Lame.exe&quot; &apos; + encVal + &apos; &quot;{filepath$}&quot;&apos;);</instruction>
		<instruction>}</instruction>
		<instruction>==SCRIPT RESOURCES</instruction>
		<instruction>&lt;resources&gt;</instruction>
		<instruction>	&lt;resource name=&quot;mydlg&quot; type=&quot;dialog&quot;&gt;</instruction>
		<instruction>		&lt;dialog fontsize=&quot;10&quot; height=&quot;117&quot; lang=&quot;german&quot; title=&quot;MP3 encoden&quot; width=&quot;132&quot;&gt;</instruction>
		<instruction>			&lt;control close=&quot;1&quot; height=&quot;14&quot; name=&quot;button1&quot; title=&quot;CBR 320 kbps (Beste)&quot; type=&quot;button&quot; width=&quot;101&quot; x=&quot;15&quot; y=&quot;19&quot; /&gt;</instruction>
		<instruction>			&lt;control close=&quot;2&quot; height=&quot;14&quot; name=&quot;button2&quot; title=&quot;CBR 160 kbps (Medium)&quot; type=&quot;button&quot; width=&quot;101&quot; x=&quot;15&quot; y=&quot;37&quot; /&gt;</instruction>
		<instruction>			&lt;control close=&quot;3&quot; height=&quot;14&quot; name=&quot;button3&quot; title=&quot;CBR 128 kbps (Web/Mail)&quot; type=&quot;button&quot; width=&quot;101&quot; x=&quot;15&quot; y=&quot;55&quot; /&gt;</instruction>
		<instruction>			&lt;control close=&quot;4&quot; height=&quot;14&quot; name=&quot;button4&quot; title=&quot;VBR ~220 kbps (Beste)&quot; type=&quot;button&quot; width=&quot;101&quot; x=&quot;15&quot; y=&quot;73&quot; /&gt;</instruction>
		<instruction>			&lt;control close=&quot;5&quot; height=&quot;14&quot; name=&quot;button5&quot; title=&quot;VBR ~165 kbps (Medium)&quot; type=&quot;button&quot; width=&quot;101&quot; x=&quot;15&quot; y=&quot;91&quot; /&gt;</instruction>
		<instruction>			&lt;control height=&quot;102&quot; name=&quot;group1&quot; title=&quot;Bitte Qualität auswählen:&quot; type=&quot;group&quot; width=&quot;112&quot; x=&quot;9&quot; y=&quot;7&quot; /&gt;</instruction>
		<instruction>		&lt;/dialog&gt;</instruction>
		<instruction>	&lt;/resource&gt;</instruction>
		<instruction>&lt;/resources&gt;</instruction>
	</function>
</button>
WAV zu FLAC konvertieren (benötigt Flac.exe):

Code: Alles auswählen

<?xml version="1.0"?>
<button backcol="none" display="icon" textcol="none">
	<label>FLAC_encoden</label>
	<user_label>FLAC encoden</user_label>
	<icon1>#filetype_flac</icon1>
	<function type="normal">
		<instruction>@runmode hide</instruction>
		<instruction>@nodeselect</instruction>
		<instruction>@sync: &quot;/dopusdata\User Data\Flac\Flac.exe&quot; --best -m -e -r 6 -f -V {filepath$}</instruction>
	</function>
</button>
MP3 zu WAV decoden (benötigt Lame.exe)

Code: Alles auswählen

<?xml version="1.0"?>
<button backcol="none" display="icon" textcol="none">
	<label>MP3_decoden</label>
	<user_label>MP3 decoden</user_label>
	<icon1>#filetype_mp3</icon1>
	<function type="normal">
		<instruction>@nodeselect</instruction>
		<instruction>@sync: &quot;/dopusdata\User Data\Lame\Lame.exe&quot; --decode {filepath$}</instruction>
	</function>
</button>
FLAC zu WAV decoden (benötigt Flac.exe)

Code: Alles auswählen

<?xml version="1.0"?>
<button backcol="none" display="icon" textcol="none">
	<label>FLAC_decoden</label>
	<user_label>FLAC decoden</user_label>
	<icon1>#filetype_flac</icon1>
	<function type="normal">
		<instruction>@runmode hide</instruction>
		<instruction>@nodeselect</instruction>
		<instruction>@sync: &quot;/dopusdata\User Data\Flac\Flac.exe&quot; --decode {filepath$}</instruction>
	</function>
</button>
Suchen aller Dateien nach bestimmten Tag(s) und Erstellen einer Playlist hieraus (ab DOpus v13):

Beispiel: Suche zuerst rekursiv alle Lieder aus den 80er Jahren und erstelle aus Sammlung "Musik Playlist" die "1980s.m3u". Danach dasselbe für Genres Pop u.ä. in "Pop.m3u". Nicht vergessen: Die Ordner am Anfang einmalig festlegen!

Code: Alles auswählen

// Set variables
@set musicfolder = D:\Musik
@set playlistfolder = D:\Playlisten
//1980s
Find COLLNAME "Musik Playlist" IN "{$musicfolder}" FILTERDEF music match year >= 1980 and music match year <= 1989 
/home\dopusrt.exe /col export "Musik Playlist" "{$playlistfolder}\1980s.m3u"
// Alternative Disco Electronic Funk New Age Pop
Find COLLNAME "Musik Playlist" IN "{$musicfolder}" FILTERDEF music match genre Alternative or music match genre Disco or music match genre Electronic or music match genre Funk or music match genre "New Age" or music match genre Pop
/home\dopusrt.exe /col export "Musik Playlist" "{$playlistfolder}\Pop.m3u"
Alte Skriptversion mit SelectEX:

Beispiel: Suche rekursiv alle Lieder mit den Genres "Pop" und ähnlichen in "D:\Musik" (in Sammlung "Musik Playlist") und erstelle hieraus die "D:\Playlist_Pop.m3u".

Code: Alles auswählen

// Pop
var jsFilter = ""+
   "if (item.metadata == 'audio'){ "+
      "var genre = new String(item.metadata.audio['mp3genre']);"+
            "if ((genre.indexOf('Alternative')!=-1)"+
			"||(genre.indexOf('Disco')!=-1)"+
			"||(genre.indexOf('Electronic')!=-1)"+
			"||(genre.indexOf('Funk')!=-1)"+
			"||(genre.indexOf('New Age')!=-1)"+
			"||(genre.indexOf('Pop')!=-1))"+
            "return false;"+
            "}";
        cmd.RunCommand('Delete "coll://Musik Playlist" REMOVECOLLECTION=auto QUIET')
          cmd.RunCommand('SelectEx LINEAR '+
                  'PATH="D:\\Musik" RECURSE JSFILTER="'+jsFilter+'" '+
				  'ITEMCOUNTPERC=100 '+
				  'COPYTOCOLL="Musik Playlist" '+
                  'TOFILE="'+DOpus.FSUtil.Resolve('D:\\Playlist_Pop.m3u'))
Coverart zu FLAC hinzufügen (benötigt Metaflac.exe)

Code: Alles auswählen

<?xml version="1.0"?>
<button backcol="none" display="icon" textcol="none">
	<label>FLAC_Coverart_hinzufügen</label>
	<template>Fügt Coverart zur ausgewählten FLAC hinzu</template>
	<user_label>FLAC Coverart hinzufügen</user_label>
	<icon1>#coverart</icon1>
	<function type="normal">
		<instruction>@set var = {dlgopen|Bitte einzubettendes Coverart wählen:}</instruction>
		<instruction>&quot;/dopusdata\User Data\Flac\metaflac.exe&quot; --import-picture-from=&quot;{$var}&quot; &quot;{filepath}&quot;</instruction>
	</function>
</button>
Ab DOpus v13: Suche in Musik nach bestimmten Tags
Zuletzt geändert von B-IT am 16. Nov 2023 00:16, insgesamt 7-mal geändert.
Benutzeravatar
tbone
Supporter
Beiträge: 290
Registriert: 29. Okt 2021 00:45
Betriebssystem: Windows 10 Pro

Re: Diverse Buttons/Skripte für Audiodateien

Beitrag von tbone »

Erstmal Danke! o)
Und dann.. die Qualitätssicherung rief gerade an.. o)

- Da sind Buttons die "SelectEx" verwenden, das ist ein separates ScriptAddin (muss man installieren, ist hier aber nicht dabei/verlinkt).
(Die SelectEx Buttons dienen zur Suche, mit DO v11 könnte das dann auch mit DO Boardmitteln gehen.)
- Bei den OpenSource(?) Tools im Download, fehlen da u.U. Lizenzinfos? Bei Weitergabe ist Beigabe von Lizenz/Quellcode oft eine Vorraussetzung.
(Nur mal checken, ich weiß nicht 100%ig.)
- Rename_GetNewName() Scripts um damit NICHT Dateien umzubenennen ist ein Hack aus DO v10 Zeiten (iirc), 10+ Jahre veraltet.
Wir könnten da SetAttrEx nehmen, dann ist jede Variante nur ein Einzeiler -> SetAttrEx META FROMPATTERN="%track##% %artist% - %title%.%ext%"
- Kopieren von MP3-Tags geht auch über SetATTR META="copyfrom:3,{$mp3filepath}", kein ID3.exe nötig?

- Mir fehlt ein Menu "mit bei", so einzeln mit den Buttons, das macht ja Arbeit (hätte ich nicht schon einen Menu-Button)! o)

Wollen wir mal zusammenwerfen was wir so haben und dann ein ordentliches Menu hier anbieten?
B-IT
Beiträge: 47
Registriert: 11. Okt 2023 11:23

Re: Diverse Buttons/Skripte für Audiodateien

Beitrag von B-IT »

Stimmt, bin noch unterwegs, verlinke SelectEx nachher. War so viel Zeug, hatte nicht alles auf dem Schirm, sorry.

Die Tools kriegste z.T. nicht mehr, ich verlinke die später aber noch soweit möglich. Danke.

Edit: So, alles angepasst.

Cool wäre natürlich eine GUI, aber ich habe bisher keine Idee, wie die aussehen und was die können soll. Es ist oft so... da hab ich ein paar neue Audiofiles z.B. von ner alten Platte, die werden zu FLAC encoded, dann getaggt, dann Cover besorgt. Dann hab ich ein vorhandenes MP3, dass durch eines in besserer Bitrate getauscht wird und ich die Tags nur kopieren muss in die neue Datei... ich hab das dann alles in einem Menü oder im Kontext und das funktioniert so hervorragend. So "Masstagging" habe ich gar nicht mehr und dafür gibt's ja dann MP3Tag.
Taggen.png
Taggen.png (56.28 KiB) 1454 mal betrachtet
Die Playlist-Buttons sind noch mit SelectEx, ich kam noch nicht dazu, die mit Boardmitteln umzusetzen (siehe auch letzte Beispiel, das ist ja die Richtung). Und man könnte natürlich das Tagen aus Dateinamen in einen Button zusammenfügen, dafür reichen aber meine Kenntnisse nicht und die Sachen sind ja oft mit eurer Hilfe entstanden.

Von SelectEx nutze ich oft die Zufallsauswahl mit Maxsize (im Flatview-Modus), wenn ich neue CD's für das Auto brenne (anstatt neues Radio hole ich mir immer lieber ne neue Graka :-)):

Code: Alles auswählen

<?xml version="1.0"?>
<button backcol="none" display="icon" textcol="none">
	<label>SC_SelectEx_Random_Size</label>
	<tip>Gewählte Dateigesamtgröße zufällig markieren</tip>
	<user_label>Größe zufällig markieren</user_label>
	<icon1>#selectrandom</icon1>
	<function type="script">
		<instruction>@script JScript</instruction>
		<instruction>function OnClick(clickData) {</instruction>
		<instruction>    var cmd = clickData.func.command;</instruction>
		<instruction>    var dlg = clickData.func.Dlg();</instruction>
		<instruction>    dlg.template = &apos;mydlg&apos;;</instruction>
		<instruction>    dlg.Show();</instruction>
		<instruction />
		<instruction>	var input1 = dlg.Control(&apos;input1&apos;).value;</instruction>
		<instruction>    var radio1 = dlg.Control(&apos;radio1&apos;).value;</instruction>
		<instruction>    // var radio2 = dlg.Control(&apos;radio2&apos;).value;</instruction>
		<instruction />
		<instruction>    var filetype = radio1 ? &apos;&apos; : &apos; NAME=&quot;\\.mp3$&quot;&apos;;</instruction>
		<instruction />
		<instruction>//    var cmdLine = &apos;SelectEx RANDOM FILES&apos; + filetype + &apos; MAXSIZETOTAL=&apos; + input1 + &apos;MB ITEMCOUNT=999999 DESELECTNOMATCH MAKEVISIBLE&apos;;</instruction>
		<instruction>//    DOpus.Output(cmdLine);</instruction>
		<instruction>	</instruction>
		<instruction>	cmd.deselect = true;</instruction>
		<instruction>	cmd.RunCommand(&apos;SelectEx RANDOM FILES&apos; + filetype + &apos; MAXSIZETOTAL=&apos; + input1 + &apos;MB ITEMCOUNT=999999 DESELECTNOMATCH MAKEVISIBLE&apos;);</instruction>
		<instruction>}</instruction>
		<instruction>==SCRIPT RESOURCES</instruction>
		<instruction>&lt;resources&gt;</instruction>
		<instruction>	&lt;resource name=&quot;mydlg&quot; type=&quot;dialog&quot;&gt;</instruction>
		<instruction>		&lt;dialog fontsize=&quot;11&quot; height=&quot;145&quot; lang=&quot;german&quot; title=&quot;Zufällig markieren&quot; width=&quot;161&quot;&gt;</instruction>
		<instruction>			&lt;control halign=&quot;left&quot; height=&quot;20&quot; title=&quot;Bitte Gesamtgröße angeben, die zufällig markiert werden soll:&quot; type=&quot;static&quot; valign=&quot;top&quot; width=&quot;126&quot; x=&quot;17&quot; y=&quot;8&quot; /&gt;</instruction>
		<instruction>			&lt;control halign=&quot;left&quot; height=&quot;12&quot; name=&quot;input1&quot; title=&quot;700&quot; type=&quot;edit&quot; width=&quot;35&quot; x=&quot;36&quot; y=&quot;49&quot; /&gt;</instruction>
		<instruction>			&lt;control height=&quot;10&quot; name=&quot;radio1&quot; title=&quot;Alle Dateien&quot; type=&quot;radio&quot; width=&quot;51&quot; x=&quot;36&quot; y=&quot;85&quot; /&gt;</instruction>
		<instruction>			&lt;control checked=&quot;yes&quot; height=&quot;10&quot; name=&quot;radio2&quot; title=&quot;Nur MP3-Dateien&quot; type=&quot;radio&quot; width=&quot;64&quot; x=&quot;36&quot; y=&quot;100&quot; /&gt;</instruction>
		<instruction>			&lt;control halign=&quot;left&quot; height=&quot;8&quot; title=&quot;MB gesamt&quot; type=&quot;static&quot; valign=&quot;top&quot; width=&quot;37&quot; x=&quot;73&quot; y=&quot;51&quot; /&gt;</instruction>
		<instruction>			&lt;control close=&quot;0&quot; height=&quot;14&quot; name=&quot;button1&quot; title=&quot;Ok&quot; type=&quot;button&quot; width=&quot;49&quot; x=&quot;56&quot; y=&quot;126&quot; /&gt;</instruction>
		<instruction>			&lt;control height=&quot;30&quot; name=&quot;group1&quot; title=&quot;Größe&quot; type=&quot;group&quot; width=&quot;99&quot; x=&quot;31&quot; y=&quot;37&quot; /&gt;</instruction>
		<instruction>			&lt;control height=&quot;45&quot; name=&quot;group2&quot; title=&quot;Dateityp&quot; type=&quot;group&quot; width=&quot;99&quot; x=&quot;31&quot; y=&quot;72&quot; /&gt;</instruction>
		<instruction>		&lt;/dialog&gt;</instruction>
		<instruction>	&lt;/resource&gt;</instruction>
		<instruction>&lt;/resources&gt;</instruction>
	</function>
</button>
Benutzeravatar
josinoro
Supporter
Beiträge: 116
Registriert: 10. Nov 2021 20:56
Betriebssystem: Windows 10 Pro
DOpus Version: 13

Re: Diverse Buttons/Skripte für Audiodateien

Beitrag von josinoro »

Hallo B-IT,

vielen Dank für deine Arbeit. Einige Schalter habe ich zum Laufen gebracht, aber noch nicht alle.
tbone hat geschrieben: 14. Nov 2023 00:57 Wollen wir mal zusammenwerfen was wir so haben und dann ein ordentliches Menu hier anbieten?
Diese Idee kann ich natürlich wunschmäßig nur unterstützen. Da DOpus bei mir auf einer separaten Partition läuft, passe ich den Pfad zu dopusrt.exe natürlich an. Das könnte ja dann bei so einer Zusammenstellung durch die Angabe des Aliases /home hinfällig gemacht werden. Dann wären nur noch die Pfade zu den Helferlein anzupassen.

Liebe Grüße

josinoro
B-IT
Beiträge: 47
Registriert: 11. Okt 2023 11:23

Re: Diverse Buttons/Skripte für Audiodateien

Beitrag von B-IT »

Update: Beispielbutton zum Suchen nach Tags mit dem neuen Enhanced Find (DO v13) und kopieren des Ergebnisses in eine Playlist ohne SelectEX.
Antworten