[SOLVED] VBS-SYNTAX PLEASE HELP

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey.

Moderator: Gurus

Erwin Hanzl
Posts: 261
Joined: Tue Jun 13, 2017 8:47 am
Location: Vienna

[SOLVED] VBS-SYNTAX PLEASE HELP

Post by Erwin Hanzl » Fri Mar 01, 2019 1:16 pm

This is the result of my programming experiments with the following code:

ENTRY in VB-Script:
Doc.Add " <h3>"& sVar &" ... "& itm.title &" </h3></span>" 'Number / PlaylistsName
Doc.Add " <h5>"& ExtensionEH &" </h5></span>" 'Extension

ENTRY in style.css:
h3 { font-size:12pt; background:url('commandbar.bmp') padding:0px 0px 20px;} /*for PlaylistsName
h5 { font-size:12pt; padding:0px 0px 0px 300px; } /* für Extension


Image

With which syntax can I extend this second line with the first line so that the extension is always in the same line?
Is there a tabulator function for this?


That's not well:
Doc.Add " <h3>"& sVar &" ... "& itm.title &" __ ." & ExtensionEH &" </h3></span>"

Image


I politely ask for a goal-oriented answer.
Thank you

Google translation
Last edited by Erwin Hanzl on Wed Mar 06, 2019 3:02 pm, edited 2 times in total.
:D MMW 4.1.25.1885 GOLD Beta :D Meine Einstellungen
:-? MMA 1.3.5.0853 Beta auf Huawei Mate 20 Pro (USB-Kabel-Sync)
:D FindCurrentPlayingTrack 1.3.2 :D Lyrics and Comment Viewer 2.2.0.0 :D CustomFieldsTagger 1.0.3.0 :D Discogs Tagger 5.6.8
:D WIN 10 Pro-1903-64 Bit -- Windows-Defender mit Echtzeitschutz

Peke
Posts: 11986
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: VBS-SYNTAX PLEASE HELP

Post by Peke » Sun Mar 03, 2019 11:06 am

Hi,
Create two functions for Left and Right padding:

Code: Select all

Function Lpad(strInput, length)
  Lpad = Right(space(length) & strInput, length)
end function
Function Rpad(strInput, length)
  Rpad = Left(strInput & Space(length), length)
end function
So you can then use that in your code:

Code: Select all

Doc.Add " <h3>"& sVar &" ... "& Rpad(itm.title,50) & ExtensionEH &" </h3></span>"
But as you use HTML you need to use non-breaking space https://www.w3schools.com/html/html_entities.asp so it complicates things a bit :)

I would rather expand that and fully use CSS FLEXBOX container :) https://css-tricks.com/snippets/css/a-guide-to-flexbox/ and possibly Text Align inside each Flex-Item https://www.computerhope.com/issues/ch001710.htm

Have fun.
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum

Erwin Hanzl
Posts: 261
Joined: Tue Jun 13, 2017 8:47 am
Location: Vienna

Re: VBS-SYNTAX PLEASE HELP

Post by Erwin Hanzl » Mon Mar 04, 2019 6:56 am

Hello Pavle,

ich habe deine Function-Code an das Ende des VBScripts hineinkopiert. Mehrmals geprüft und nach MM-Start kommt folgender Fehler:

Image
Last edited by Erwin Hanzl on Thu Mar 07, 2019 1:23 am, edited 2 times in total.
:D MMW 4.1.25.1885 GOLD Beta :D Meine Einstellungen
:-? MMA 1.3.5.0853 Beta auf Huawei Mate 20 Pro (USB-Kabel-Sync)
:D FindCurrentPlayingTrack 1.3.2 :D Lyrics and Comment Viewer 2.2.0.0 :D CustomFieldsTagger 1.0.3.0 :D Discogs Tagger 5.6.8
:D WIN 10 Pro-1903-64 Bit -- Windows-Defender mit Echtzeitschutz

Peke
Posts: 11986
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: VBS-SYNTAX PLEASE HELP

Post by Peke » Mon Mar 04, 2019 9:54 pm

Hi,

That should be "Rpad = Left(strInput & Space(length), length)" instead of "Rpad = Left(strInput & Space(length, length"
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum

Erwin Hanzl
Posts: 261
Joined: Tue Jun 13, 2017 8:47 am
Location: Vienna

Re: VBS-SYNTAX PLEASE HELP

Post by Erwin Hanzl » Tue Mar 05, 2019 1:51 am

Hallo Pavle,

danke für die Antwort, aber es fehlt nach wie vor eine schließende Klammer und es kommt zur obigen Fehlermeldung.

Rpad = Left(strInput & Space(length, length)
2 x "("...... aber nur 1 x ")"

Natürlich habe ich alles mehrfach geprüft und auch mit allen Varianten der schließenden Klammer getestet.

Entschuldige, aber es funktioniert mit keiner Variante.
Ich möchte dich nochmals um Prüfung bitten. Danke
Schöne Grüße

Image
:D MMW 4.1.25.1885 GOLD Beta :D Meine Einstellungen
:-? MMA 1.3.5.0853 Beta auf Huawei Mate 20 Pro (USB-Kabel-Sync)
:D FindCurrentPlayingTrack 1.3.2 :D Lyrics and Comment Viewer 2.2.0.0 :D CustomFieldsTagger 1.0.3.0 :D Discogs Tagger 5.6.8
:D WIN 10 Pro-1903-64 Bit -- Windows-Defender mit Echtzeitschutz

Peke
Posts: 11986
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: VBS-SYNTAX PLEASE HELP

Post by Peke » Tue Mar 05, 2019 5:44 am

Hi,
Sorry, corrected it. It is "Rpad = Left(strInput & Space(length), length)"
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum

Erwin Hanzl
Posts: 261
Joined: Tue Jun 13, 2017 8:47 am
Location: Vienna

Re: VBS-SYNTAX PLEASE HELP

Post by Erwin Hanzl » Tue Mar 05, 2019 6:14 am

Hallo Pavle,

danke für Deine rasche Antwort. Jetzt gibt es keine Fehlermeldungen, jedoch komme ich nicht zu meinem gewünschten Ergebnis.

Zusammenfassung:

CODE:

Code: Select all

	   Doc.Add " <h3>"& sVar &" ... "& Rpad(itm.title,50) & ExtensionEH &" </h3></span>"
und

Code: Select all

Function Lpad(strInput, length)
  Lpad = Right(space(length) & strInput, length)
end function

Function Rpad(strInput, length)
   Rpad = Left(strInput & Space(length), length)
end function
Das führt zu folgendem Ergebnis: mp3 sollte rechtsbündig angezeigt werden

Image

Länge von itm.Title=50 (habe ich über eine eigene Ausgabe geprüft) aber anscheinend werden alle Leerzeichen durch "Doc.Add" entfernt.

Ich danke für Deine Bemühungen und werde eben mit diesem Ergebnis leben.

Grüße Erwin
Last edited by Erwin Hanzl on Thu Mar 07, 2019 1:26 am, edited 2 times in total.
:D MMW 4.1.25.1885 GOLD Beta :D Meine Einstellungen
:-? MMA 1.3.5.0853 Beta auf Huawei Mate 20 Pro (USB-Kabel-Sync)
:D FindCurrentPlayingTrack 1.3.2 :D Lyrics and Comment Viewer 2.2.0.0 :D CustomFieldsTagger 1.0.3.0 :D Discogs Tagger 5.6.8
:D WIN 10 Pro-1903-64 Bit -- Windows-Defender mit Echtzeitschutz

Peke
Posts: 11986
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: VBS-SYNTAX PLEASE HELP

Post by Peke » Tue Mar 05, 2019 9:32 pm

Hi,
As I pointed you need to use

Code: Select all

&nbsp; = non-breaking space
instead of single space.

Code: Select all

Function Lpad(strInput, length)
  Lpad = Right(space(length) & strInput, length)
  LPad = Replace(Lpad," ","&nbsp;")
end function

Function Rpad(strInput, length)
   Rpad = Left(strInput & Space(length), length)
   RPad = Replace(Rpad," ","&nbsp;")
end function
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum

Erwin Hanzl
Posts: 261
Joined: Tue Jun 13, 2017 8:47 am
Location: Vienna

Re: VBS-SYNTAX PLEASE HELP

Post by Erwin Hanzl » Wed Mar 06, 2019 11:43 am

gelöscht
Last edited by Erwin Hanzl on Wed Mar 06, 2019 2:58 pm, edited 2 times in total.
:D MMW 4.1.25.1885 GOLD Beta :D Meine Einstellungen
:-? MMA 1.3.5.0853 Beta auf Huawei Mate 20 Pro (USB-Kabel-Sync)
:D FindCurrentPlayingTrack 1.3.2 :D Lyrics and Comment Viewer 2.2.0.0 :D CustomFieldsTagger 1.0.3.0 :D Discogs Tagger 5.6.8
:D WIN 10 Pro-1903-64 Bit -- Windows-Defender mit Echtzeitschutz

Erwin Hanzl
Posts: 261
Joined: Tue Jun 13, 2017 8:47 am
Location: Vienna

Re: VBS-SYNTAX PLEASE HELP

Post by Erwin Hanzl » Wed Mar 06, 2019 2:38 pm

Hallo Pavle, GESCHAFFT

ZUSAMMENFASSUNG: Deine Code

Code: Select all

	   Doc.Add " <h3>"& sVar &" .. "&Rpad(itm.title,20) & ExtensionEH &" </h3></span>"
und

Code: Select all

Function Lpad(strInput, length)
  Lpad = Right(space(length) & strInput, length)
  LPad = Replace(Lpad," ","&nbsp;")
end function

Function Rpad(strInput, length)
   Rpad = Left(strInput & Space(length), length)
   RPad = Replace(Rpad," ","&nbsp;")
end function
im Zusammenhang mit dem Thema "PULSE" -style.css - Schriftart COURIER löst das Problem.

Code: Select all

body { font:12pt Courier, 'Segoe UI', 'Tahoma', Arial, sans serif;
Image

Vielen Dank nochmals für Deine Mühe und Deine Geduld.
Last edited by Erwin Hanzl on Sat Mar 09, 2019 10:08 am, edited 3 times in total.
:D MMW 4.1.25.1885 GOLD Beta :D Meine Einstellungen
:-? MMA 1.3.5.0853 Beta auf Huawei Mate 20 Pro (USB-Kabel-Sync)
:D FindCurrentPlayingTrack 1.3.2 :D Lyrics and Comment Viewer 2.2.0.0 :D CustomFieldsTagger 1.0.3.0 :D Discogs Tagger 5.6.8
:D WIN 10 Pro-1903-64 Bit -- Windows-Defender mit Echtzeitschutz

Peke
Posts: 11986
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: [SOLVED] VBS-SYNTAX PLEASE HELP

Post by Peke » Wed Mar 06, 2019 8:20 pm

Hi,
It was my pleasure.

Do you plan to release full Script or just for you?
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum

Erwin Hanzl
Posts: 261
Joined: Tue Jun 13, 2017 8:47 am
Location: Vienna

Re: [SOLVED] VBS-SYNTAX PLEASE HELP

Post by Erwin Hanzl » Thu Mar 07, 2019 1:19 am

Hello Pavle,

da die Software nicht meine Entwicklung ist, steht es mir nicht zu, eine Veröffentlichung durchzuführen. Ich verwende die Weiterentwicklung NUR für mich privat. Deshalb habe ich die Code aus früheren Posts wieder gelöscht.

Es wäre für mich sehr erfreulich, wenn Du meine Idee aufgreifst und diese in einem offiziellem Update zur Verfügung stellen würdest.
Gerne lasse ich Dir bei Bedarf über "Privat Messages" alle Veränderungen zukommen.

Mit freundlichen Grüßen
Erwin

Ich denke, Information ist doch alles. Und das ist wieder gut für die User und damit auch für MediaMonkey.
Image
Last edited by Erwin Hanzl on Sat Mar 09, 2019 10:37 am, edited 1 time in total.
:D MMW 4.1.25.1885 GOLD Beta :D Meine Einstellungen
:-? MMA 1.3.5.0853 Beta auf Huawei Mate 20 Pro (USB-Kabel-Sync)
:D FindCurrentPlayingTrack 1.3.2 :D Lyrics and Comment Viewer 2.2.0.0 :D CustomFieldsTagger 1.0.3.0 :D Discogs Tagger 5.6.8
:D WIN 10 Pro-1903-64 Bit -- Windows-Defender mit Echtzeitschutz

Peke
Posts: 11986
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: [SOLVED] VBS-SYNTAX PLEASE HELP

Post by Peke » Fri Mar 08, 2019 11:29 am

Hi,
OK, you can send me code and steps to install/setup and I'll create MMIP install.
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum

Post Reply