Jump to content

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


Recommended Posts

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!")
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • 2 weeks later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...