MIDI-OX User Forum (http://www.midiox.com/cgi-bin/yabb/YaBB.pl)
MIDI-OX >> Scripting Questions >> [jscript] LoadProfile
(Message started by: ml on Nov 16th, 2004, 5:07pm)

Title: [jscript] LoadProfile
Post by ml on Nov 16th, 2004, 5:07pm
Hi all,
I began working with jscript and i cannot execute LoadProfile. WSH doesnt report any error, but midi OX doesnt load any profile as well...

my code:
----------------------------------------------
mox = WScript.CreateObject("MIDIOX.MoxScript.1", "On_");
mox.LoadProfile("C:\Program Files\MIDIOX\Instr\seq.master.ini")
WScript.Echo( "Press OK to end the script!" );
----------------------------------------------

I also tried:
mox.LoadProfile "C:\Program Files\midiox\myset.ini"
    ...but it reports error


Any ideas?




Title: Re: [jscript] LoadProfile
Post by Jamie OConnell on Nov 17th, 2004, 12:09pm
If you don't have any connection point Sync, then don't specify a prefix.  WSH fails because one is specified.  Try:

jscript ----------------------------------------

mox = WScript.CreateObject( "MIDIOX.MoxScript.1" );
mox.LoadProfile( "C:\Program Files\MIDIOX\Instr\seq.master.ini" );
WScript.Echo( "Press OK to end the script!" );

vbscript --------------------------------------

Set mox = WScript.CreateObject( "Midiox.MoxScript.1" )  
mox.LoadProfile "C:\Program Files\MIDIOX\Instr\seq.master.ini"
MsgBox "Press OK to end the script!"

----------------------------------------------



MIDI-OX User Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.