Advertisement
Guest User

Cerebro Script

a guest
Oct 4th, 2016
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;
  2. ; AutoHotkey Version: 1.x
  3. ; Language:       English
  4. ; Platform:       Win9x/NT
  5. ; Author:         A.N.Other <myemail@nowhere.com>
  6. ;
  7. ; Script Function:
  8. ;   Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
  9. ;
  10.  
  11. #SingleInstance
  12. #Persistent
  13.  
  14.  
  15.  
  16.  
  17. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  18. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  19. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  20.  
  21.  
  22.  
  23.  
  24. !d::
  25. IfWinExist ahk_class Chrome_WidgetWin_1
  26. {
  27.     WinActivateBottom ahk_class Chrome_WidgetWin_1
  28. }
  29. Else
  30. {
  31.   Run C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
  32.   WinActivateBottom ahk_class Chrome_WidgetWin_1
  33. }
  34. Return
  35.  
  36. F5::^+F10
  37. return
  38.  
  39. RShift::
  40.  
  41. !t::
  42.  
  43.  
  44. ;~ Music! itunes playlists
  45.  
  46. #F2::
  47. Run, E:\random videos\Screensaver Videos\Relax.mp4
  48. sleep, 100
  49. WinActivateBottom, Relax.mp4 - VLC media player ahk_class QWidget
  50. sleep, 100
  51. Send, {LWin down}{å}{LWin up}
  52. sleep, 100
  53. Run, C:\Program Files (x86)\iTunes\Scripts\PlayPlaylist_Chillax.vbs
  54. MouseMove, 1919, 0
  55.  
  56.  
  57.  
  58. return
  59.  
  60. #F3::
  61. Run, C:\Program Files (x86)\iTunes\Scripts\PlayPlaylist_Ka$h.vbs
  62. return
  63.  
  64.  
  65. #F4::
  66. Run, C:\Program Files (x86)\iTunes\Scripts\PlayPlaylist_!StillChill.vbs
  67. return
  68.  
  69.  
  70.  
  71. #F5::
  72. Run, C:\Program Files (x86)\iTunes\Scripts\Awesome.vbs
  73. return
  74.  
  75.  
  76. #F6::
  77. Run, C:\Program Files (x86)\iTunes\Scripts\PlayPlaylist_!StillChill.vbs
  78. ;~ return
  79.  
  80. #F7::
  81. Run, C:\Program Files (x86)\iTunes\Scripts\PlayPlaylist_!StillChill.vbs
  82. return
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90. ^!z::
  91. Run C:\Program Files\Process Hacker 2\ProcessHacker.exe
  92. return
  93.  
  94. !å::
  95.  
  96. #NoEnv
  97. ;#NoTrayIcon
  98. #SingleInstance Force
  99.  
  100. CoordMode, Mouse, Screen
  101.  
  102. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  103.  
  104.  
  105. ShowFull := False
  106. TooltipSpyActive := True
  107. SetTimer, TooltipSpy, 30
  108. Return
  109.  
  110. #If TooltipSpyActive
  111.     a::Clipboard := MousePosScreenX ", " MousePosScreenY
  112.     b::Clipboard := MousePosWinX ", " MousePosWinY
  113.     c::Clipboard := ColorHex
  114.     d::Clipboard := "R=" ColorRed ", G=" ColorGreen ", B=" ColorBlue
  115.     e::Clipboard := WinX ", " WinY
  116.     f::Clipboard := WinH " x " WinW
  117.     g::Clipboard := WinTitle
  118.     r::Clipboard := WinClass
  119.     s::Clipboard := WinID
  120.     t::Clipboard := WinCount
  121.     v::Clipboard := ControlClassNN
  122.     w::Clipboard := ControlHwnd
  123.     x::Clipboard := ControlHybrid
  124.     z::Clipboard := ControlHwndDll
  125.     LAlt::Clipboard := MouseInfo WinInfo ControlInfo ;copy everything
  126.     Tab::ShowFull := ShowFull ? False : True ;Toggle between full and truncated
  127.     Esc::TooltipSpyActive := False
  128. #If
  129.            
  130. TooltipSpy:
  131.     ;Cooperatively stop TooltipSpy (otherwise you get the residual unclosed tooltip problem)
  132.     If Not TooltipSpyActive
  133.     {
  134.         SetTimer, TooltipSpy, Off
  135.         ToolTip ;remove tooltip
  136.         Return
  137.     }
  138.  
  139.     TextLen := ShowFull ? 100: 15 ;Truncate strings so that tooltip to prevent oversized tooltips.
  140.  
  141.     ;Mouse pointer info
  142.     CoordMode, Mouse, Screen
  143.     MouseGetPos, MousePosScreenX, MousePosScreenY, WinID
  144.     If (PriorX = MousePosScreenX And PriorY = MousePosScreenY And PriorShowFull = ShowFull)
  145.         Return
  146.    
  147.     ;More mouse pointer info
  148.     CoordMode, Mouse, Window
  149.     MouseGetPos, MousePosWinX, MousePosWinY
  150.     MouseInfo := "MOUSE`n"
  151.     MouseInfo .= "  (a) Screen (x, y):`t" MousePosScreenX ", " MousePosScreenY "`n"
  152.     MouseInfo .= "  (b) Win. (x, y):`t" MousePosWinX ", " MousePosWinY "`n"
  153.    
  154.     ;Colour under mouse
  155.     CoordMode Pixel, Screen
  156.     PixelGetColor, ColorHex, %MousePosScreenX%, %MousePosScreenY%, RGB
  157.     ColorRed := (ColorHex & 0xFF0000) >> 16
  158.     ColorGreen := (ColorHex & 0x00FF00) >> 8
  159.     ColorBlue := ColorHex & 0x0000FF
  160.     MouseInfo .= "  (c) RGB Hex:`t" ColorHex "`n"
  161.     MouseInfo .= "  (d) RGB Dec:`t" ColorRed ", " ColorGreen ", " ColorBlue "`n"
  162.  
  163.     ;Don't update window info if window is tooltip
  164.     WinGetClass, WinClass, ahk_id %WinID%
  165.     If (WinClass != "tooltips_class32")
  166.     {
  167.         ;Window info
  168.         WinGetPos, WinX, WinY, WinW, WinH, ahk_id %WinID%
  169.         WinGetTitle, WinTitle, ahk_id %WinID%
  170.         WinGet, WinCount, Count, ahk_class %WinClass%
  171.         WinInfo := "WINDOW`n"
  172.         WinInfo .= "  (e) X, Y:`t`t" WinX ", " WinY "`n"
  173.         WinInfo .= "  (f) H x W:`t" WinH " x " WinW "`n"
  174.         WinInfo .= "  (g) Title:`t" SubStr(WinTitle, 1, TextLen) "`n"
  175.         WinInfo .= "  (r) Class:`t" SubStr(WinClass, 1, TextLen) "`n"
  176.         WinInfo .= "  (s) ID:`t`t" SubStr(WinID, 1, TextLen) "`n"
  177.         WinInfo .= "  (t) Count:`t" SubStr(WinCount, 1, TextLen) "`n" ;number of windows of this class
  178.  
  179.         ;GUI control info
  180.         SetFormat, IntegerFast, hex
  181.         MouseGetPos, m_x, m_y
  182.         MouseGetPos,,,, ControlClassNN, 1
  183.         MouseGetPos,,,, ControlHwnd, 2
  184.         MouseGetPos,,,, ControlHybrid, 3 ;This value is always equal to ControlClass4, but some times it is not retrieved, whereas ControlClass4 always gets correctly retrieved.
  185.         ControlHwndDll := DllCall("WindowFromPoint", "int64", (m_y << 32) | (m_x & 0xFFFFFFFF), "Ptr")
  186.  
  187.         ControlInfo := "CONTROL`n"
  188.         ControlInfo .= "  (v) ClassNN:`t" SubStr(ControlClassNN, 1, TextLen) "`n"
  189.         ControlInfo .= "  (w) HWND:`t" SubStr(ControlHwnd, 1, TextLen) "`n"
  190.         ControlInfo .= "  (x) Hybrid:`t" SubStr(ControlHybrid, 1, TextLen) "`n"
  191.         ControlInfo .= "  (z) HWND_DLL:`t" SubStr(ControlHwndDll, 1, TextLen) "`n"
  192.     }
  193.  
  194.     TooltipHeader = Esc = Exit`nAlt = Copy everything`nTab = Toggle full/short view`n
  195.     Separator = --------------------------------------`n
  196.                
  197.     ToolTip %MouseInfo%%Separator%%WinInfo%%Separator%%ControlInfo%%Separator%%TooltipHeader%
  198.     PriorX := MousePosScreenX, PriorY := MousePosScreenY, PriorShowFull := ShowFull
  199. Return
  200.  
  201.  
  202.  
  203. $F10::
  204. IfWinActive ahk_class SunAwtFrame
  205. {
  206.     Send {F10}
  207. }
  208. else
  209. {
  210. Send ^{F10}
  211. }
  212. Return
  213.  
  214.  
  215.  
  216.  
  217. $^s::Send, ^s
  218. $^d::Send, ^d
  219. $^t::Send, ^t
  220.  
  221. #IfWinActive ahk_class Chrome_WidgetWin_1
  222. ^s::Send, ^l
  223. ^d::Send, ^+p ^l
  224. ^t::Send, ^t ^+p
  225.  
  226. Return
  227.  
  228.  
  229.  
  230. #'::send, ~~
  231. return
  232.  
  233. ;409 514 620
  234.  
  235. ;stfuMacro
  236. #5::
  237. WinActivateBottom, ahk_class #32770
  238. MouseClick, left, 514, 286
  239. WinActivateBottom, ahk_class EsoClientWndClass
  240. MouseMove, 960, 540
  241. return
  242.  
  243. /*comment in here:
  244. #610
  245. #510
  246.  
  247. */
  248.  
  249. Capslock::
  250. IfWinActive ahk_class Chrome_WidgetWin_1
  251. {
  252. Send, ^t
  253. }
  254. IfWinExist ahk_class Chrome_WidgetWin_1
  255. {  
  256.     WinActivateBottom, ahk_class Chrome_WidgetWin_1
  257. }
  258. else
  259. {
  260. Run C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
  261. }
  262. return
  263.  
  264. #InstallMouseHook
  265. ~Shift & WheelUp::
  266.   ; Scroll left.
  267. ControlGetFocus, fcontrol, A
  268. Loop 2  ; <-- Increase this value to scroll faster.
  269.     SendMessage, 0x114, 0, 0, %fcontrol%, A  ; 0x114 is WM_HSCROLL and the 0 after it is SB_LINELEFT.
  270. IfWinActive, ahk_class AcrobatSDIWindow
  271. Send {left}{left}
  272. return
  273.  
  274. ~Shift & WheelDown::  ; Scroll right.
  275. ControlGetFocus, fcontrol, A
  276. Loop 2  ; <-- Increase this value to scroll faster.
  277.     SendMessage, 0x114, 1, 0, %fcontrol%, A  ; 0x114 is WM_HSCROLL and the 1 after it is SB_LINERIGHT.
  278. IfWinActive, ahk_class AcrobatSDIWindow
  279. Send {right}{right}
  280. return
  281.  
  282.  
  283. !j::
  284. Run, C:\Program Files (x86)\spacesniffer\SpaceSniffer.exe
  285. return
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293. !m::
  294. Run, C:\Program Files (x86)\volume mixer shortcut\Volume Mixer.lnk
  295. return
  296.  
  297. #8::
  298. Run, E:\random videos\Screensaver Videos\Relax.mp4
  299. sleep, 100
  300. WinActivateBottom, Relax.mp4 - VLC media player ahk_class QWidget
  301. sleep, 100
  302. Send, {Down}
  303. Send, {Down}
  304. Send, {Down}
  305. Send, {Down}
  306. sleep, 100
  307.  
  308. return
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315. !n::
  316. Run, C:\Program Files (x86)\Iobit\IObit Uninstaller\Uninstaler_SkipUac.exe
  317. return
  318.  
  319.  
  320. return
  321.  
  322. ^!c::
  323. Run C:\Program Files (x86)\Orzeszek Timer\Orzeszek Timer.exe - Coffe Time.lnk
  324. sleep, 1000
  325. IfWinExist, ahk_class HwndWrapper[Orzeszek Timer.exe;;98ffefea-462b-4069-b50f-b7cd8048bd3f]
  326. WinActivateBottom, ahk_class HwndWrapper[Orzeszek Timer.exe;;98ffefea-462b-4069-b50f-b7cd8048bd3f]
  327. sleep, 100
  328. send, {Enter}
  329. return
  330.  
  331.  
  332.  
  333. #esc::
  334. WinGetTitle, Title, A
  335. WinKill, %Title%
  336. return
  337.  
  338.  
  339.  
  340.  
  341. #9::
  342. send, {LWin down}{<}{LWin up}
  343. return
  344.  
  345. #IfWinActive ahk_class ConsoleWindowClass
  346. ^V::
  347. SendInput {Raw}%clipboard%
  348. return
  349. #IfWinActive
  350.  
  351. !w::
  352. send, {LAlt down}{Space}{LAlt up}
  353. sleep, 50
  354. send, {BackSpace}
  355. sleep, 50
  356. send,{g}
  357. sleep, 50
  358. send,{s}
  359. sleep, 50
  360. send,{TAB}
  361. sleep, 10
  362. return
  363.  
  364. !q::
  365. send, {LAlt down}{Space}{LAlt up}
  366. sleep, 50
  367. send, {BackSpace}
  368. sleep, 50
  369. send,{y}
  370. sleep, 50
  371. send,{t}
  372. sleep, 50
  373. send,{TAB}
  374. sleep, 10
  375. return
  376.  
  377.  
  378. #WheelDown::send, {F7}
  379. return
  380.  
  381. #Wheelup::send, {F8}
  382. return
  383.  
  384.  
  385.  
  386.  
  387.  
  388. IfWinExist, ahk_class NUIDialog
  389. winkill, ahk_class NUIDialog
  390. return
  391.  
  392.  
  393. IfWinExist, ahk_class #32770
  394. WinActivateBottom, #32770
  395. sleep, 100
  396. send, {Enter}
  397. return
  398.  
  399.  
  400.  
  401.  
  402. ^!r::
  403. sleep 100
  404. reload, C:\Users\Dumpling\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Programming.ahk
  405. sleep,1000
  406. reload, C:\Users\Dumpling\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup/Dumpling Script.ahk
  407.  
  408.  
  409. return
  410.  
  411. !UP::
  412. send, !5
  413. return
  414.  
  415.  
  416.  
  417. ^+m::
  418. IfWinExist EPOC Control Panel 2.0.0.20 ahk_class QWidget
  419. {
  420. ControlSend,, ^+m,EPOC Control Panel 2.0.0.20
  421. }  
  422. return
  423.  
  424. !2::
  425. IfWinExist ahk_class Framework::CFrame
  426. {
  427.     WinActivateBottom, ahk_class Framework::CFrame
  428. }
  429. Else
  430. {
  431.   Run C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2013\OneNote 2013.lnk
  432. }
  433. return
  434.  
  435. #!2::
  436. Run C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2013\OneNote 2013.lnk
  437. return
  438.  
  439. SystemCursor("Init")
  440.  
  441. SetTimer, CheckIdle, 250
  442. return
  443.  
  444. CheckIdle:
  445. TimeIdle := A_TimeIdlePhysical // 1000
  446. if TimeIdle >= 15
  447. {
  448.     SystemCursor("Off")
  449. }
  450. else
  451. {
  452.     SystemCursor("On") 
  453. }
  454. return
  455.  
  456. #<::
  457. send, #{insert}
  458. return
  459.  
  460.  
  461. #Persistent
  462. OnExit, ShowCursor  ; Ensure the cursor is made visible when the script exits.
  463. return
  464.  
  465. ShowCursor:
  466. SystemCursor("On")
  467. ExitApp
  468.  
  469. SystemCursor(OnOff=1)   ; INIT = "I","Init"; OFF = 0,"Off"; TOGGLE = -1,"T","Toggle"; ON = others
  470. {
  471.     static AndMask, XorMask, $, h_cursor
  472.         ,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13 ; system cursors
  473.         , b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13   ; blank cursors
  474.         , h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13   ; handles of default cursors
  475.     if (OnOff = "Init" or OnOff = "I" or $ = "")       ; init when requested or at first call
  476.     {
  477.         $ = h                                          ; active default cursors
  478.         VarSetCapacity( h_cursor,4444, 1 )
  479.         VarSetCapacity( AndMask, 32*4, 0xFF )
  480.         VarSetCapacity( XorMask, 32*4, 0 )
  481.         system_cursors = 32512,32513,32514,32515,32516,32642,32643,32644,32645,32646,32648,32649,32650
  482.         StringSplit c, system_cursors, `,
  483.         Loop %c0%
  484.         {
  485.             h_cursor   := DllCall( "LoadCursor", "uint",0, "uint",c%A_Index% )
  486.             h%A_Index% := DllCall( "CopyImage",  "uint",h_cursor, "uint",2, "int",0, "int",0, "uint",0 )
  487.             b%A_Index% := DllCall("CreateCursor","uint",0, "int",0, "int",0
  488.                 , "int",32, "int",32, "uint",&AndMask, "uint",&XorMask )
  489.         }
  490.     }
  491.     if (OnOff = 0 or OnOff = "Off" or $ = "h" and (OnOff < 0 or OnOff = "Toggle" or OnOff = "T"))
  492.         $ = b  ; use blank cursors
  493.     else
  494.         $ = h  ; use the saved cursors
  495.  
  496.     Loop %c0%
  497.     {
  498.         h_cursor := DllCall( "CopyImage", "uint",%$%%A_Index%, "uint",2, "int",0, "int",0, "uint",0 )
  499.         DllCall( "SetSystemCursor", "uint",h_cursor, "uint",c%A_Index% )
  500.     }
  501. }
  502.  
  503.  
  504.  
  505. !u::
  506. process,close,XBMC.exe
  507. return
  508.  
  509.  
  510.  
  511. !i::
  512. process,close,python.exe
  513. return
  514.  
  515. ;~ !i::
  516. ;~ process,close,SnapDo.exe
  517. ;~ process,close,iTunes.exe
  518. ;~ process,close,Skype.exe
  519. ;~ process,close,Dropbox.exe
  520. ;~ process,close,AvastSvc.exe
  521. ;~ process,close,JustGestures.exe
  522. ;~ process,close,Switcher.exe
  523. ;~ process,close,Rainlender2.exe
  524. ;~ process,close,Launchy.exe
  525. ;~ process,close,ObjectDock.exe
  526. ;~ process,close,CurseClient.exe
  527. ;~ process,close,xwidget.exe
  528. ;~ process,close,Rainmeter.exe
  529. ;~ process,close,EvernoteClipper.exe
  530. ;~ process,close,WinVnc.exe
  531. ;~ process,close,Vsee.exe
  532. ;~ return
  533.  
  534.  
  535.  
  536.  
  537.  
  538. !+<::send ^+{ESC}
  539. return
  540.  
  541.  
  542.  
  543.  
  544.  
  545. ^UP::^+:
  546. ^DOWN::^+;
  547.  
  548.  
  549.  
  550.  
  551.  
  552. !4::
  553. Run C:\Program Files (x86)\XBMC\XBMC.exe
  554. return
  555.  
  556. !a::
  557.  
  558. IfWinExist ahk_class Mendeley Desktop
  559. {
  560.     WinActivateBottom ahk_class Mendeley Desktop
  561. }
  562. Else
  563. {
  564.   Run C:\Program Files (x86)\Mendeley Desktop\MendeleyDesktop.exe
  565. }
  566. Return
  567.  
  568.  
  569.  
  570.  
  571.  
  572. ^7::
  573. send, {\}
  574. return
  575.    
  576.  
  577.  
  578.  
  579.  
  580. !^q::
  581. IfWinExist ahk_class ApolloRuntimeContentWindow
  582. {
  583.     WinActivateBottom, ahk_class ApolloRuntimeContentWindow
  584. }
  585. Else
  586. {
  587.     Run C:\Program Files (x86)\ReadCube\ReadCube.exe
  588. sleep, 1000
  589. }
  590. return
  591.  
  592.  
  593. !0::
  594. Loop,1
  595. {
  596. IfWinExist iTunes ahk_class iTunes
  597. {
  598.     WinActivateBottom, iTunes ahk_class iTunes
  599. }
  600. Else
  601. {
  602.     Run C:\Program Files (x86)\iTunes\iTunes.exe
  603. sleep, 5000
  604. }
  605. sleep, 500
  606.  
  607. WinWaitActive, iTunes ahk_class iTunes
  608.  
  609. sleep, 1000
  610. WinActivateBottom, iTunes ahk_class iTunes
  611. sleep, 1000
  612. Send, {LWin down}{Right}{LWin up}
  613. sleep, 500
  614. Click, left, 37, 545
  615. sleep, 500
  616. Click, left, 393, 148
  617. sleep, 500
  618. send, {WheelUp}
  619. Click, left, 393, 148
  620. Click, left, 393, 148
  621.  
  622. IfWinExist ahk_class MozillaWindowClass
  623. {
  624.     WinActivateBottom, ahk_class MozillaWindowClass
  625. }
  626. Else
  627. {
  628.   Run C:\Program Files (x86)\Mozilla Firefox\firefox.exe
  629. }
  630.  
  631. WinWaitActive, ahk_class MozillaWindowClass
  632.  
  633. Send, {LWin down}{Left}{LWin up}
  634. sleep, 500
  635.  
  636. IfWinExist iTunes ahk_class iTunes
  637. {
  638.     WinActivateBottom, iTunes ahk_class iTunes
  639. }
  640. Else
  641. {
  642.     Run C:\Program Files (x86)\iTunes\iTunes.exe
  643. }
  644. Send, {LWin down}{down}{down}{LWin up}
  645. sleep,500
  646.  
  647. IfWinExist ahk_class MozillaWindowClass
  648. {
  649.     WinActivateBottom, ahk_class MozillaWindowClass
  650. }
  651. Else
  652. {
  653.   Run C:\Program Files (x86)\Mozilla Firefox\firefox.exe
  654. }
  655.  
  656. WinWaitActive, ahk_class MozillaWindowClass
  657.  
  658. Send, {LWin down}{up}{LWin up}
  659. sleep,50
  660. Send, {LWin down}{down}{LWin up}
  661. sleep,50
  662.  
  663. Send, {Ctrl down}{d}{Ctrl up}
  664. sleep,50
  665. Send, {Ctrl down}{s}{Ctrl up}
  666. sleep,50
  667. }
  668. return
  669.  
  670. #½::
  671. IfWinExist ahk_class SunAwtFrame
  672. {
  673.     WinActivate
  674. }
  675. else
  676. {
  677.     Run C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2016.2.3\bin\pycharm.exe.lnk
  678.     WinActivate
  679. }
  680. return
  681.  
  682.  
  683.  
  684. <^>!#½::
  685. IfWinExist ahk_class SunAwtFrame
  686. {
  687.     WinActivate
  688. }
  689. else
  690. {
  691.     Run C:\Program Files (x86)\JetBrains\PyCharm Community Edition 5.0.4\bin\pycharms.exe
  692.     WinActivate
  693. }
  694. return
  695.  
  696.  
  697. <^>!#1::
  698. IfWinExist Untitled - Notepad
  699. {
  700.     WinActivate
  701. }
  702. else
  703. {
  704.     Run Notepad
  705.     WinWait Untitled - Notepad
  706.     WinActivate
  707. }
  708. return
  709.  
  710. !1::
  711. IfWinExist RStudio
  712.  
  713. {
  714.     WinActivateBottom, RStudio
  715.  
  716. }
  717. Else
  718. {
  719. SetWorkingDir, C:\R
  720. Run  C:\R\RStudio\bin\rstudio.exe
  721.  
  722. Run, C:\Users\Dumpling\Documents\AutoHotkey\Gdi.ahk
  723. sleep, 2000
  724.  
  725. fullScriptPath = C:\Users\Dumpling\Documents\AutoHotkey\Gdi.ahk  ; edit with your full script path
  726.  
  727. DetectHiddenWindows, On
  728. WinClose, %fullScriptPath% ahk_class AutoHotkey
  729.  
  730. }
  731. Return
  732.  
  733. <^>!#3::
  734. IfWinExist Spyder (Python 2.7) ahk_class QWidget
  735. {
  736.     WinActivate
  737. }
  738. else
  739. {
  740.     Run C:\Anaconda\pythonw.exe "C:\Anaconda\Scripts/spyder-script.py"
  741. WinActivate
  742. }
  743. return
  744.  
  745.  
  746. <^>!#4::
  747. sleep, 500
  748. send, {LWin}
  749. sleep, 50
  750. send, {p}
  751. sleep, 50
  752. send, {s}
  753. sleep, 50
  754. send, {y}
  755. sleep, 50
  756. send, {ENTER}
  757. sleep, 50
  758. Return
  759.  
  760. <^>!#5::
  761. IfWinExist Python 2.7.6 Shell ahk_class TkTopLevel
  762. {
  763.     WinActivate
  764. }
  765. else
  766. {
  767.     Run C:\Python27\Lib\idlelib\idle.bat
  768.     WinActivate
  769. }
  770.  
  771. return
  772.  
  773.  
  774. <^>!#6::
  775. IfWinExist Python 3.3.2 Shellahk_class TkTopLevel
  776. {
  777.     WinActivate
  778. }
  779. else
  780. {
  781.     Run C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Python 3.4\IDLE (Python GUI).lnk
  782.     WinActivate
  783. }
  784.  
  785. return
  786.  
  787.  
  788. <^>!#7::
  789. IfWinExist ahk_class Notepad++
  790. {
  791.     WinActivate
  792. }
  793. else
  794. {
  795.     Run C:\Program Files (x86)\Notepad++\notepad++.exe
  796.     WinActivate
  797. }
  798. return
  799.  
  800.  
  801. #+::
  802. send, {LWin down}{Lalt down}{*}{LWin up}{Lalt up}
  803. return
  804.  
  805.  
  806.  
  807.  
  808. !k::
  809. Runwait, taskkill /im firefox.exe
  810. return
  811.  
  812. ^<::
  813. Send {PrintScreen}
  814. return
  815.  
  816. ^e::^!+j
  817. return
  818.  
  819.  
  820.  
  821.  
  822. !^w::
  823. Run C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2013\word 2013
  824. return
  825.  
  826. !s::
  827. IfWinExist iTunes ahk_class iTunes
  828. {
  829.    
  830.     WinActivateBottom, iTunes ahk_class iTunes
  831.     Process, Exist, itc.exe
  832.     itc_pid=%errorLevel%
  833. If (itc_pid = 0)
  834.     Run C:\Program Files (x86)\iTunesControl\itc.exe
  835.  
  836.    
  837.  
  838. }
  839. Else
  840. {
  841.     Run C:\Program Files\iTunes\iTunes.exe
  842.     Process, Exist, itc.exe
  843.     itc_pid=%errorLevel%
  844. If (itc_pid = 0)
  845.     Run C:\Program Files (x86)\iTunesControl\itc.exe
  846.  
  847.    
  848. }
  849.  
  850. Return
  851.  
  852.  
  853.  
  854.  
  855.  
  856. ^!g::
  857. Winmaximize,A
  858. return
  859.  
  860.  
  861.  
  862. !½:: send, Timokvamme@gmail.com
  863.  
  864.  
  865.  
  866.  
  867. !e::
  868. IfWinExist ahk_class µTorrent4823DF041B09
  869. {
  870.     WinActivateBottom, ahk_class µTorrent4823DF041B09
  871.    
  872. }
  873. Else
  874. {
  875.   Run C:\Program Files (x86)\uTorrent\uTorrent.exe
  876.   Run C:\Users\Dumpling\Documents\AutoHotkey\UtorrentScript.ahk
  877. }
  878. Return
  879.  
  880.  
  881. pathToScript = C:\Users\Dumpling\Documents\AutoHotkey\UtorrentScript.ahk
  882.  
  883. DetectHiddenWindows, On
  884.  
  885.  
  886.  
  887.  
  888. !r::
  889. Runwait, taskkill /im utorrent.exe /f
  890.  
  891. WinClose, %pathToScript% ahk_class AutoHotkey
  892.  
  893.  
  894. return
  895.  
  896.  
  897.  
  898. !h::
  899. Edit C:\Users\Dumpling\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Dumpling Hotkeys.ahk
  900. return
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907. !Del::
  908. Shutdown, Code 1
  909.  
  910.  
  911.  
  912. !æ::
  913. process,close,Bigmouse.exe
  914. return
  915.  
  916.  
  917.  
  918.  
  919.  
  920. !f::
  921. Run C:\Users\timok_000\Dropbox\EFABM-AAA
  922. return
  923.  
  924.  
  925. <^>!#f::
  926. Run, https://play.google.com/books/reader?printsec=frontcover&output=reader&id=Q9GCAgAAQBAJ
  927. return
  928.  
  929.  
  930. Alt & LButton::
  931. CoordMode, Mouse  ; Switch to screen/absolute coordinates.
  932. MouseGetPos, EWD_MouseStartX, EWD_MouseStartY, EWD_MouseWin
  933. WinGetPos, EWD_OriginalPosX, EWD_OriginalPosY,,, ahk_id %EWD_MouseWin%
  934. WinGet, EWD_WinState, MinMax, ahk_id %EWD_MouseWin%
  935. if EWD_WinState = 0  ; Only if the window isn't maximized
  936.     SetTimer, EWD_WatchMouse, 10 ; Track the mouse as the user drags it.
  937. return
  938.  
  939. EWD_WatchMouse:
  940. GetKeyState, EWD_LButtonState, LButton, P
  941. if EWD_LButtonState = U  ; Button has been released, so drag is complete.
  942. {
  943.     SetTimer, EWD_WatchMouse, off
  944.     return
  945. }
  946. GetKeyState, EWD_EscapeState, Escape, P
  947. if EWD_EscapeState = D  ; Escape has been pressed, so drag is cancelled.
  948. {
  949.     SetTimer, EWD_WatchMouse, off
  950.     WinMove, ahk_id %EWD_MouseWin%,, %EWD_OriginalPosX%, %EWD_OriginalPosY%
  951.     return
  952. }
  953. ; Otherwise, reposition the window to match the change in mouse coordinates
  954. ; caused by the user having dragged the mouse:
  955. CoordMode, Mouse
  956. MouseGetPos, EWD_MouseX, EWD_MouseY
  957. WinGetPos, EWD_WinX, EWD_WinY,,, ahk_id %EWD_MouseWin%
  958. SetWinDelay, -1   ; Makes the below move faster/smoother.
  959. WinMove, ahk_id %EWD_MouseWin%,, EWD_WinX + EWD_MouseX - EWD_MouseStartX, EWD_WinY + EWD_MouseY - EWD_MouseStartY
  960. EWD_MouseStartX := EWD_MouseX  ; Update for the next timer-call to this subroutine.
  961. EWD_MouseStartY := EWD_MouseY
  962. return    
  963.    
  964.  
  965. !z::
  966. {
  967. Sleep 50
  968. Send, ^c
  969. Sleep 50
  970. Send, ^c
  971. Run, http://www.google.com/search?q=%clipboard%
  972. Return
  973. }
  974.  
  975. ^!c::
  976.  
  977. {
  978.  
  979. Run, cmd.exe, C:\
  980.  
  981. return
  982. }
  983.  
  984.  
  985. !v::
  986. {
  987. Send, ^c
  988. Sleep 50
  989. Run, http://www.google.com/search?q=%clipboard%&tbm=isch
  990. Return
  991. }
  992.  
  993. !x::
  994. {
  995. Send, ^c
  996. Sleep 50
  997. Run, http://www.youtube.com/results?search_query=%clipboard%
  998. Return
  999. }
  1000.  
  1001.  
  1002. #a::
  1003. SendInput, {(}{)}{Left}
  1004. return
  1005.  
  1006. #d::
  1007. ;Send, {[}{]}{Left}
  1008. return
  1009.  
  1010.  
  1011. #s::
  1012. Send, {'}{'}{Left}
  1013. return
  1014.  
  1015.  
  1016. #w::
  1017. Send, {{}{}}{Left}
  1018. return
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025. #q::
  1026. Send, ^c
  1027. IfWinExist ahk_class wxWindowClassNR
  1028. {
  1029.     WinActivateBottom, ahk_class wxWindowClassNR
  1030. Send, {F3}
  1031. sleep, 2000 ;
  1032. Send, ^v
  1033. Send, {F9}
  1034. Send, {Enter}
  1035. Send, {Backspace}
  1036. Send, {F9}
  1037. }
  1038. Else
  1039. {
  1040.   Run C:\Program Files (x86)\Gyldendals Røde Ordbøger by iMortaluz/Gyldendals Ordbøger by iMortaluz.exe
  1041. sleep, 2000 ;
  1042. Send, {F9}
  1043. Send, {F3}
  1044. Send, ^v
  1045. Send, {Enter}
  1046. Send, {Backspace}
  1047. Send, {F9}
  1048. }
  1049.  
  1050. Return
  1051.  
  1052.  
  1053.  
  1054.  
  1055. ^CapsLock::
  1056. IfWinExist ahk_class TfrmArticleSpinner Song Search ahk_class iTC_SongSearch
  1057. {
  1058.     WinClose
  1059. }
  1060. Else
  1061. send, ^å
  1062. return
  1063.  
  1064. ;~ resizing windows resize
  1065.  
  1066.  
  1067. ResizeWin(Width = 0,Height = 0)
  1068. {
  1069.   WinGetPos,X,Y,W,H,A
  1070.   If %Width% = 0
  1071.     Width := W
  1072.    
  1073.   If %Height% = 0
  1074.     Height := H
  1075.  
  1076.   WinMove,A,,%X%,%Y%,%Width%,%Height%
  1077.    
  1078. }
  1079.  
  1080. ResizeWin_atzeropos(Width = 0,Height = 0)
  1081. {
  1082.   WinGetActiveTitle, Title
  1083.   WinGetPos,X,Y,W,H,A
  1084.   WinMinimize
  1085.  
  1086.   If %Width% = 0
  1087.     Width := W
  1088.  
  1089.    
  1090.   If %Height% = 0
  1091.     Height := H
  1092.  
  1093.  
  1094.   WinMove,A,,%X%,%Y%,%Width%,%Height%
  1095.   sleep, 100
  1096.   WinMove, Title of the window, , 0, 0
  1097.  
  1098. }
  1099.  
  1100.  
  1101. ;~ #c::ResizeWin_atzeropos(1800,1100)
  1102.  
  1103. #c::
  1104.    WinGetActiveTitle, Title
  1105.    WinRestore, %Title%
  1106.    SysGet, X1, 76
  1107.    SysGet, Y1, 77
  1108.    SysGet, Width, 78
  1109.    SysGet, Height, 79
  1110.    WinMove, %Title%,, 50, 50, 1820, 970
  1111. return
  1112.  
  1113.  
  1114. !p::
  1115. process,close,Switcher.exe
  1116. process,close,Justgestures.exe
  1117. return
  1118.  
  1119. !o::
  1120. Run C:\Program Files (x86)\Switcher/Switcher.exe
  1121. Run C:\Program Files (x86)\Just Gestures/JustGestures.exe
  1122. sleep, 1000 ;
  1123. IfWinExist ahk_class WindowsForms10.Window.8.app.0.378734a
  1124. {
  1125.     WinActivateBottom, ahk_class WindowsForms10.Window.8.app.0.378734a
  1126. Send,{Enter}
  1127. }
  1128. Else
  1129. {
  1130.   sleep, 1000 ;
  1131. WinActivateBottom, ahk_class WindowsForms10.Window.8.app.0.378734a
  1132. Send,{Enter}
  1133. }
  1134. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement