Jump to content

Basic script help


Dedd
 Share

Recommended Posts

Hi,

I am trying to make a small executable that will invoke the key commands to switch from the desktop to the Metroui in windows 8.

I am using a start menu replacement so the normal win key function for windows 8 has been changed to invoke the start menu in classic shell.

To switch from desktop to MetroUI you need to press winkey+c then hit enter. Someone helped me with the scripting below and told me to use Autoit to compile it to an exe.

That is where I am lost. I am not sure how to proceed or what program I actually need.

her is an example of the script.

Local $ShellObj = ObjCreate("Shell.Application")
$ShellObj.ToggleDesktop()
sleep(100)
Send("{LWINDOWN}c{LWINUP}")
sleep(10)
Send("{ENTER}")

Any help would be appriciated. The idea is to have a small exe that I can pin to the task bar and click on whenever I need to switch to Metro (which I hope is seldom).

Link to comment
Share on other sites

Does your script work? Or are you asking how to compile your script?

For compiling scripts I recommend downloading and using Scite4AutoIt3. Open your script and hit Ctrl+F7 to compile.

And welcome to the forum!

[center]Spiderskank Spiderskank[/center]GetOpt Parse command line options UDF | AU3Text Program internationalization UDF | Identicon visual hash UDF

Link to comment
Share on other sites

Thanks, created the script, and tested it. It does what I need it to do but it seems to stutter a bit. Playing with the sleep duration didn't seem to help. I compiled it as it is and it is working for me, later I will see about using an icon for it.

Link to comment
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
 Share

  • Recently Browsing   0 members

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