| View previous topic :: View next topic |
| Author |
Message |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Mon Jan 15, 2007 3:23 pm Post subject: Open Windows Run Dialog |
|
|
How can I open the windows run dialog from VDS? I thought this was said before, but I could not find it when searching the forum.
Thanks _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Mon Jan 15, 2007 5:27 pm Post subject: |
|
|
I know the key shortcut is Windows+R, but that is the extent of my ideas.
As a side note, is it possible to "send" the Windows key in VDS? _________________ Joe Floyd |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Mon Jan 15, 2007 5:43 pm Post subject: |
|
|
I need to be able to call it w/o using any send keys. _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Jan 16, 2007 5:24 pm Post subject: |
|
|
Oops my fault Liquidcode... I guess you were not aware that only registered users of GadgetX can see those links above. Basicly here is the code below... I searched and tried many things to get this to work with only VDS but I could not figure out how to get VDS to accept a function ordinal number inplace of the function name On the bright side GadgetX will do this for ya You need 2.X.152.70 of GadgetX or newer for this to work.
ActiveX Way
| Code: |
#-----------------------------------------------------------------------------#
# #
# This program demostrates how to call the FileRun dialog using GadgetX OLE support #
# #
# #
# Author: Johnny Kinsey (A.K.A. DragonSphere) #
# #
# Copyright: copyright © 2007 Dragon Sphere Software #
# #
#-----------------------------------------------------------------------------#
Title Show Run dialog
External GadgetX.dll,5.0
#DEFINE COMMAND,SET,DEFINE,OLE
#DEFINE FUNCTION,GET,OLE
Define Variable,Object,Shell
Ole Init
Set Shell,@Ole(Create,"Shell.Application")
Ole Call,Shell,"FileRun()"
Info Notice that the FileRun box is showing and this info box is too.
|
Win32 API Way
| Code: |
#-----------------------------------------------------------------------------#
# #
# This program demostrates how to call the undocumented function SHRunDialog #
# in the shell32.dll. We are calling this function by Ordinal since the #
# the shell32.dll does not export the function by name. The ordinal number #
# for the SHRunDialog function is #61 #
# #
# WARNING: This is an undocumented function and is subject to change #
# #
# Author: Johnny Kinsey (A.K.A. DragonSphere) #
# #
# Copyright: copyright © 2007 Dragon Sphere Software #
# #
#-----------------------------------------------------------------------------#
Title Show Run dialog
External GadgetX.dll,5.0
#DEFINE COMMAND,FREEDLL,SET,DEFINE
#DEFINE FUNCTION,LOADDLL,GET,CALLFUNCPTR,GETFUNCPTR,MAKELONG,OLE
# Define a Handle for the shell32.dll
Define Variable,Handle,shell32
# Load the dll and save it's handle
Set shell32,@LoadDLL(shell32.dll)
# Define a Pointer for the SHRunDialog function memory address
Define Variable,Pointer,SHRunDialog
# Using MakeLong put the ordinal in the low word value and save it.
%%SHRunDialogOrdinal = #@MakeLong(61,0)
# Get the address of the function using the ordinal and save it.
Set SHRunDialog,@GetFuncPtr(shell32,%%SHRunDialogOrdinal)
# The SHRunDialog function requires the following strings to be wide character strings
%%Title = @Ole(VDSToBSTR,"Run")
%%Description = @Ole(VDSToBSTR,"Type the name of a program, folder, document, or Internet resource, and Windows will open it for you.")
%%WorkingDir = @Ole(VDSToBSTR,@Path(%0))
%%NoBrowse = 1
%%NoMRU = 2
%%NoBrowseAndNoMRU = 3
%%CalcDirectory = 4
%%NoLabel = 8
%%NoSeparateMem = 20
%%WM_GETICON = 127
# Build a hidden VDS window
DIALOG CREATE,VDS hidden window,0,0,240,160
# DIALOG SHOW
# Get the big icon
%%BigIcon = @SendMsg(@winexists(VDS hidden window),%%WM_GETICON,1,0)
# Call the function passing it the Handle of the Tray Window and above string addresses
# This function will wait until the user closes the dialog before returning.
%A = @CallFuncPtr(Micro$oft,DWORD,SHRunDialog,HANDLE|#Shell_TrayWnd,HANDLE|%%BigIcon,Pointer|%%WorkingDir,Pointer|%%Title,Pointer|%%Description,DWORD|%%CalcDirectory)
# Sorry the return value is always 0. It would have been nice if MS gave us some clue as to what the user was doing :-(
FreeDLL shell32
|
_________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|