Update KeyPresser.ps1
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#region Header
|
#region Header
|
||||||
|
|
||||||
$Version = "1.0.3"
|
$Version = "1.0.4"
|
||||||
|
|
||||||
#Dependencies
|
#Dependencies
|
||||||
[Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
|
[Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
|
||||||
@@ -43,12 +43,12 @@
|
|||||||
$client = $sync["clienttextbox"].text
|
$client = $sync["clienttextbox"].text
|
||||||
|
|
||||||
while($sync["x"] -eq 1){
|
while($sync["x"] -eq 1){
|
||||||
|
if ($client -ne ""){
|
||||||
$ActiveHandle = [UserWindows]::GetForegroundWindow()
|
$ActiveHandle = [UserWindows]::GetForegroundWindow()
|
||||||
$Process = Get-Process | ? {$_.MainWindowHandle -eq $activeHandle} | Select-Object -ExpandProperty ProcessName
|
$Process = Get-Process | ? {$_.MainWindowHandle -eq $activeHandle} | Select-Object -ExpandProperty ProcessName
|
||||||
Write-Output $Process
|
Write-Output $Process
|
||||||
Write-output $delay
|
Write-output $delay
|
||||||
|
}else{$process = $client}
|
||||||
Foreach ($key in $keys){
|
Foreach ($key in $keys){
|
||||||
|
|
||||||
if ($sync["x"] -eq 1 -and $Process -eq $client){
|
if ($sync["x"] -eq 1 -and $Process -eq $client){
|
||||||
|
|||||||
Reference in New Issue
Block a user