Nakuribon Posted April 28, 2005 Share Posted April 28, 2005 ok, theres this windows api function SHRunDialog in Shell32.dll, and for those that kno VB, here is how the function is declared: Declare Function SHRunDialog Lib "shell32" Alias "#61" (ByVal hOwner As IntPtr, ByVal Unknown1 As Long, ByVal Unknown2 As Long, ByVal szTitle As String, ByVal szPrompt As String, ByVal uFlags As Long) As Long and how it is used: SHRunDialog(handle, 0, 0, Nothing, Nothing, 0) note that "handle" is any hwnd value, as the box is placed near whatever corresponds to the hwnd, the first "Nothing" shows the default title ("Run") and the second "Nothing" shows the default prompt. So, SHRunDialog(handle, 0, 0, "Cheese", "Enter ur text", 0) would produce a run dialog with the title as Cheese and the prompt as Enter ur text. My problem is doing this in AutoIt. Here is my code: Opt ("WinTitleMatchMode", 4) Opt ("WinTextMatchMode", 2) $MyHwnd = ControlGetHandle("classname=Shell_TrayWnd", "", "Button1") DllCall("shell32.dll", "long", "SHRunDialog", "hwnd", $MyHwnd, "long", 0, "long", 0, "str", "", "str", "", "long", 0) Why wont this work? Thanx! ~naku PS wow that was long lol i own this sig... php rulezlinks:My PSP Web Portal Link to comment Share on other sites More sharing options...
PerryRaptor Posted April 28, 2005 Share Posted April 28, 2005 I don't understand why you are taking this route vs. the AutoIt command Run() and RunWait(). I'd be extremely careful with this API call. It is not well documented. Secondly, I think we should delete this topic. Link to comment Share on other sites More sharing options...
Nakuribon Posted April 28, 2005 Author Share Posted April 28, 2005 this is part of a start menu/button replacement project, and i need to know how to call this from my own start menu i own this sig... php rulezlinks:My PSP Web Portal Link to comment Share on other sites More sharing options...
buzz44 Posted April 28, 2005 Share Posted April 28, 2005 Using a latest BETA /w COM. Try this. $objShell = ObjCreate("Shell.Application") $objShell.FileRun qq Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now