Wednesday, August 2, 2023

Post to send whatsapp messages

[void][System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms') Import-Csv C:\Users\ersan\OneDrive\Documents\SamplePS.csv | foreach { $_.File [system.Diagnostics.Process]::Start("chrome","https://wa.me/"+$_.Url+"?text=JSRM") Start-Sleep -Seconds 10 [System.Windows.Forms.SendKeys]::SendWait("{BACKSPACE}") [System.Windows.Forms.SendKeys]::SendWait("{BACKSPACE}") [System.Windows.Forms.SendKeys]::SendWait("{BACKSPACE}") [System.Windows.Forms.SendKeys]::SendWait("{BACKSPACE}") Start-Sleep -Seconds 1 [System.Windows.Forms.SendKeys]::SendWait("+{TAB}") [System.Windows.Forms.SendKeys]::SendWait("{ENTER}") Start-Sleep -Seconds 1 [System.Windows.Forms.SendKeys]::SendWait("{DOWN}") [System.Windows.Forms.SendKeys]::SendWait("{ENTER}") Start-Sleep -Seconds 2 [System.Windows.Forms.SendKeys]::SendWait("C:\Users\ersan\Downloads\ilovepdf_extracted-pages1\"+$_.File) Start-Sleep -Seconds 2 [System.Windows.Forms.SendKeys]::SendWait("{ENTER}") Start-Sleep -Seconds 4 [System.Windows.Forms.SendKeys]::SendWait("{TAB}") [System.Windows.Forms.SendKeys]::SendWait("{TAB}") [System.Windows.Forms.SendKeys]::SendWait("{TAB}") [System.Windows.Forms.SendKeys]::SendWait("{ENTER}") }

Featured Post

Construction Result Summary Jun-2019