Dear NWC Forum,
Thanks for being a great place to share info. I am trying to write my first User Tool. It will be in Python. It is very simple. It copies a clip to a file.
I am using NWC 2.5.5 & have installed version 2.5 of the NWC2 User Tool Starter Kit.
Here's some system info from About Starter Kit:
System => Windows NT cmptrName 5.1 build 2600 (Windows XP Professional Service Pack 3) i586
Build Date => Sep 17 2009 19:13:11
Compiler => MSVC9 (Visual C++ 2008)
Architecture => x86
Configure Command => cscript /nologo configure.js "--disable-all" "--enable-cli" "--enable-zlib"
Server API => Command Line Interface
Here is my simple Python program to copy a clip to a file:
import sys
instr = sys.stdin.read()
f = open('joesFirstTestOut.txt', 'w'); f.write(instr); f.close()
When I run it from a windows prompt, it works :
C:\...Scripts>python joesFirst.py<joesFirstTestIn.txt
When I run it from a NWC User Tool, there is NO CHANGE in joesFirstTestOut.txt.
My User Tool Description Dialog has been set with 2 alternatives with the same results as above:
Alt-1
group: joe
name: joesFirst.py
command: python scripts\joesFirst.py
input type: clip text
options:
compress input: [ ]
returns file text: [ ]
long task handling: [ ]
prompts for user input: [ ]
Alt-2
group: joe
name: joesFirst.py
command: python scripts\joesFirst.py
input type: clip text
options:
compress input: [ ]
returns file text: [ ]
long task handling: [X]
prompts for user input: [ ]
Does anyone have any suggestions?
Thanks in advance.
Love and peace,
Joe