Autohotkey macros

From Axaptapedia
Jump to: navigation, search

AutoHotkey is a program for adding actions to system-wide hotkeys

Here is my ahk for axapta

 #InstallKeybdHook force
 SetTitleMatchMode,2
 #x::
   IfWinActive, Axapta 
   {
   WinGetClass, WinClass, Axapta
   if WinClass=AxaptaClientClassName 
   {
   	SendMessage,0x111,8960
   }
   }
 Exit
 
 ; Alt+C comment
 ~!c::
   IfWinActive, Axapta 
   {
   WinGetClass, WinClass, Axapta
   if WinClass=AxaptaClientClassName 
   {
       Send, {ALTDOWN}{vk4Dsc032}{ALTUP}{vk43sc02E}{ENTER}{vk43sc02E}   
   }
   }
 Exit
 
 ; Ctrl+Alt+C uncomment
 ~^!c::
   IfWinActive, Axapta 
   {
   WinGetClass, WinClass, Axapta
   if WinClass=AxaptaClientClassName 
   {
      Send, {ALTDOWN}m{ALTUP}c{ENTER}u 
   }
   }
 Exit
 ; Win+P Projects
 #p::
   IfWinActive, Axapta 
   {
   WinGetClass, WinClass, Axapta
   if WinClass=AxaptaClientClassName 
   {
   	SendMessage,0x111,281
   }
   }
 Exit
 ; Ctrl+F1 Developers Guide
 ~^F1::
   IfWinActive, Axapta 
   {
   WinGetClass, WinClass, Axapta
   if WinClass=AxaptaClientClassName 
   {
   	SendMessage,0x111,296
   }
   }
 ; Ctrl+Win+P New Project
 ^#p::
   IfWinActive, Axapta 
   {
   WinGetClass, WinClass, Axapta
   if WinClass=AxaptaClientClassName 
   {
   	SendMessage,0x111,281
 	Send, {DOWN}{DOWN}
         SendMessage,0x111,260
 	Send,{F2}
   }
   }
 Exit