Quick status nick. I've gotten your first request completed. I have the code that will display a "File Open" dialog box. And a simple GUI for the javascript.

The UI is nothing more than a call to IE ActiveX control with hand written HTML.
Since this is test code I've not integrated it with the word2imp script.

OH a FYI. I found some of my old scripts, where I used the Windows Scripting Host (WSH) written in Perl. It provides all the power that VBA and Javascript have but in Perl. The disadvantage is that it requires ActivePerl.

Quick status nick. I've gotten your first request completed. I have the code that will display a "File Open" dialog box. And a simple GUI for the javascript.

The UI is nothing more than a call to IE ActiveX control with hand written HTML.
Since this is test code I've not integrated it with the word2imp script.

Thanks for helping out here. I do like using a GUI rather than remembering all the command line switches...

Quote:

OH a FYI. I found some of my old scripts, where I used the Windows Scripting Host (WSH) written in Perl. It provides all the power that VBA and Javascript have but in Perl. The disadvantage is that it requires ActivePerl.

I'll post the finish code here when it's done.
=X=

Oh, I like that!!! I have ActivePerl installed; originally to use with tompe's Mobiperl scripts (I use WinXP) and then for SBPubX OLE/COM interface scripts as well as Mobi2IMP and Lit2sb.

Do you think it would be worthwhile to also have the Microsoft Visual Basic example scripts from the SBPubX.doc posted here as well. I know you've converted the above to javascript, but would there be any benefit to using MS Visual Basic, GUI-wise?

Do you think it would be worthwhile to also have the Microsoft Visual Basic example scripts from the SBPubX.doc posted here as well. I know you've converted the above to javascript, but would there be any benefit to using MS Visual Basic, GUI-wise?

Actually that would be the cleanest way to go. Scripts are great when you want to do something quick and dirty. But once you start creating GUI and more sophisticated good development tools are a must.

I quit using it since VB 6. But if you used the Net platform you could easily write a GUI with Basic/C#/JScript... you get my point .

The bad news is I have do not programming experience with the NET framework, which is what MS currently supports.

I do .Net dev for my day job. So, if anyone wants help putting together something I would be happy to help. I guess to get started download one of the visual studio express IDEs, they are free. You have to choose VB.Net express or C# Express.

I do .Net dev for my day job. So, if anyone wants help putting together something I would be happy to help.

Thanks for the offer, BOb!

Quote:

I guess to get started download one of the visual studio express IDEs, they are free. You have to choose VB.Net express or C# Express.

BOb

If I download the free VB.Net express, then could you perhaps show us how to GUI-ize =X='s javascript for, say, word2imp.js in post #1 above. In particular, it would be nice to select the MS .doc input file to convert using a File Open Requester here:

Code:

fileFullPathName = oArgs.item(0);

and perhaps have a GUI screen that includes a browse button for the above and InputBoxes/CheckBoxes to select options, in place of the "Default", for:

I have some knowledge in visual basic but my experience with visual basic express 2005 or 2008 was not satisfactory. On my laptop with only 512 MB of RAM visual express is working very, very slow. So I looked for alternatives and I found AutoIT a basic like scripting language. I will post soon a little script that achieve those things asked by nrapallo.

I have some knowledge in visual basic but my experience with visual basic express 2005 or 2008 was not satisfactory. On my laptop with only 512 MB of RAM visual express is working very, very slow. So I looked for alternatives and I found AutoIT a basic like scripting language. I will post soon a little script that achieve those things asked by nrapallo.

That would be terrific! Are you going to use Koda FormDesigner or straight AutoIt code with COM support?

Here is a sample GUI layout I was looking at using before:

And a while back, I was even toying with an Internet Explorer V6 interface, as seen below:

Attached Thumbnails

Last edited by nrapallo; 04-23-2009 at 09:23 AM.
Reason: added more screenshots

Hi
Well, AutoIt support operations with COM objects but like you will see it's a little bit tricky to manage that.
First I tried to do everything in a single script but... surprise... when I want to catch the OnBuildStart event using BuildFromWordDoc the result is... nothing. The event is not firing my function in AutoIt for overriding default project settings.
I can catch this event if I use BuildFromHtmlFile but surprise again... the default projects settings are used despite of what I do in my function. I think AutoIt have some problems with some events with some COMs... especially with SBPublisher COM.
So I decided to write only a GUI wrapper for word2imp.js first.
Here are the results.

First the source file (contains the autoit script and the jscript)

Second, the executable (contains the compiled autoit executable and again the jscript)

Second, the executable (contains the compiled autoit executable and again the jscript)

EDIT: This GUI wrapper works just fine as can be seen by this post clarifying why this didn't work for me initially! I recommend you try this with short names or just under the root directory to ensure the directory name contains no spaces and/or the comspec environment space doesn't get exhausted (or just increase it).

I tried to run the executable but got a Spybot false positive detection of malicious code (see attached picture). Spybot then deleted the file.

Is this a known problem?

What did you use to create the .exe. I'll try creating another .exe to see if it does the same thing. Weird.