Sign in to follow this  
Followers 0
boaster

Emulating Windows "Run" mode

11 posts in this topic

How would I emulate the Windows Run Mode in AutoIt? For example, if you type Window-R and then type "Winword", Microsoft Word will run regardless of the subdirectory in which it is installed. Also, Window-R followed by a URL will open a web site such as "www.autoscirpt.com".

However, using Run("www.autoscript.com")

or

Run("winword")

generates errors in Autoscript.

Thanks

Share this post


Link to post
Share on other sites



Look for a ShellExecute UDF on these forums.


Who else would I be?

Share this post


Link to post
Share on other sites

How would I emulate the Windows Run Mode in AutoIt? For example, if you type Window-R and then type "Winword", Microsoft Word will run regardless of the subdirectory in which it is installed. Also, Window-R followed by a URL will open a web site such as "www.autoscirpt.com".

However, using Run("www.autoscript.com")

or

Run("winword")

generates errors in Autoscript.

Thanks

$command = 'winword'

_RunDOS($command)

Share this post


Link to post
Share on other sites

@KXM, you forgot to mention that your method requires process.au3 to be included.


Who else would I be?

Share this post


Link to post
Share on other sites

$command = 'winword'

_RunDOS($command)

now your thinkin!


[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Share this post


Link to post
Share on other sites

Not to be confused with:

#include <process.au3>
$winword = 'command'
_RunDOS($winword)

...which will set the Waybac machine to 1985...


...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Surely this is easier?

$command = 'winword'
RunWait(@ComSpec & ' /c ' & $command, '', @SW_HIDE)

Also typing cmd in Scite4AutoIt3 and pressing the spacebar gives you this

RunWait(@ComSpec & ' /c |', '', @SW_HIDE)

As above, the pipe character is where the caret starts from, so you just enter your command.

Edit: "Start WinWord" seems to be needed to be used from Comspec.

Edited by MHz

Share this post


Link to post
Share on other sites

Also typing cmd in Scite4AutoIt3 and pressing the spacebar gives you this

I just finished ready the manual for beta 75 and now you tell me I really should read the Scite help file? There goes what was left of my "life"...

;)


...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

Share this post


Link to post
Share on other sites

I just finished ready the manual for beta 75 and now you tell me I really should read the Scite help file? There goes what was left of my "life"...

:P

heh, you need to play catch up then, cuz beta 80 is the latest ;)


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

I just finished ready the manual for beta 75 and now you tell me I really should read the Scite help file? There goes what was left of my "life"...

;)

Reading the Scite4AutoIt3 Manual is worth it. Abbreviations save so much effort and time that you are missing out big time if you are not using them. :P Edited by MHz

Share this post


Link to post
Share on other sites

heh, you need to play catch up then, cuz beta 80 is the latest ;)

i'm using 80, but the last time I had enough paper to print out the manual was back at 75. i guess i could print just the incremetals... (i like to read the manual on paper --- traditionalist...) :P

...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

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