Compare commits

...

10 Commits

Author SHA1 Message Date
DeveloperDurp
94555e9dd0 Update KeyPresser.ps1
added config file
2021-06-26 12:11:10 -05:00
DeveloperDurp
e95d87981d Update README.md 2021-06-26 11:26:10 -05:00
DeveloperDurp
8a9e4a6174 Update README.md 2021-06-26 11:17:49 -05:00
DeveloperDurp
7635929019 Update README.md 2021-06-26 11:15:22 -05:00
DeveloperDurp
b0b69d9fc6 Delete Start.bat 2021-06-26 11:14:12 -05:00
DeveloperDurp
184b4dc9de Delete keypresser.exe 2021-06-26 11:14:02 -05:00
DeveloperDurp
81ca75f10b Update README.md 2021-06-23 14:11:02 -05:00
DeveloperDurp
60bab2afd5 Add files via upload 2021-06-23 12:37:52 -05:00
DeveloperDurp
690c5f3297 Add files via upload 2021-06-23 12:37:43 -05:00
DeveloperDurp
91b3e2ff05 Update README.md 2021-06-23 11:45:44 -05:00
3 changed files with 43 additions and 8 deletions

View File

@@ -1,6 +1,30 @@
#region Header #region Header
$Version = "1.0.4" $Version = "1.0.5"
$appdatapath = "$env:APPDATA\DeveloperDurp\KeyPresser"
$configpath = "$appdatapath\config.json"
#Check for config file
$KeypresserPath = Test-Path $appdatapath
if($KeypresserPath -eq $false){
New-Item -Path $appdatapath -ItemType Directory
}
#checking for config file
$configfile = Test-Path $configpath
if($configfile -eq $false){
$json = @{
text = "1,2,3,4"
client ="sro_client"
delay ="150"
}
}else{$json = Get-Content $configpath | ConvertFrom-Json}
#Dependencies #Dependencies
[Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null [Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
@@ -90,6 +114,7 @@
$KeysTextBox = New-Object 'System.Windows.Forms.TextBox' $KeysTextBox = New-Object 'System.Windows.Forms.TextBox'
$KeysTextBox.Location = New-Object System.Drawing.Point(5,25) $KeysTextBox.Location = New-Object System.Drawing.Point(5,25)
$KeysTextBox.Width = '425' $KeysTextBox.Width = '425'
$KeysTextBox.text = $json.text
$sync["KeysTextBox"] = $KeysTextBox $sync["KeysTextBox"] = $KeysTextBox
$form.controls.add($KeysTextBox) $form.controls.add($KeysTextBox)
@@ -98,6 +123,14 @@
$KeysButton.text = "Start" $KeysButton.text = "Start"
$KeysButton.add_click({ $KeysButton.add_click({
$json = @{
text = $sync["KeysTextBox"].text
delay = $sync["delayTextBox"].text
client = $sync["clienttextbox"].text
} | ConvertTo-Json | Out-File $configpath
if ($KeysButton.text -ne "Stop"){ if ($KeysButton.text -ne "Stop"){
$KeysButton.text = "Stop" $KeysButton.text = "Stop"
$sync["x"] = 1 $sync["x"] = 1
@@ -120,7 +153,7 @@
$delayTextBox = New-Object 'System.Windows.Forms.TextBox' $delayTextBox = New-Object 'System.Windows.Forms.TextBox'
$delayTextBox.Location = New-Object System.Drawing.Point(195,45) $delayTextBox.Location = New-Object System.Drawing.Point(195,45)
$delayTextBox.Width = '30' $delayTextBox.Width = '30'
$delayTextBox.text = "150" $delayTextBox.text = $json.delay
$sync["delayTextBox"] = $delayTextBox $sync["delayTextBox"] = $delayTextBox
$form.controls.add($delayTextBox) $form.controls.add($delayTextBox)
@@ -133,7 +166,7 @@
$clientTextBox = New-Object 'System.Windows.Forms.TextBox' $clientTextBox = New-Object 'System.Windows.Forms.TextBox'
$clientTextBox.Location = New-Object System.Drawing.Point(305,45) $clientTextBox.Location = New-Object System.Drawing.Point(305,45)
$clientTextBox.Width = '100' $clientTextBox.Width = '100'
$clientTextBox.text = "sro_client" $clientTextBox.text = $json.client
$sync["clienttextbox"] = $clientTextBox $sync["clienttextbox"] = $clientTextBox
$form.controls.add($clientTextBox) $form.controls.add($clientTextBox)

View File

@@ -1,9 +1,12 @@
# KeyPresser # KeyPresser
##### Version: 1.0.3 ##### Version: 1.0.4
## How to use ## How to use
1. Click green "Code" button and then click download ZIP #PS1
2. Once downloaded extract anywhere (Inside the SRO directory is the most simple) 1. Open a powershell window
3. To run all you need to do is right click the Start.bat and click "Run as Administrator" 2. Run the following command
* Start-Process Powershell -Verb runAs -ArgumentList "-Command Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/DeveloperDurp/KeyPresser/main/KeyPresser.ps1'))"
3. Enjoy

View File

@@ -1 +0,0 @@
powershell.exe -executionpolicy bypass -windowstyle hidden -noninteractive -nologo -file "keypresser.ps1"