Friday, January 23, 2026

a to z alphabets copy and paste in Notepad Chrome

   #Note This first line is mandatory [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")

# Start WinWord (if not already running)

Start-Process -FilePath "chrome.exe"

# Wait for WinWord to open and become active

Start-Sleep -Seconds 3

# Activate the WinWord window (adjust the title if necessary)

$wshell = New-Object -ComObject wscript.shell

#$wshell.AppActivate("Document1 - Word") # Or the actual document title

 (New-Object -ComObject "wscript.shell").SendKeys('data:text/html, <title>Notepad</title><body contenteditable style="font-size:18px;line-height:1.6;font-family:sans-serif;">')


  (New-Object -ComObject "wscript.shell").SendKeys("{ENTER}")


Start-Sleep -Seconds 1


  (New-Object -ComObject "wscript.shell").SendKeys("{TAB}")


  for ($k = 1; $k -le 10; $k++) {

 for ($i = 1; $i -le 50; $i++) {

 $j = [char](65 + $i)

   (New-Object -ComObject "wscript.shell").SendKeys("$j")

  }

  [System.Windows.Forms.SendKeys]::SendWait("^{a}")


[System.Windows.Forms.SendKeys]::SendWait("^{c}")


[System.Windows.Forms.SendKeys]::SendWait("{RIGHT}")

[System.Windows.Forms.SendKeys]::SendWait("^{v}")

  (New-Object -ComObject "wscript.shell").SendKeys("{Enter}")





}

No comments:

Post a Comment