Automatically start a tab on Windows or MacOS

Fitting in new habits requires probably a new environment or strong executuion ability as commonly mentioned in psychological contexts. I am always struggling with getting new habit. But recently getting better to get a new habit by automatic tub start so I don't forget to record my data in the morning, start what I need to do essential. Here's a memo detailing the process.

Automatic Tab Launch on Windows and MacOS

I needed to fill in data for work on a Google spreadsheet every morning, often forgetting couple days and totally the task is out of my brain.

Recent reserches about habit , reserchers say that "creating a new environment is crucial for adopting good habits and breaking bad ones". So it's not just a matter of neither willpower nor ability.

Given that typical flow of adopting habits when I could not, the following pattern emerged:

1, Forgot to fill in the data

2, After forgetting couple of days, the task is out of my brain. Less and less....

3, After forgetting several weeks, completely gone....

I think these points outline is common problem to adopt new habit for many people.

To prevent forgetting the task and to ensure that even if I forget the task to do, resume the task immediatly need something that reminds me automatically.

In my case, I am using the same computer for both work and personal tasks.
So starting the Google spreadsheet on Windows could prevent forgetting to record data.

Furthermore, even on days off when the computer isn't used all day and there's a risk of forgetting to record data.

Automatically opening the spreadsheet data page next time when I start my computer, would be work as a reminder, preventing the task from slipping my mind.

How to start a tub automatically??

To set up for starting a tub automatically is not so complicated.

For Windows:

1, Open a text editor.

2, Write the following code: (You can copy and paste it)

@echo off
start chrome "https://docs.google.com/spreadsheets" //type URL that you want to start automatically

3, Save the file with the extension .bat (Windows batch file).

4, Move the file to the Startup folder.

To open the Startup folder, click folders in File Explorer as follows:

PC, OS(C:)→User name\→*AppData\→Roaming\→Microsoft\→Windows\→Start Menu\→Programs\→Startup

Drop the file you saved in step 3 into the Startup folder, and the specified URL will be opened automatically on the next startup.

Note: If the AppData folder is not visible, it may be hidden. You need to enable the display of hidden items.


If you go to the "View" tab at the top of Internet Explorer and then click on "Options" in the "View" tab, you can select "Show hidden files" to display the AppData folder.

For MacOS:

1, Open Script Editor.

2, Enter the following AppleScript code:

do shell script "open -a 'Google Chrome' 'https://docs.google.com/spreadsheets'"

3, Save the script. The extension will be .scpt. Example: OpenGoogleSheet.scpt

That's it.

Anyone interested in automating habit formation should give this a try.