Hello Experts, How could i use this Auto Hotkey code (ahk)
closehandle("_circleDock_")
closehandle(name){
pid := 0
handle := getHandle(pid,name)
if (handle = "") {
return ; handle not found
}
command := "C:\Users\Astryd\Risorse\_CircleDocks\handle.exe -p " . pid . " -c " . handle . " -y"
Run, %comspec% /c %command%,, Hide
}
}
getHandle(ByRef pid,name) {
command := "C:\Users\Astryd\Risorse\_CircleDocks\handle.exe -a " . name
stdout := runStdout(command)
needle := "No matching" ;when Handle found nothing return in standard output "No matching handles found."
IfInString, stdout, %needle%
{
return ""
}
handle := RegExReplace(stdout, "s).*(...): \\Sessions\\1\\BaseNamedObjects\\_CircleDock_.*", "$1")
pid := RegExReplace(stdout, "s).*pid: (\d*).*", "$1")
Return handle
}
; Run a command and return standard output
runStdout(command) {
shell := comobjcreate("wscript.shell")
exec := (shell.exec(comspec " /c " command))
stdout := exec.stdout.readall()
Return stdout
}
Select all Open in new window