Sign in to follow this  
Followers 0
therks

Opening the Run Dialog

9 posts in this topic

I'm trying to open the run file dialog, normally accessed from the start menu. I looked around on Google for a while, and all I can find that would work is to use a VBScript file. But all I can keep thinking, is that there must be some way to open it with rundll32.exe, or DllCall() or something. Anybody know?

Share this post


Link to post
Share on other sites



The run dialog uses the shortcut keys WinKey + R.

*** Matt @ MPCS

Share this post


Link to post
Share on other sites

The run dialog uses the shortcut keys WinKey + R.

*** Matt @ MPCS

<{POST_SNAPBACK}>

Er.. right. But just Send()'ing that with AutoIt doesn't bring it up. I knew I forgot to mention something in the initial post, sorry.

Just so you know, the whole reason I'm doing this is because I have an older computer in my bedroom I use to work on scripts and stuff when I can't get on the "good computer."

The keyboard with the "bad computer" doesn't have a Windows key, so I wanted to create an AutoIt script, that would set a hotkey of Ctrl+Alt+R to the file run dialog.

If I could find out how to call it up with a dll or something, it would be a very simple AutoIt script.

HotKeySet("^!R", "FileRun");

Func FileRun
   DllCall("shell32.dll,FileRun");
EndFunc

While 1
   Sleep(10000);
WEnd

A whole 7 lines, see what I mean??

Share this post


Link to post
Share on other sites

This works here on Win2k English.

Send("#r")

Share this post


Link to post
Share on other sites

'#'
The hash now sends a Windows keystroke; therefore, Send("#r") would send Win+r which launches the Run dialog box.

Yep. SlimShady is correct.

Share this post


Link to post
Share on other sites

Wow... boy do I feel like a retard.

At first, my script wasn't working. It wouldn't bring up the dialog, so I was getting ready to make a post that essentially boiled down to "I'm right you're wrong, and you're still not helping!"

But then as I was debugging my own script, I realized my HotKey wasn't working at all (I put a msgbox in the FileRun function, and it wouldn't show up) so I tried changing the order of the !^ to ^! and still nothing... then I changed it to a lowercase R... And then that's when I thought to change the #R to a lowercase R... and then everything worked. I ran to my bedroom to check it on the computer in there, and same deal, works fine. Everytime I'd tried before, I'd use an uppercase R, and that's why it never worked.

Any idea why an uppercase R doesn't work? Is it like sending shift as well or something?

So sorry about this whole pointless thread... hopefully the next time some newbie comes along and has a similar question (I can't be the only one who never tried lowercase letters), they'll find this topic before making an ass out of themselves.

Thanks for being patient guys.

Share this post


Link to post
Share on other sites

It could be related to this from the helpfile:

N.B. Some programs are very choosy about capital letters and CTRL keys, i.e. "^A" is different to "^a". The first says CTRL+SHIFT+A, the second is CTRL+a. If in doubt, use lowercase!

... :) ...


Who else would I be?

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

until  you get your script running  hit CTRL and ESC  and you'll never miss the WINDOWS Key

<{POST_SNAPBACK}>

Oh I know about that, believe me. I also know about Shift+F10 for the rightclick menu (I'm a keyboard whore and a mouse hater). That's what I've been using, but hitting Ctrl+Escape,R isn't as smooth as Ctrl+Alt+R. :)

I'll be routing all all the WinKey combinations through AutoIt now. :)

Edited by Saunders

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0