1. shellExecute
I need to know how to execute the command (in win32lib v45r):
shellExecute(command, file, style)
What is needed in: command, file, and style?
I'm making a "Run Bar" (Program Launcher, upgrade to Brian Jackson's
program launcher. I'm using the system_exec (for error messaging) but
I want to use shellexecute..
Get you free email at http://gha.zzn.com and visit us at http://gha.cjb.net
___________________________________________________________
Get your own Web-Based E-mail Service at http://www.zzn.com
2. Re: shellExecute
I was hoping David might consider adding this to the documentation...
(nudge, nudge)
shellExecute( command, file, style )
The following operation strings are valid for 'command':
"open" -- The function opens the file specified by the 'file' parameter.
The file can be an executable file or a document file. It can
also be a folder.
"print" -- The function prints the file specified by 'file'. The file
should be a document file. If the file is an executable file,
the function opens the file, as if "open" had been specified.
"explore" -- The function explores the folder specified by 'file'.
This parameter can be NULL. In that case, the function opens the file
specified by 'file'.
'file' is a string that specifies the file to open or print or the folder
to open or explore. The function can open an executable file or a document
file. The function can print a document file.
If 'file' specifies an executable file, 'style' specifies how the
application is to be shown when it is opened. This parameter can be one of
the following values:
SW_SHOWDEFAULT Default style.
SW_HIDE Hides the window and activates another window.
SW_MAXIMIZE Maximizes the specified window.
SW_MINIMIZE Minimizes the specified window and activates the next top-
level window in the z-order.
SW_RESTORE Activates and displays the window. If the window is minimized
or maximized, Windows restores it to its original size and
position. An application should specify this flag when
restoring a minimized window.
SW_SHOW Activates the window and displays it in its current size and
position.
SW_SHOWMAXIMIZED Activates the window and displays it as a maximized
window.
SW_SHOWMINIMIZED Activates the window and displays it as a minimized
window.
SW_SHOWMINNOACTIVE Displays the window as a minimized window. The active
window remains active.
SW_SHOWNA Displays the window in its current state. The active window
remains active.
SW_SHOWNOACTIVATE Displays a window in its most recent size and position.
The active window remains active.
SW_SHOWNORMAL (or SW_NORMAL) Activates and displays a window. If the
window is minimized or maximized, Windows restores it to its
original size and position. An application should specify
this flag when displaying the window for the first time.
-- Brian
3. Re: shellExecute
Brian Broker wrote:
> I was hoping David might consider adding
> this to the documentation...
> (nudge, nudge)
I'm really ambivalent about this function, perhaps because it so thinly
wraps a Win32 call. I can never remember what the arguments are, and have to
look it up in the Win32 help file every time I want to use it.
I've considered deprecating it for some time for two seperate routines, each
doing a specific task:
shellRun( filename, style )
shellPrint( filename )
For anyone who's playing around with Win32Lib and has questions about some
of these functions, I highly recommend downloading the Win32 help file on
the RDS site. It's often quite easy to 'roll your own' Win32 API calls.
-- David Cuny