View Single Post
Old 04-21-2009, 04:22 PM   #22
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by ancalex View Post
You can see in the source that I'm using the cscript.exe to run the jscript so you can try to place in the front of the command line the cscript executable like i did in my autoit script.
Anyway thank you for your interest, sorry I must go to sleep now, tomorrow a busy day at work.
By
IT WORKS JUST AS IS!!!!!!!!!

My fault for trying to run this deep inside subdirectories, as I noticed the Windows (default) environment space gets exhausted if the "command.com /c cscript ScriptDir\word2imp.js OpenFileName Title Author Category BuildTarget" is too long.

Code:
D:\REB\NEWFOL~1\NE3CF9~1\WORD2I~1>command.com /c cscript "D:\REB\New Folder\New Folder (10)\word2imp-source\word2imp.js" Joke.doc T A C 2
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Converting... Please wait
Project file saved
Conversion completed

D:\REB\NEWFOL~1\NE3CF9~1\WORD2I~1>command.com /c cscript "D:\REB\New Folder\New Folder (10)\word2imp-source\word2imp.js" Joke.doc MyTitle MyAuthor MyCategory 2
Program too big to fit in memory
I think if you change "command.com /c" to "command.com /c /e:4096" it should help.

However, upon further testing, it appears that the REAL culprit is that @ScriptDir breaks this command when the fullpath directory name (but not $OpenedFileName directory or filename) contains spaces!!!

Can you just substitute $ScrFile where it can be defined as a global at the start of the script? i.e.
Code:
Global $ScrFile=@ScriptDir & "\word2imp.js"
Have a pleasant well-deserved rest!

Last edited by nrapallo; 04-21-2009 at 06:17 PM. Reason: added possible enhancements
nrapallo is offline   Reply With Quote