This is explained at the very beginning of the help file. It's actually the first topic. You should read it for it will be you're guide in understanding AHK and programing in general.
Read topic
Basic Usage and Syntax -> Hotkeys.
The most basic way to do what you want is:
Code: Select all
#NoEnv
#Persistent
!1::Run "C:\WINDOWS\hh.exe" C:\Program Files\AutoHotkey\AutoHotkey.chm
!2::Run Iexplore.exe
!3::Run cmd /k Ipconfig /all
!4::Run explorer shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{00000000-0000-0000-0000-123456749822}
!5::Send {Rwin down}{d down}{Rwin up}{d up}
!6::ExitApp
or
Code: Select all
#NoEnv
#Persistent
SetWorkingDir %A_ScriptDir%
LAlt::
Keywait, 1, D ;Wait forever for key 1 to be pressed down.
If errorlevel = 0 ;Errorlevel is set to zero the moment key 1 is down.
Keywait, 2, D
If errorlevel = 0
Keywait, LAlt ;Wait forever for the alt key to be released.
If errorlevel = 0 ;On release errorlevel = 0
FileAppend, Many ways to achieve the same goals`, Consult the help file!, %A_ScriptDir%\SomeFile.txt
Run Notepad %A_ScriptDir%\SomeFile.txt
exitapp
ps: code is not tested