Does anyone know what the call is?
Thanks
Frank
However, if you _MUST_ have the run dialog, then
this will do it:
Set oShellApp = CreateObject("Shell.Application")
oShellApp.FileRun
cheers, jw
____________________________________________________________
You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)
Frank
"ESP" wrote:
> This is the reference I use often.
> http://www.dx21.com/SCRIPTING/RUNDLL32/REFGUIDE.ASP
>
> ESP
--- <snip> ---
Const VK_LWIN = &H5B ' the "windows" key
Const VK_ACTION = &H52 ' &H52 is the character code for 'R' (ascii 82)
Const KEYEVENTF_KEYUP = &H2
Dim oDW : Set oDW = CreateObject("DynamicWrapper") ' instantiate dynawrap
oDW.Register "USER32.DLL", "keybd_event", "i=ttll", "f=s" ' declare
api (no return value)
Call oDW.keybd_event(VK_LWIN, 0, 0, 0) ' depress winkey
Call oDW.keybd_event(VK_ACTION, 0, 0, 0) ' depress "r"
Call oDW.keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0) ' release winkey
' note: this will start the "run dialog", from then on
' you will have to use appactivate and sendkeys to use it...
MsgBox("you should be seeing the run dialog now")
WScript.Quit
--- </snip> ---
cheers, jw
____________________________________________________________
You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)
--- <DynaWrap Boilerplate> ---
It is possible to declare-and-call an api from script,
but you must use a third-party control to do so,
or else write one yourself.
It has already been correctly pointed out that there
is no api-capability in "pure" script.
If you are willing to use a third-party control, then
one such control, called "DynaWrap", can be found on
Guenter Born's website (note: Guenter refers to it as
"DynaCall"). Here is the link to it:
http://people.freenet.de/gborn/WSHBazaar/WSHDynaCall.htm
On that page you will find a download for the control,
plus some code samples.
Note: you may find additional sample code by searching
the archives for this ng, and the vbscript ng.
Note also: DynaWrap does have its limitations. There are
certain things it can't do. For example, you can't call
api's which take typedefs as parameters, and you can't call
api's "by ordinal". But it will work for most of the
"usual suspects".
And finally, DynaWrap doesn't work entirely as advertised.
For example, it is supposed to allow for the declaration of
several api definitions in one instance of itself. I could
never get that to work (in win9x). You will need a new
instance of DynaWrap for every api, or else re-instantiate
the object for every api. Someday I'm going to learn enough
c++ to fix that...
--- </DynaWrap Boilerplate> ---