Advertisement
Guest User

Untitled

a guest
Apr 16th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv
  2. #SingleInstance force
  3. SendMode Input
  4.  
  5. global layoutUS = 0x00000409, layoutCZ = 0x00010405, layoutCZqwertz = 0x00000405, layoutCubiss = 0xa0000405, layoutNext = layoutUS
  6.  
  7. !F2::reload
  8.  
  9. !F3::suspend
  10.  
  11. ; application hotkeys
  12. !^M::
  13.     Run outlook.exe /recycle
  14.     return
  15.    
  16. !^N::
  17.   KeyWait, n
  18.   KeyWait, n, D T.3
  19.   If (!ErrorLevel)
  20.   {
  21.     Run "D:/doc/notepad.txt"
  22.   }
  23.   Else
  24.   {
  25.     Run notepad
  26.   }
  27.  
  28.   return
  29.    
  30. !^C::
  31.     Run chrome.py, D:\Desktop\Scripts\all
  32.     return
  33.    
  34. !^E::
  35.     Run EXCEL.EXE
  36.     return
  37.    
  38. !^G::
  39.     Run D:\app\GIMP\GIMPPortable.exe
  40.    
  41. !^P::
  42.     Run control
  43.     return
  44.  
  45. !^J::
  46.     Run explorer.exe D:\Downloads
  47.     return
  48.    
  49. !^T::
  50.     Run D:\app\ConEmu\ConEmuPortable.exe
  51.     return
  52.  
  53. !^I::
  54. Run isql.py
  55. return
  56.  
  57.    
  58.    
  59. ;REMAPPING
  60. ;shift + top row to always english
  61. +SC001::
  62.   Send ``
  63.   return
  64.  
  65. +SC002::
  66.   Send {!}
  67.   return
  68.  
  69. +SC003::
  70.   Send `@
  71.   return
  72.  
  73. +SC004::
  74.   Send {#}
  75.   return
  76.  
  77. +SC005::
  78.   Send `$
  79.   return
  80.  
  81. +SC006::
  82.   Send `%
  83.   return
  84.  
  85. +SC007::
  86.   Send {^}
  87.   return
  88.  
  89. +SC008::
  90.   Send `&
  91.   return
  92.  
  93. +SC009::
  94.   Send `*
  95.   return
  96.  
  97. +SC00A::
  98.   Send `(
  99.   return
  100.  
  101. +SC00B::
  102.   Send `)
  103.   return
  104.  
  105. +SC027::
  106.   Send `:
  107.   return
  108.  
  109. SC028::
  110.   Send `'
  111.   return
  112.    
  113.  
  114. !Shift::
  115.   SetDefaultKeyboard(layoutNext)
  116.   if (layoutNext == layoutUS)
  117.     layoutNext := layoutCubiss
  118.   else
  119.     layoutNext := layoutUS
  120.   return
  121.  
  122.  
  123. !+a::
  124.   SetDefaultKeyboard(layoutUS)
  125.   return
  126.  
  127. !+s::
  128.   SetDefaultKeyboard(layoutCubiss)
  129.   return
  130.  
  131. !+d::
  132.   SetDefaultKeyboard(layoutCZqwertz)
  133.   return
  134.  
  135. !+f::
  136.   SetDefaultKeyboard(layoutCZ)
  137.   return
  138.  
  139. SetDefaultKeyboard(LocaleID){
  140.     Static SPI_SETDEFAULTINPUTLANG := 0x005A, SPIF_SENDWININICHANGE := 2
  141.  
  142.     Lan := DllCall("LoadKeyboardLayout", "Str", Format("{:08x}", LocaleID), "Int", 0)
  143.     VarSetCapacity(binaryLocaleID, 4, 0)
  144.     NumPut(LocaleID, binaryLocaleID)
  145.     DllCall("SystemParametersInfo", "UInt", SPI_SETDEFAULTINPUTLANG, "UInt", 0, "UPtr", &binaryLocaleID, "UInt", SPIF_SENDWININICHANGE)
  146.    
  147.     WinGet, windows, List
  148.     Loop % windows {
  149.         PostMessage 0x50, 0, % Lan, , % "ahk_id " windows%A_Index%
  150.     }
  151. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement