Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;
- ; AutoHotkey Version: 1.x
- ; Language: English
- ; Platform: Win9x/NT
- ; Author: A.N.Other <[email protected]>
- ;
- ; Script Function:
- ; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
- ;
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- option = %1%
- if (option = "")
- option := "disable"
- Run, devcon %option% "USB\VID_06CB&PID_2819&REV_0020&MI_00",,hide ;touchpad
- Run, devcon %option% "USB\VID_06CB&PID_2819&REV_0020&MI_02",,hide ;touchpad
- Run, netsh interface set interface Wi-Fi %option%,, hide
- ;RunWait, devcon %option% "PCI\VEN_8086&DEV_095A&SUBSYS_55108086&REV_3B",,hide
- ;RunWait, devcon %option% "ACPI\VEN_SMO&DEV_91D0",,hide
- Run, devcon %option% "USB\VID_0B95&PID_7720&REV_0001",,hide ;USB lan
- if (option = "disable") {
- Send, ^!L
- if (isWindowFullScreen( "A" ))
- Send, #d
- Sleep, 300
- CoordMode, Mouse, Screen
- ;SetControlDelay -1
- ;ControlFocus,, ahk_class Shell_TrayWnd
- ;ControlClick,, ahk_class Shell_TrayWnd,, Right,NA
- MouseClick, right, 3, A_ScreenHeight-3
- Sleep, 300
- Send, u
- Sleep, 300
- Send, s
- }
- isWindowFullScreen( winTitle ) {
- ;checks if the specified window is full screen
- winID := WinExist( winTitle )
- If ( !winID )
- Return false
- WinGet style, Style, ahk_id %WinID%
- WinGetPos ,,,winW,winH, %winTitle%
- ; 0x800000 is WS_BORDER.
- ; 0x20000000 is WS_MINIMIZE.
- ; no border and not minimized
- Return ((style & 0x20800000) or winH < A_ScreenHeight or winW < A_ScreenWidth) ? false : true
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement