Functions/Scraping/Send-TextFileAsKeys.ps1

Function Send-TextFileAsKeys
{
    [CmdletBinding()]
    Param
    (
        # File Path to Text File
        [Parameter(Mandatory=$True)]
        [String]
        $FilePath
    )
    Process
    {
        # Get Filecontent, Format, and Send
        IF(Test-Path $FilePath){Get-Content $FilePath | Format-SendKeys | Send-Keystrokes} ELSE {Write-Host "File not found at path!" -ForegroundColor Red}
    }
}