Advertisement
Guest User

merge Script

a guest
Mar 24th, 2012
572
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.98 KB | None | 0 0
  1. ;;;;;;;;;;;; BEGIN SCRIPT 2
  2.  
  3. DetectHiddenWindows, On
  4. SetWinDelay, -1
  5. SetKeyDelay, -1
  6. SetBatchLines, -1
  7. GoSub Remin
  8. SetTimer, Remin, % 1000 * 60
  9.  
  10. Loop, read, %A_ScriptDir%\keywords.ini
  11. {
  12. LineNumber = %A_Index%
  13. Loop, parse, A_LoopReadLine, |
  14. {
  15. if (A_Index == 1)
  16. abbrevs%LineNumber% := A_LoopField
  17. else if (A_Index == 2)
  18. tips%LineNumber% := A_LoopField
  19. else if (A_Index == 3)
  20. programs%LineNumber% := A_LoopField
  21. else if (A_Index == 4)
  22. params%LineNumber% := A_LoopField
  23. }
  24. tosay := abbrevs%LineNumber%
  25. }
  26. cnt = %LineNumber%
  27.  
  28. Loop {
  29. Input, Key, L1 V, % "{LControl}{RControl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}"
  30. . "{AppsKey}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}"
  31. . "{Home}{End}{PgUp}{PgDn}{Del}{Ins}{BS}{Capslock}{Numlock}{PrintScreen}{Pause}{Escape}"
  32.  
  33. If( ( Asc(Key) >= 65 && Asc(Key) <= 90 ) || ( Asc(Key) >= 97 && Asc(Key) <= 122 ) )
  34. Word .= Key
  35. Else
  36. {
  37. Word := ""
  38. Continue
  39. }
  40. tipup := false
  41. Loop %cnt%
  42. {
  43.  
  44. if (Word == abbrevs%A_index%)
  45. {
  46. tip := tips%A_index%
  47. ToolTip %tip%
  48. tipup := true
  49. }
  50. else
  51. {
  52. if (tipup == false)
  53. ToolTip
  54. }
  55. }
  56. }
  57.  
  58. $Tab::
  59. Loop %cnt%
  60. {
  61. if (Word != "" && Word == abbrevs%A_index%)
  62. {
  63. Word := ""
  64.  
  65. StringLen, len, abbrevs%A_index%
  66. Loop %len%
  67. Send {Shift Down}{Left}
  68. Send {Shift Up}{BS}
  69.  
  70. ToolTip
  71. program := programs%A_index%
  72. param := params%A_index%
  73. run, %program% %param%
  74. return
  75. }
  76. }
  77. Word := ""
  78. Send {Tab}
  79. Return
  80.  
  81. ~LButton::
  82. ~MButton::
  83. ~RButton::
  84. ~XButton1::
  85. ~XButton2::
  86. Word := ""
  87. Tooltip
  88. Return
  89.  
  90. Remin:
  91.  
  92. WinMinimize, %A_ScriptFullPath% - AutoHotkey v
  93. WinHide, %A_ScriptFullPath% - AutoHotkey v
  94. Return
  95.  
  96. ;;;;;;;;;; END SCRIPT 2
  97.  
  98.  
  99. ;;;;;;;;;;;;;; BEGIN SCRIPT 1
  100.  
  101. ;This is a working script that creates a popup menu.
  102.  
  103. ; Create the popup menu by adding some items to it.
  104. Menu, MyMenu, Add, FIS 201, MenuHandler
  105. Menu, MyMenu, Add ; Add a separator line.
  106. Menu, MyMenu, Color, Lime, Single ;Define the Menu Color
  107.  
  108.  
  109. ; Create another menu destined to become a submenu of the above menu.
  110. Menu, Submenu1, Add, Item2, MenuHandler
  111. Menu, Submenu1, Add, Item3, MenuHandler
  112. Menu, Submenu1, Color, Yellow ;Define the Menu Color
  113.  
  114.  
  115. ; Create another menu destined to become a submenu of the above menu.
  116. Menu, Submenu2, Add, Item1a, MenuHandler
  117. Menu, Submenu2, Add, Item2a, MenuHandler
  118. Menu, Submenu2, Add, Item3a, MenuHandler
  119. Menu, Submenu2, Add, Item4a, MenuHandler
  120. Menu, Submenu2, Add, Item5a, MenuHandler
  121. Menu, Submenu2, Add, Item6a, MenuHandler
  122. Menu, Submenu2, Color, Aqua ;Define the Menu Color
  123.  
  124.  
  125. ; Create a submenu in the first menu (a right-arrow indicator). When the user selects it, the second menu is displayed.
  126. Menu, MyMenu, Add, BKRS 119, :Submenu1
  127. Menu, MyMenu, Add ; Add a separator line below the submenu.
  128. Menu, MyMenu, Add, BKRS 201, :Submenu2
  129. Menu, MyMenu, Add ; Add a separator line below the submenu.
  130.  
  131. Menu, MyMenu, Add ; Add a separator line below the submenu.
  132. Menu, MyMenu, Add, Google Search, Google ; Add another menu item beneath the submenu.
  133.  
  134. return ; End of script's auto-execute section.
  135.  
  136. Capslock & LButton::Menu, MyMenu, Show ; i.e. press the Win-Z hotkey to show the menu.
  137.  
  138. MenuHandler:
  139. MsgBox You selected %A_ThisMenuItem% from the menu %A_ThisMenu%.
  140. return
  141.  
  142. ;;;;;;;;;;;;;;;;;;;;;;;;
  143.  
  144. ;;;;;;;; Google Search
  145. ;;; FORMAT InputBox, OutputVar [, Title, Prompt, HIDE, Width, Height, X, Y, Font, Timeout, Default]
  146. Google:
  147. InputBox, SearchTerm, Google Search,,,350, 120
  148. if SearchTerm <> ""
  149. Run http://www.google.de/search?sclient=psy-ab&hl=de&site=&source=hp&q=%SearchTerm%&btnG=Suche
  150.  
  151. return
  152.  
  153.  
  154.  
  155. ; Make Window Transparent
  156. #Space::WinSet, Transparent, 125, A
  157. ^!Space UP::WinSet, Transparent, OFF, A
  158. return
  159.  
  160. ;;;;;;;;;;;; END SCRIPT 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement