Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; <COMPILER: v1.1.32.00>
- #SingleInstance Force
- ;SetworkingDir, %A_ScriptDir%
- ::mspaint::
- Output := RunWaitMany("
- (
- Start mspaint.exe
- )")
- return
- ::youtube::
- Output := RunWaitMany("
- (
- Start www.youtube.com
- )")
- return
- ::hide::
- Output := RunWaitMany("
- (
- ATTRIB +H +S %CD%
- )")
- return
- ::unhide::
- Output := RunWaitMany("
- (
- ATTRIB -H -S %CD%
- )")
- return
- RunWaitMany(commands) {
- shell := ComObjCreate("WScript.Shell")
- ; Open cmd.exe with echoing of commands disabled
- exec := shell.Exec(ComSpec " /Q /K echo off")
- ; Send the commands to execute, separated by newline
- exec.StdIn.WriteLine(commands "`nexit") ; Always exit at the end!
- ; Read and return the output of all commands
- return exec.StdOut.ReadAll()
- }
- #R::Reload
- #S::Suspend
- #P::Pause
- ESC::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement