I want to open files using this sript in the same instance of Spek (same window) (http://spek.cc/)
At this moment it will open in another window every time. The only way is to drag and drop in the same window.
This is the script:
Code: Select all
' A simple script that shows how to open a selected track in another application. ' In this case it is Spek (expected to be in C:\Program Files (x86)\Spek\spek.exe). Const SpekPath = "C:\Program Files (x86)\Spek\spek.exe" Sub OpenInSpek ' Define variables Dim WShell, Command, NPSong ' Get list of selected tracks from MediaMonkey Set NPSong = SDB.Player.CurrentSong ' Prepare WScript.Shell object, which can be used for execution of applications Set WShell = CreateObject("WScript.Shell") If Not NPSong is Nothing Then Command = Chr(34) & SpekPath & Chr(34) & " " & Chr(34) & NPSong.Path & Chr(34) End If ' And execute the command WShell.Run Command, 1, 0 End Sub