Wednesday, January 21, 2026

How to create an image with random number and random alphabets with Javascripts

HTML

 <body>

    <canvas id="myCanvas" width="200" height="100" style="border:1px solid #d3d3d3;">

        Your browser does not support the HTML5 canvas tag.

    </canvas>

    <script src="script.js"></script>

</body>


JAVASCRIPT

function generateRandomLetters(length) {
  let result = '';
  const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
  for (let i = 0; i < length; i++) {
    result += characters.charAt(Math.floor(Math.random() * characters.length));
  }
  return result;
}

// Example usage to get a 6-letter string:
const randomLetters = generateRandomLetters(6);


// Get the canvas element and its 2D context
const canvas = document.getElementById("myCanvas");
const ctx = canvas.getContext("2d");

// Draw a rectangle
ctx.fillStyle = "#FF0000";
ctx.fillRect(0, 0, 150, 75);

// Draw some text
ctx.font = "30px Arial";
ctx.fillStyle = "#000000";
ctx.fillText(randomLetters, 10, 50);

// Optional: Convert canvas content to an image data URL
const imageDataUrl = canvas.toDataURL("image/png");
console.log(imageDataUrl); // You can use this URL as the src for a new <img> element
document.write(randomLetters);

OR

// Get the canvas element and its 2D context
const canvas = document.getElementById("myCanvas");
const ctx = canvas.getContext("2d");

// Draw a rectangle
ctx.fillStyle = "#FF0000";
ctx.fillRect(0, 0, 150, 75);

// Draw some text
ctx.font = "30px Arial";
ctx.fillStyle = "#000000";
ctx.fillText(Math.random(), 10, 50);

// Optional: Convert canvas content to an image data URL
const imageDataUrl = canvas.toDataURL("image/png");
console.log(imageDataUrl); // You can use this URL as the src for a new <img> element
document.write(Math.random());


a to z alphabets in chrome with notepad with powershell

  #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 50; $k++) {

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

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

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

  }

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

}


Tuesday, January 20, 2026

Scroll Button Meaning

> In Excel , Click on Cell, If scroll Lock is OFF than You can left and right the Cell.

> IF scroll Lock is ON than you can scroll Down or up scroll bars.