MIDI-OX User Forum (http://www.midiox.com/cgi-bin/yabb/YaBB.pl)
MIDI-OX >> Scripting Questions >> How do I get the scripting demos to run? (2013)
(Message started by: krav_magan on Dec 5th, 2013, 2:45am)

Title: How do I get the scripting demos to run? (2013)
Post by krav_magan on Dec 5th, 2013, 2:45am
I wanted to play around with scripting since I've been using midiox extensively for my setup just using simple data and patch maps but now I'm getting ideas to extend the functionality a bit more.

I feel a bit overwhelmed though on just where to begin.  The demos in the WSH folder were last modified in 2002 and when I opened the python demo in an editor I saw that it couldn't import "win32ui" and "win32con" because they weren't there.

I feel like I could manage figuring out how to do some basic scripting if I could get one of these demos to work but I'm not sure what exactly I need to do to get them to run properly.  Do I need an older version of python?  I'm open to using javascript or vbscript, whatever would be the most painless to use at this point.

If anyone could help point me in the right direction I'd really appreciate it.

Title: Re: How do I get the scripting demos to run? (2013
Post by krav_magan on Dec 5th, 2013, 2:56am
Do I need to download some Win32 extensions and put them in the WSH folder?

Title: Re: How do I get the scripting demos to run? (2013
Post by krav_magan on Dec 5th, 2013, 7:14am
Yah basically I'm not sure what I need to be able to run the python demo.  I'm on Win7 x64.  I'm assuming it's the import files but I'm really not enough of a veteran programmer that this is something I can overcome very easily.

Title: Re: How do I get the scripting demos to run? (2013
Post by krav_magan on Dec 5th, 2013, 7:52pm
Okay this is the last post until someone responds... I swear.  I'm not looking for a step-by-step guide here, just a general list or direction of what I need to fire up this python demo.  I got into programming late last year and I don't know if I have to do something weird like download an older .NET framework or something to get this win32 files.  Once I get the demo I'm sure I can figure the rest out from there.

Thanks in advance.

Title: Re: How do I get the scripting demos to run? (2013
Post by Breath on Dec 6th, 2013, 1:16am
Hi
I can get the script to run in IDLE with the Win extensions

Here is the latest version of IDLE Python
http://www.python.org/download/releases/3.3.3/
Win Extensions
http://sourceforge.net/projects/pywin32/

Note the print statement won't work so just add a # at the start of those lines.

#print "This file must be .....

All the best
Royce

Title: Re: How do I get the scripting demos to run? (2013
Post by krav_magan on Dec 6th, 2013, 8:12pm
Hey Royce, thanks for the speedy reply man... we're lucky to have you here.

I installed the win32 extensions from the link you posted but when I go to run the demo it still says I'm missing the "win32ui" module (and really it could be more since that's just the first module it's trying to load).  I made sure I installed the 32bit extensions so I know it's not that.

I'll keep trying to figure this out.

Title: Re: How do I get the scripting demos to run? (2013
Post by krav_magan on Dec 6th, 2013, 8:16pm
I did some searching for the win32ui module and I found this:

C:\Python27_x32\Lib\site-packages\pythonwin\win32ui.pyd

Is .pyd a valid import file?  Does this seem right?

Title: Re: How do I get the scripting demos to run? (2013
Post by Breath on Dec 9th, 2013, 6:22pm
Hi Chris

I think you will find all the files you need in the pywin32 bundle.
Just follow the link below and there should be an installer that will set things up for you.
The first link I gave you was for the main page.

This link will take you to the download page
http://sourceforge.net/projects/pywin32/files/pywin32/
Click on the latest build (218 ) and this will open a page of the files to choose.

Choose the one for your system - if you are using an AMD64 bit mode choose that other wise just choose the version of Python you have installed.

I have Python 3.3 an AMD chip but only 32 bit XP so I used
pywin32-218.win32-py3.3.exe

All the best
Royce

Title: Re: How do I get the scripting demos to run? (2013
Post by krav_magan on Dec 10th, 2013, 3:22am
Yes that's the file I downloaded but I still got those import errors.  I'm using python 2.7 so maybe I'll try it with 3.3 and see if that changes anything.  Either way I don't see why the module files shouldn't be there?  Hmm.  Are you able to find the actual win32ui file in a search?

If I can't get this to work I might just cut my losses with python and try accessing the COM with jscript and see how that goes.

Thanks for the help man.

Title: Re: How do I get the scripting demos to run? (2013
Post by krav_magan on Dec 11th, 2013, 3:51am
I just tried running the jscript demo and there's a problem with the Wscript.CreateObject method right at the beginning when it tries to create the Midiox.MoxScript.1 object (I'm guessing that's the method that creates the instance of midiox if it's not there?).  I have no idea what's going wrong since there's no import files missing or anything.  Any ideas?

I'll get one of these demos to work if it's the last thing I do! lol

Title: Re: How do I get the scripting demos to run? (2013
Post by krav_magan on Dec 13th, 2013, 1:28am
weird, it suddenly seems to work!  I'm not complaining but I have no idea what changed!! ha  ???  :D



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