Author |
Topic: Can't load mox variable outside of WSH folder (Read 1806 times) |
|
krav_magan
Member
The Mox Script Master
Gender:
Posts: 46
|
|
Can't load mox variable outside of WSH folder
« on: Jan 11th, 2015, 7:33pm » |
Quote 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:
Posts: 46
|
|
Re: Can't load mox variable outside of WSH folder
« Reply #1 on: Jan 14th, 2015, 8:02am » |
Quote Modify
|
...anyone out there... ?
|
|
IP Logged |
|
|
|
Breath
Administrator
Gender:
Posts: 1012
|
|
Re: Can't load mox variable outside of WSH folder
« Reply #2 on: Jan 16th, 2015, 8:43pm » |
Quote 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:
Posts: 46
|
|
Re: Can't load mox variable outside of WSH folder
« Reply #3 on: Mar 1st, 2015, 10:01am » |
Quote 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 |
|
|
|
|