Sign in to follow this  
Followers 0
Dedd

Basic script help

5 posts in this topic

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).

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks, as for whether the script will work or not I hope to find out. I am new to all of this.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Well good luck, have fun and when things go south, just let us know ;)

Edited by dany
1 person likes this

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

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