Jump to content

Use win key


Recommended Posts

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

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