Code: Select all
$input = $args[0]
return $input
Code: Select all
#c::{
Run 'pwsh test.ps1 2', , 'Hide'
MsgBox returnValue
}
Code: Select all
$input = $args[0]
return $input
Code: Select all
#c::{
Run 'pwsh test.ps1 2', , 'Hide'
MsgBox returnValue
}
Code: Select all
#Requires AutoHotkey v2.0
psScript := A_ScriptDir '\test.ps1'
shell := ComObject('WScript.Shell')
exec := shell.Exec(A_ComSpec ' /Q /K echo off')
param := 2
exitPS := '`nexit'
commands := 'powershell ' psScript ' ' param exitPS
exec.StdIn.WriteLine(commands)
MsgBox exec.StdOut.ReadAll()
Code: Select all
param(
$message
)
return $message
Code: Select all
RunWaitOne(command) {
shell := ComObject("WScript.Shell")
exec := shell.Exec(A_ComSpec " /C " command)
return exec.StdOut.ReadAll()
}
Code: Select all
exec := shell.Exec(A_ComSpec " /C " " hide " command)
Code: Select all
Command:="Your command"
StdOutToVar(comspec . " /c " . Command)
Users browsing this forum: macromint and 105 guests