[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

[Solved] Problem with my first script

Post by gmb » Tue Aug 21, 2018 3:13 am

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: 576
Joined: Thu Jul 25, 2013 4:17 am

Re: Problem with my first script

Post by rivorson » Tue Aug 21, 2018 1:53 pm

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

Re: Problem with my first script

Post by gmb » Wed Aug 22, 2018 1:53 am

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: 11344
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: Problem with my first script

Post by Peke » Sat Aug 25, 2018 2:29 pm

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 Images to forum

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

Re: Problem with my first script

Post by gmb » Sun Aug 26, 2018 10:49 am

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: 11344
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: Problem with my first script

Post by Peke » Sun Aug 26, 2018 4:05 pm

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 Images to forum

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

Re: Problem with my first script

Post by gmb » Mon Aug 27, 2018 2:31 am

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: 576
Joined: Thu Jul 25, 2013 4:17 am

Re: Problem with my first script

Post by rivorson » Mon Aug 27, 2018 8:40 am

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

Re: Problem with my first script

Post by gmb » Tue Aug 28, 2018 4:08 am

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

Post Reply