Advertisement
Guest User

VenuTocuh.ahk

a guest
Jul 27th, 2020
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. ;
  2. ; AutoHotkey Version: 1.x
  3. ; Language: English
  4. ; Platform: Win9x/NT
  5. ; Author: A.N.Other <[email protected]>
  6. ;
  7. ; Script Function:
  8. ; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
  9. ;
  10.  
  11. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
  12. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  13. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
  14.  
  15. option = %1%
  16.  
  17. if (option = "")
  18. option := "disable"
  19.  
  20. Run, devcon %option% "USB\VID_06CB&PID_2819&REV_0020&MI_00",,hide ;touchpad
  21. Run, devcon %option% "USB\VID_06CB&PID_2819&REV_0020&MI_02",,hide ;touchpad
  22. Run, netsh interface set interface Wi-Fi %option%,, hide
  23. ;RunWait, devcon %option% "PCI\VEN_8086&DEV_095A&SUBSYS_55108086&REV_3B",,hide
  24. ;RunWait, devcon %option% "ACPI\VEN_SMO&DEV_91D0",,hide
  25. Run, devcon %option% "USB\VID_0B95&PID_7720&REV_0001",,hide ;USB lan
  26.  
  27. if (option = "disable") {
  28. Send, ^!L
  29. if (isWindowFullScreen( "A" ))
  30. Send, #d
  31. Sleep, 300
  32. CoordMode, Mouse, Screen
  33. ;SetControlDelay -1
  34. ;ControlFocus,, ahk_class Shell_TrayWnd
  35. ;ControlClick,, ahk_class Shell_TrayWnd,, Right,NA
  36. MouseClick, right, 3, A_ScreenHeight-3
  37. Sleep, 300
  38. Send, u
  39. Sleep, 300
  40. Send, s
  41. }
  42.  
  43. isWindowFullScreen( winTitle ) {
  44. ;checks if the specified window is full screen
  45.  
  46. winID := WinExist( winTitle )
  47.  
  48. If ( !winID )
  49. Return false
  50.  
  51. WinGet style, Style, ahk_id %WinID%
  52. WinGetPos ,,,winW,winH, %winTitle%
  53. ; 0x800000 is WS_BORDER.
  54. ; 0x20000000 is WS_MINIMIZE.
  55. ; no border and not minimized
  56. Return ((style & 0x20800000) or winH < A_ScreenHeight or winW < A_ScreenWidth) ? false : true
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement