Question related to Scripts

Get answers about using MediaMonkey 4 for Windows.

Moderator: Gurus

sajjanj
Posts: 18
Joined: Thu Feb 28, 2013 1:35 am

Question related to Scripts

Post by sajjanj »

I have installed a few scripts in my MM 4.1.9.1764.
Every time I open the application, I get an error message twice, which tells me that 2 of the scripts are not getting loaded up properly.

Scripts installed:
- Auto-Increment Track #s
- Swap Artist and Title
- Case Checker
- Export all Playlists
- Export subscribed Podcasts[/list]

Error Message:
Error happened during script execution:
A script engine for the specified language can not be created


Here are my questions -
- How do I determine which script is not working?
- How do I remove the scripts from my list, so I do not see those error messages?
- Is there a way to view the script code?
Peke
Posts: 17489
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Question related to Scripts

Post by Peke »

Hi,
Error Message: "Error happened during script execution: A script engine for the specified language can not be created" is system error not by MMW mostlikely that something changed your VBScript/JScript settings in your system (Some AntiVirus apps do that) and MWM can't initialize the scripting language. Have you tried suggestions from knowledgebase?
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
manishboyradio
Posts: 1
Joined: Tue Jun 07, 2016 7:08 pm

Re: Question related to Scripts

Post by manishboyradio »

What do i need to change in this script to make it swap the title and album info, Thanks



Sub SwapArtistTitle
' Define variables
Dim list, itm, i, tmp

' Get list of selected tracks from MediaMonkey
Set list = SDB.CurrentSongList

' Process all selected tracks
For i=0 To list.count-1
Set itm = list.Item(i)

' Swap the fields
tmp = itm.Title
itm.Title = itm.ArtistName
If itm.AlbumArtistName = itm.ArtistName Then ' Modify Album Artist as well if is the same as Artist
itm.AlbumArtistName = tmp
End If
itm.ArtistName = tmp
Next

' Write all back to DB and update tags
list.UpdateAll
End Sub
Guest

Re: Question related to Scripts

Post by Guest »

Code: Select all

' A simple script that swaps the content of Title and Album fields of selected tracks

Sub SwapTitleAlbum
  ' Define variables
  Dim list, itm, i, tmp

  ' Get list of selected tracks from MediaMonkey
  Set list = SDB.CurrentSongList 

  ' Process all selected tracks
  For i=0 To list.count-1
    Set itm = list.Item(i)

    ' Swap the fields
    tmp = itm.Title
    itm.Title = itm.AlbumName
    itm.AlbumName = tmp
  Next

  ' Write all back to DB and update tags
  list.UpdateAll
End Sub
Save it to ...\AppData\Roaming\MediaMonkey\Scripts
In the same folder, find Scripts.ini - paste and save the following on the end:

Code: Select all

[SwapTitleAlbum]
FileName=SwapTitleAlbum.vbs
ProcName=SwapTitleAlbum
Order=21
DisplayName=&Swap Album and Title
Description=Swaps Album and Title fields
Language=VBScript
ScriptType=0
sajjanj
Posts: 18
Joined: Thu Feb 28, 2013 1:35 am

Re: Question related to Scripts

Post by sajjanj »

Is there an object browser available, where I could view the available objects, methods & properties?
Guest

Re: Question related to Scripts

Post by Guest »

Post Reply