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.

Thursday, January 15, 2026

How to copy and paste in Powershell from one notepad to another notepad - CTRL + C and CTRL + V in Powershell - CTRL C in Powershell and CTRL V in Powershell

 #Note This first line is mandatory 


[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")


# Start WinWord (if not already running)

Start-Process -FilePath "notepad.exe"

# Wait for WinWord to open and become active


Start-Sleep -Seconds 3

Start-Process -FilePath "notepad.exe"


Start-Sleep -Seconds 3

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

[System.Windows.Forms.SendKeys]::SendWait("123")

Start-Sleep -Seconds 3

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

Start-Sleep -Seconds 3

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

Start-Sleep -Seconds 3

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


Start-Sleep -Seconds 3

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



Note: ctrl C and Ctrl v , c and v are in small letters.

Wednesday, January 14, 2026

Fireworks in JS - Crackers Javascript

 https://fireworks.js.org/


https://www.npmjs.com/package/fireworks-js

> https://github.com/crashmax-dev/fireworks-js


https://stackblitz.com/edit/js-ubfdjg?file=style.css,package.json,index.js


https://codepen.io/mr__khushal/pen/yLobQEP


https://stackblitz.com/edit/js-ubfdjg?file=style.css,package.json,index.js


https://www.myprograming.com/how-to-add-crackers-animation-effect-to-my-html-page/

Confirm button in Javascript

  if (confirm("Press a button!")) {

    txt = "You pressed OK!";

  } else {

    txt = "You pressed Cancel!";

  }

How to view two books in Excel - How to view two books in excel

 > In excel, there are books.

> And In books there are sheets

------

> At the top,  you have restore option.

> In View Menu, You have arrange all button. You can click on that button.

> You can also used split button

How to add new themes in window 11 - Windows 11 theme - window 11 theme

 https://vsthemes.org/en/themes/windows11/71137-windows-xp-2025.html

Friday, January 9, 2026

How to add macros in Google Sheets

>Click on Extensions Menu
>Click on Macros and Add Scripts

Two filters in excel - Two Columns filters in excel - Multiple Columns filters in excel

> Open Excel

> Click on Data Menu

> Select the columns in sequence, not using CNTL(Column 1,2,3,4) will be used for Multiple columns. (Columns 4,6,9) will not be used for Multiple Columns.

> Click on Filter


Thursday, January 8, 2026

How to enable text cursor in Chrome - Highlight on object in Chrome

>  In settings of Google Chrome

> Click on Accessibility 

> Click on navigate pages with a text cursor


---------

Click on HIGHLIGHT ON FOCUS OBJECT


Friday, January 2, 2026

Powershell a to z alphabets 50 times

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

# Start WinWord (if not already running)

Start-Process -FilePath "notepad.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

Start-Sleep -Seconds 1

 for ($k = 1; $k -le 25; $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}")

}


Sound effects mouse in windows - mouse Sound effects in windows

 https://www.lifewire.com/set-mouse-click-sound-in-windows-10-5193086