Jump to content
Sign in to follow this  
xeshan

Can I make the Start Menu Appear in an Easier Way?

Recommended Posts

xeshan

Firstly, I aplogize - this is my first script I've created with AutoIt and I wanted to run it by you.

Please let me now if this script is acceptable.

I'm trying to kill Communicator and Outlook then run a command in Start>Run.

Firstly, the error I see..is that I have to leave a space before Dos command is run because, it types so fast with the send command, that it skips the first letter..hence the space. (There has to be a better way)

Secondly, is there a better way to bring up the Start Menu>Run line. I am afraid some people may not have Left Windows button key for example.

Any ideas much appreciated.

Thank you,

Run("cmd.exe")
Send(" taskkill /f /im  communicator.exe")
Send("{ENTER}") 
Send(" taskkill /f /im  outlook.exe")
Send("{ENTER}")
Send(" exit")
Send("{ENTER}")
Send("{LWINDOWN}r{LWINUP}")
WinActivate("Run","")
Send("outlook.exe{SPACE}/cleanfreebusy{ENTER}")
MsgBox(0, "Script Completion!", "Outlook Troubleshooting Complete!")

Share this post


Link to post
Share on other sites
rudi

Hi.

Welcome to the forum :mellow:

These functions should help you:

ProcessClose()

run()

runwait()

ShellExecute()

ShellExecuteWait()

Regards, Rudi.

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites
Juvigy

Forget the send commands. Use RunWait instead like that:

RunWait(@COMSPEC & " /c taskkill /f /im  communicator.exe")

Share this post


Link to post
Share on other sites
xeshan

Thank you so much for your help!! I have employed the use of ProcessClose which works great!

I wanted to ask if there is a better way than this:

Send("{LWINDOWN}r{LWINUP}")
WinActivate("Run","")
Send("outlook.exe{SPACE}/cleanfreebusy{ENTER}")

I want it to appear in the Run line from the Start Menu, as it won't execute in DOS.

Thank you again so much

Share this post


Link to post
Share on other sites
rudi

Hi.

...

Send("{LWINDOWN}r{LWINUP}")
WinActivate("Run","")
Send("outlook.exe{SPACE}/cleanfreebusy{ENTER}")

I want it to appear in the Run line from the Start Menu, as it won't execute in DOS.

Did you try runwait() and shellexecutewait() in stead?

I can't see, why you should want to (ab)use start->run...

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites
Juvigy

RunWait(@COMSPEC & " /c start outlook.exe /cleanfreebusy")

Share this post


Link to post
Share on other sites
xeshan

Thank you so much!

I used:

RunWait(@COMSPEC & " /c start outlook.exe /cleanfreebusy")

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  

×