Jump to content
Sign in to follow this  
PDLayus

Use win key

Recommended Posts

PDLayus

Hi everyone,

Im writing a small script to create a new folder just by pressing win + n. The problem is when the script press win + n (#n), start menu opens.

Here is the code:

HotKeySet("#n", "create_folder")
Func create_folder()
    Send("{ALT down}")
    Send("{f}")
    Send("{w}")
    Send("{f}")
    Send("{ALT up}")
    Send("{BACKSPACE}")
EndFunc
sleep(50000)

Another problem is I want it to working as a service. But now it is *.exe file. Could you explain me how to create a service from *.exe file?

Thanks in advance.

PDLajus

Edited by PDLayus

Share this post


Link to post
Share on other sites
PsaltyDS

This works fine on Vista Busi 32bit:

HotKeySet("#n", "_WinN")
HotKeySet("{ESC}", "_Quit")

While 1
    Sleep(10)
WEnd

Func _WinN()
    ConsoleWrite("Win-n detected..." & @LF)
EndFunc

Func _Quit()
    Exit
EndFunc

What version of AutoIt on what version of Windows are you running?

Running as a service is covered in the FAQ.

:idea:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.