User Forum    :: Powered by YaBB
  « MIDI-OX User Forum - Can't load mox variable outside of WSH folder »
Welcome, Guest. Please Login or Register.
Sep 14th, 2024, 10:43pm


Home Home Help Help Search Search Members Members Login Login Register Register


   MIDI-OX User Forum
   MIDI-OX
   Scripting Questions
(Moderator: Jamie OConnell)
   Can't load mox variable outside of WSH folder
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Can't load mox variable outside of WSH folder  (Read 1806 times)
krav_magan
Member
**



The Mox Script Master

   


Gender: male
Posts: 46
Can't load mox variable outside of WSH folder
« on: Jan 11th, 2015, 7:33pm »
Quote Quote Modify Modify

I'm trying to run my script from a directory other than the WSH folder located in the midiox install path.  The script works fine when located in the WSH folder, but fails to load the mox variable when located in My Documents (like so):
 
var mox = WScript.CreateObject("Midiox.MoxScript.1");
 
I tried copying all the files from the midiox path to the My Documents folder but it still wouldn't work.  Why is this?
« Last Edit: Jan 11th, 2015, 7:34pm by krav_magan » IP Logged
krav_magan
Member
**



The Mox Script Master

   


Gender: male
Posts: 46
Re: Can't load mox variable outside of WSH folder
« Reply #1 on: Jan 14th, 2015, 8:02am »
Quote Quote Modify Modify

...anyone out there... ?
IP Logged
Breath
Administrator
*****





   
WWW

Gender: male
Posts: 1012
Re: Can't load mox variable outside of WSH folder
« Reply #2 on: Jan 16th, 2015, 8:43pm »
Quote Quote Modify Modify

Hi
I'm not a Python writer, but I would think that you should just write the full path.
 
var mox = WScript.CreateObject("C:\Documents and Settings\Royce\My Documents\Script\Midiox.MoxScript.1");  
 
(In C++ you would need to replace \ with \\)
 
Royce
IP Logged
krav_magan
Member
**



The Mox Script Master

   


Gender: male
Posts: 46
Re: Can't load mox variable outside of WSH folder
« Reply #3 on: Mar 1st, 2015, 10:01am »
Quote Quote Modify Modify

I actually figured this out at some point.  The problem was when I copied the cscript.exe file (I copied one into the script folder so I could run it as admin) over to the new directory, it doesn't save the privilege settings so I had to set the copied cscript.exe to run as admin as well.  Hope this helps someone in the future.
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »


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