Page 1 of 1 1
Topic Options
#151292 - 2005-11-11 01:21 PM shell/run enhancements
dr_heathcliff Offline
Lurker

Registered: 2005-11-11
Posts: 2
Suggestion - add an additional parameter to shell and run to control the window size the called program runs in (e.g. normal/minimized/maximised/hidden).

shell("notepad.exe", 0) for normal (default)
shell("notepad.exe", 1) for maximised
shell("notepad.exe", 2) for minimised
shell("notepad.exe", 3) for hidden

The one I am most interested in is hidden - it would be great to call a Windows Application hidden (like you can with SMS Installer 2.0.148.0) so the user doesn't see it launch.

Top
#151293 - 2005-11-11 02:17 PM Re: shell/run enhancements
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
but SHELL is a command, not a function. This would break all backward compatibility.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#151294 - 2005-11-11 03:05 PM Re: shell/run enhancements
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
He meant to say "add a switch", right Paul ? maybe like:

SHELL "<command>" /HIDDEN

Top
#151295 - 2005-11-11 03:13 PM Re: shell/run enhancements
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
There are some options that may be leveraged with COM using CreateObject("Shell.Application").
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#151296 - 2005-11-12 03:24 AM Re: shell/run enhancements
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11163
Loc: Boston, MA, USA
And via
Code:

SHELL '%COMSPEC% /C START ...'

_________________________
There are two types of vessels, submarines and targets.

Top
#151297 - 2005-11-13 03:05 AM Re: shell/run enhancements
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
and there is the udf runEx() for doing what you wanted...
_________________________
!

download KiXnet

Top
#151298 - 2005-11-22 03:36 PM Re: shell/run enhancements
dr_heathcliff Offline
Lurker

Registered: 2005-11-11
Posts: 2
Les, you are right, (silly me) it's a command not a function and as such a switch would have to be used.

sealeopard, SHELL '%COMSPEC% /c START...' doesn't allow me to launch a process hidden.

Jooel, I was aware of the runEx() udf (and shell.application.shellexecute method) but as far as I am aware it will only launch the process and continue - e.g. equiv to the kiXtart "RUN" command - it doesn't emulate the functionality of the kiXtart "SHELL" command. If anyone knows of a way to use a command to emulate this behavour (shell process hidden), it would be gracefully received!!

I'm quite happy if the consensus that this isn't really a positive enhancement means this doesn't happen, but I personally would find it useful, hence why I suggested it ;-)

Top
#151299 - 2005-11-22 07:28 PM Re: shell/run enhancements
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
making shell/run a function is something I do can vote for

anyway, from run to shell it's nothing more than some looping and sleeping.
_________________________
!

download KiXnet

Top
#151300 - 2005-11-23 09:28 AM Re: shell/run enhancements
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Quote:

anyway, from run to shell it's nothing more than some looping and sleeping.




...or use Wscript.Shell.Run with the "wait" flag as mentioned here: http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=151537&an=0&page=0#151537

Top
#151301 - 2005-11-23 10:12 PM Re: shell/run enhancements
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
I started thinking about that too but didn't check it out.
checked it now and sadly, shellExecuteEx() (for the shell object) is not available for scripting.

so, the enhancement suggestion gets my vote.
maybe even create a new function named RunEx() or similar that holds zillion arguments and can handle all these.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Lonkero, ShaneEP, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 281 anonymous users online.
Newest Members
Thechadpma, CestMoi, MeMyselfAndI, Praveer, Ollero
17745 Registered Users

Generated in 0.049 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org