Jump to content
Sign in to follow this  
Hawkysoft

Detect what key is pressed

Recommended Posts

Hawkysoft

Ok, I've searched again my butt off on the web, and therefor asking it here....

I want to add custom hotkeys which a user can set themself to start applications

Since I done so much research about this, even on the forum I'm sure this question will be frowned upon.

However I don't need a continues check on input, just a single one and even better a combination of ones e.a. alt+1

Example

#include <GUIConstantsEx.au3>

Local $Button_1, $Button_2, $msg
GUICreate("Example") ;
$Button_1 = GUICtrlCreateButton("Run Notepad", 10, 30, 100)
GUISetState()
While 1
   $msg = GUIGetMsg()
   Select
      Case $msg = $GUI_EVENT_CLOSE
         ExitLoop
      Case $msg = $Button_1
         $HotkeyButton = "some way to detect what key is pressed...."
         HotKeySet ($HotkeyButton, "Notepad")
   EndSelect
WEnd

Func Notepad()
   Run(@WindowsDir & "\notepad.exe")
EndFunc
 
Edited by Hawkysoft

Share this post


Link to post
Share on other sites
FireFox

Hi,

This is what you're looking for : '?do=embed' frameborder='0' data-embedContent>>

No more questions on it or your topic will be locked.

Why? Too much related to keyloggers.

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
Hawkysoft

@FireFox, don't you got a hot-line? ;)

Thanks allot again, and I do understand your pov

Share this post


Link to post
Share on other sites
FireFox

My hot-line is on the forum ;)


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

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  

×