delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/13/13:43:32

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3E4BE741.C5A6BDE8@isg.de>
Date: Thu, 13 Feb 2003 19:43:13 +0100
From: Tino Lange <Tino DOT Lange AT isg DOT de>
Organization: IS Innovative Software AG
X-Accept-Language: de,en,fr
MIME-Version: 1.0
To: Robert Citek <rwcitek AT alum DOT calberkeley DOT org>
Cc: cygwin AT cygwin DOT com
Subject: Re: NT wrappers
References: <070b01c2d368$ee4bcdc0$9c00140a AT uk DOT circle DOT com> <F54ukGYk5qqWJJAf8DA0001cbfa AT hotmail DOT com> <070b01c2d368$ee4bcdc0$9c00140a AT uk DOT circle DOT com> <3 DOT 0 DOT 5 DOT 32 DOT 20030213092743 DOT 01d5cb88 AT mail DOT earthlink DOT net> <078701c2d376$4fd7a750$9c00140a AT uk DOT circle DOT com>

Hi!

The "MS way" of scripting applications is generally *not* using the
commandline but using (D)COM.
This can be done via lots of languages, very easy for example with
VBscript.

Your wrapper will look something like that:

set ie = CreateObject("InternetExplorer.Application")
ie.Navigate("http://sources.redhat.com/cygwin/")
READYSTATE_COMPLETE = 4
Do ' wait until page is loaded
 WScript.Sleep 10
Loop Until ie.ReadyState = READYSTATE_COMPLETE
ie.document.body.focus()
OLECMDID_PRINT = 6
OLECMDEXECOPT_DONTPROMPTUSER = 2
ie.execWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER
WScript.Sleep 5000 ' let ie some time to print before destroying...
ie.quit

But: As Vince wrote this is quite offtopic here...

Cheers

Tino

> ----- Original Message -----

Vince Hoffman wrote:

> Use the source ;) oops you can't.
> umm well if using /? or -? or /h or /help or any variation doesnt work then
> have a search on the net. There is no magic way to find out otherwise. ( To
> be honest you'd do much better asking on an MS related newsgroup/maillist)

> ----- Original Message -----

> From: "Robert Citek" <rwcitek AT alum DOT calberkeley DOT org>
> To: <cygwin AT cygwin DOT com>
> Sent: Thursday, February 13, 2003 3:27 PM
> Subject: NT wrappers
> 
> >
> > How can I discover what the command line options are to an NT program?
> >
> > I would like to write wrappers around some NT programs so that they are
> > easier to use from bash.  For example, I would like to write a wrapper so
> > that something like this is possible:
> >   $ explorer --print http://sources.redhat.com/cygwin
> > This would use MS Explorer to render the page and print it.  Of course,
> > Explorer is just one example.
> >
> > Regards,
> > - Robert

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019