EN / RU / πŸ€–
← Back to essays
Β· Essay Β· 1 min

Automating Screenshots with HammerSpoon

Automating the process of screenshots and interaction with ChatGPT using HammerSpoon.

<p>Something about this week feels like vibe coding; I’m trying to automate everything and anything (at least frequently used actions).</p>
<p>Today, I decided to automate the process of taking a screenshot, sending it to ChatGPT, and asking a question. On one hand, this takes 10-15 seconds, but on the other hand, how nice it is to do it in 1-2 seconds. In the end, I vibe coded a script for HammerSpoon (an incredibly cool automation tool that I wrote about <a href="https://t.me/rvnikita_blog/1231">here</a>; and use every day, at least for rewriting text and checking grammar through GPT β€œon the fly”). It works on the principle of regular screenshots; by using the cmd+shift+1 combination, you select an area, and it automatically ends up in ChatGPT.</p>
<p>So, I’m attaching the LUA file in case you also want to speed up your life a bit.</p>
<p>P.S. I can almost feel the joke about how a programmer is a lazy person who is willing to spend 8 hours to avoid repeating an action that takes 10 seconds.</p>

#coding #productivity

<p><a href="https://t.me/+OvImEUmA7W5mYTRi">β€”β€”β€”β€”β€”β€”β€”β€”β€” ΠœΡ‹ΡΠ»ΠΈ Π Π²Π°Ρ‡Π΅Π²Π° β€”β€”β€”β€”β€”β€”β€”β€”β€”</a></p>