[Solved] Problem with my first script

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

Moderator: Gurus

gmb
Posts: 5
Joined: Fri Jun 29, 2018 3:36 pm
Contact:

[Solved] Problem with my first script

Post by gmb »

Hello,
I am French and I use Google Traduc to write to you.

I have MM gold and I am looking to do my first Scrip.
I use Notepad ++ to write the VbScript.
I created a simple script.
I added the entry in Script.ini.

When I test my MM script gives me error 13 Ms VBScript Line 1 column 0 execution error.

Here is the Script:
Sub CallMe

' This script will pop up a simple message box when the procedure CallMe is called.
MsgBox "CallMe was called by the action defined in the Scripts.ini file."

End Sub

Question:
which encoding should I use with Notepad ++ to create the MM Script?

Cordially
GMB
Last edited by gmb on Tue Aug 28, 2018 4:14 am, edited 1 time in total.
rivorson
Posts: 594
Joined: Thu Jul 25, 2013 4:17 am
Contact:

Re: Problem with my first script

Post by rivorson »

Try adding parentheses after the Sub name.

Code: Select all

Sub CallMe()

' This script will pop up a simple message box when the procedure CallMe is called.
MsgBox "CallMe was called by the action defined in the Scripts.ini file."

End Sub
gmb
Posts: 5
Joined: Fri Jun 29, 2018 3:36 pm
Contact:

Re: Problem with my first script

Post by gmb »

Thank you,
I tested and no change.
I do not know if this is related to Notepad ++ or anything else.
I tried to copy paste a script that works in mine and well I have the same problem.

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

Re: Problem with my first script

Post by Peke »

Please note that VBS file needs to be saved as plain ASCII Notepad++ can save UTF8 txt file and that make issues due the BOM character.
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
gmb
Posts: 5
Joined: Fri Jun 29, 2018 3:36 pm
Contact:

Re: Problem with my first script

Post by gmb »

Pavle thank you for your answer.
NotePad ++ offers as ANSI encoding but not ACSII.
Is it the same?
If not what program to use to write a script in ACSII?
A +
Peke
Posts: 13699
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: Problem with my first script

Post by Peke »

They are same :) ANSI is Character set and ASCII is Code Page.
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
gmb
Posts: 5
Joined: Fri Jun 29, 2018 3:36 pm
Contact:

Re: Problem with my first script

Post by gmb »

OK, thanks,
I retested by recording in ANSI.
No change.
Always the same mistake!
Good I give up!
I will not do MM Script.
Thanks for your help.
by
rivorson
Posts: 594
Joined: Thu Jul 25, 2013 4:17 am
Contact:

Re: Problem with my first script

Post by rivorson »

The problem may be in your Scripts.ini.

I have tested and got the same error if the ProcName declared in Scripts.ini does not exist in the script.

In your case, the section in Scripts.ini should contain

Code: Select all

Procname=CallMe
If it still doesn't work, post the contents of your Scripts.ini.
gmb
Posts: 5
Joined: Fri Jun 29, 2018 3:36 pm
Contact:

Re: Problem with my first script

Post by gmb »

A big thank you it works.
I can finally start to make my first script.
by.
Post Reply