Quote:
Originally Posted by ancalex
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!