Automating a Freedom internet blocking session. Help a novelist beat procrastination!

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
SaltWaterWriter
Posts: 1
Joined: 25 Feb 2023, 19:44

Automating a Freedom internet blocking session. Help a novelist beat procrastination!

25 Feb 2023, 20:00

Hi all,

I was hoping someone could help me. I'm a full-time novelist and I use an app called Freedom blocker (website: Freedom.to) to block the internet while I'm writing. It's incredible and I usually double or triple my word count when I use it, but my procrastination habits can often stop me from starting a blocking session. I was hoping to set something up where I would press a key sequence and it would start a blocking session 5 minutes later. That way whenever I finish a block I could press the key sequence, take a little break to mess around on the Internet, then have the next block start automatically after a certain time.

I love AHK and use a few scripts every day, but I am very inexperienced with scripting. I was thinking the best way to do this would be to press a key sequence that would, after a delay of 5 minutes, trigger an auto hotkey command to the Freedom blocking program to tell it to start a blocking session. The program doesn't have hotkeys. A blocking session starts when you click on the butterfly icon in the taskbar, then click 'start a session'>'X minutes (last used)'. I attached some images to illustrate.

I used window spy to find the command and here is what I came back with:

Window title, class and process when clicking on the tray icon:

ahk_class HwndWrapper[FreedomBlocker.exe;;08ec869a-4e75-4be4-b463-e46d4575605a]
ahk_exe FreedomBlocker.exe
ahk_pid 19408

Then mouse position to click on 'start a session'

Screen: 1640, 935 (less often used)
Window: 136, 158 (default)
Client: 136, 158 (recommended)
Color: F5F5F5 (Red=F5 Green=F5 Blue=F5)


Then mouse position to click on 'X minutes (last used)'

Screen: 1439, 931 (less often used)
Window: -65, 152 (default)
Client: -65, 152 (recommended)
Color: 000000 (Red=00 Green=00 Blue=00)

Please note that I use three monitors and the primary monitor with the taskbar is in the middle.

I also tried capturing window titles, class, and process when I actually click to start a blocking session and got this:

No Blocklists Selected
ahk_class #32770
ahk_exe FreedomBlocker.exe
ahk_pid 29472

The only problem is that "No Blocklists Selected" command. I selected no blocklists in Freedom while I was working on this so I would be able to access the web while trying to capture the command. The no blocklists option shouldn't be in the final command. I tried to capture to capture the window titles, class, and process info again when actually initiating a block with blocklists selected and wasn't able to.

There are also options for starting a session through a webpage at freedom.to/dashboard (image attached).

I'd be very grateful for any help with this. Thanks!
Attachments
freedom.jpg
freedom.jpg (67.57 KiB) Viewed 219 times
freedom2.jpg
freedom2.jpg (54.99 KiB) Viewed 219 times
freedom3..JPG
freedom3..JPG (107.07 KiB) Viewed 219 times

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: Albireo, Descolada, jacek678, kunkel321 and 40 guests