Originally Posted by
Ghost of Cow
...wait, KennScript. Could we make a functioning programming language out of all the usual lines? Like, "NeverBeenDoneBefore" as a variable declaration. That'd be swell.
Well, the basis would be simple with PowerShell, one option would be (not very subtle)
Code:
$Input = "You don't know what you are talking about", "ït's the best space game ever", "nobody does what Roberts is doing", "the game is released", "the game is not released"| Get-Random
Would be better to read a file in as that is easier to add lines, but that's not hard to make.
Basically you could make it to print a few random lines and 'cheat' with random to not use the same line twice.
Getting it to type in a browser reply window would be a challenge, not something I ever tried and not sure PowerShell can do that.
/edit
Well, this sorta works... You need to be sure the edit box is active before you run it..
Code:
"You don't know what you are talking about", "It's the best space game ever", "Nobody does what Roberts is doing", "The game is released", "The game is not released"| Get-Random -Count 2 | Clip
$wshell = New-Object -ComObject wscript.shell;
$wshell.AppActivate('chrome')
Sleep 2
[void][reflection.assembly]::loadwithpartialname("system.windows.forms")
[system.windows.forms.sendkeys]::sendwait('^v')
/edit 2
Just for clarity, you could replace the first line with say
Code:
Get-Content "c:\temp\lines.txt" | Get-Random -Count 2 | Clip
With c:\temp\lines.txt having all quotes you want, 1 per line.
/Last edit I promise
This checks for a temp directory in the user documents folder, and/or lines.txt in that temp dir. If not create them
Yea it's very basic I know. Well, it kinda gets the job done.
Code:
$FolderName = "$env:userprofile\Documents\temp\"
$Filename = "$env:userprofile\Documents\temp\lines.txt"
#Create temp dir in user folder if not exist
if (Test-Path $FolderName) {
write-host 0
# Path exists, do nothing :P
}
else
{
[void](New-Item $FolderName -ItemType Directory)
}
#Create quote file in user temp folder if not exist
if (Test-Path $Filename) {
# File exists, do nothing :P
}
else
{
[void](New-Item $Filename -ItemType File)
Add-Content -path $Filename -Value "You don't know what you are talking about"
Add-Content -path $Filename -Value "It's the best space game ever"
Add-Content -path $Filename -Value "No one has ever done what SC is doing."
Add-Content -path $Filename -Value "The game is released"
Add-Content -path $Filename -Value "The game is not released"
Add-Content -path $Filename -Value "You're just clueless about development"
Add-Content -path $Filename -Value "You have poor character."
Add-Content -path $Filename -Value "You're just lying."
Add-Content -path $Filename -Value "Dates change all the time."
}
Get-Content "$env:userprofile\temp\lines.txt" | Get-Random -Count 3 | Clip
$wshell = New-Object -ComObject wscript.shell;
$wshell.AppActivate('Chrome')
Sleep 2 #Not really needed
[void][reflection.assembly]::loadwithpartialname("system.windows.forms")
[system.windows.forms.sendkeys]::sendwait('^v')