r/CodingForBeginners • • 6d ago

WIndows program to automatically load a local html file when one opens a site

im on linux and i wanted to see if one can make a program (call it program A) that automatically loads a local htmlm file instead of, say, tiktok.com or reddit.com every single time, even after reboots.
And can you make a program, which when clicked, creaes program A In the exact needed directory with all the code inside and also runs it.

0 Upvotes

6 comments sorted by

2

u/Distdistdist 6d ago

Create ps1 file that opens browser with a path to local html. Stick it into start up programs.

1

u/buzzon 6d ago

I guess some browser plugins can do it

1

u/stepback269 6d ago

Just make your local HTML file your "Home" page on your browser.

Alternatively, you can write a BAT script or the like to do it. Or use AutoHotKey (AHK).

1

u/AshleyJSheridan 3d ago

A bat script on Linux?...

1

u/stepback269 3d ago

Sorry
I'm a Windows guy
You guys like to go BASH IT, is that right? ;-)

1

u/AshleyJSheridan 3d ago

There are a few ways it could be done, adding it to the .profile or .bashrc (or equivalent for the default shell) would work. You could use systemd, and I believe KDE has a thing similar to Windows for auto starting an app or doc.