For Windows User

At work, I have to use a Windows machine and I find myself needing to quickly get my thoughts into a note. I tried to use notepad, notepad++, simple sticky notes and a few other text editors but they did not meet my requirements for a quick capture tool like Drafts.

Notepad and the rest of the editors do not have a global hotkey to launch and more importantly, they do not autosave i.e. I need to enter the filename and choose the folder to save these files.

The most obvious answer is to use Drafts Web Capture (getdrafts.com) but I donā€™t like this approach because

  1. I need to keep the browser tab open as opposed to a global hotkey to trigger it and
  2. sometimes, I get logged out and have to log in to Apple id (plus entering 2FA) and by the time I get the website up, my fleeting thoughts escaped me.

With a little tweaking, I finally manage to land on a set of tools that are fast, autosaves to iCloud, and works with Drafts. Here are the steps, in case there are users who are stuck in Windows and want to get your notes into Drafts.

My main objective: to simulate Macā€™s āŒƒ Space to launch Drafts Quick Capture window, type my thoughts in and Save. This means, just a one hotkey press to open a editor, type something and done.

There are two tools needed:

  1. notepad++ (free and open-sourced) and 3 Plugins for data entry
  2. a software to launch notepad++ when I pressed a hotkey, in this case, I already owned DisplayFusion, a handy tool if you use multiple monitors, which does have a function to launch the application. Otherwise, you can use AutoHotKey to launch app, which is free.
  3. Using Drafts Automatic Import feature.

Let me share my tweaking on notepad++

  1. You will need 3 Plugins. To install Plugin in notepad++, click Plugin - Plugin Admin and you will be presented with a table to install Plugin:

  2. The 3 PlugIns you need to install are:
    a. AutoSave
    b. TakeNotes
    c. PythonScript

  3. Once you have installed it, you can go to PlugIn - AutoSave - Options to configure the plugin.
    a. For AutoSave, this is the Option screen
    image

Note a few things which I highlighted in red. Firstly, it will autosave every 1 minute or when notepad++ loses focus. Secondly, it will always overwrite the existing file and thirdly, the location of Drafts Inbox for automatic import later.

b. TakeNotes Option screen
image

This Plugin allows you to click File - New in notepad++ to create a new, empty file with username+timestamp instead of notepad++ defaultā€™s name which is ā€œnew 1ā€, ā€œnew 2ā€, etc.

However, you still need to click File, New (two clicks) or click on the icon (one click). This is still not ideal for me. I want notepad++ to autogenerate a new file with username+timestamp during launch. This can be achieved by PythonScript. See next step.

c. PythonScript
How do you do automate ā€œFile - Newā€ when you launch notepad++?

If you click PlugIn - PythonScript - Configuration, the following screen appears.

You will note that if I set Initialisation to ATSTARTUP, PythonScript PlugIn will always run startup.py when notepad++ is launched.

You can locate startup.py is this directory:
C:\Program Files\Notepad++\plugins\PythonScript\scripts

I just enter one command at the end of the file:

# In order to set the stdout to the current active document, uncomment the following line
# sys.stdout = editor
# So print "hello world", will insert "hello world" at the current cursor position

# For DRAFTS IMPORT
notepad.runMenuCommand('Take Notes','Create new note')

Translation: when notepad++ is launched via hotkey, the PythonScript will run startup.py which will also tell TakeNotes PlugIn to create a new note with username+timestamp as the file name. The file autosaves in 1 minute or when the editor lose focus. Map back to my original objective above:

My main objective: to simulate Mac's āŒƒ Space to launch Drafts Quick Capture window, type my thoughts in and Save.

Yes, this tool helped me met my objective!

Once you have your text files save into iCloud Drive\Drafts\Inbox, you can launch Drafts on the iPhone and these notes will be automatically imported into Drafts.

Hope this helps!

5 Likes

It looks like as well as Notepad++, you also need to have iCloud Drive for Windows installed.

You can also set keyboard shortcuts to launch an app using native Windows features; no third-party tools required. ref

If you are an existing Notepad++ user, presumably you would not want to use the Python script as this would create notes when you do not want them.

I have a question about the auto save behaviour though. Is there a dependency here on not having Drafts open on a device set to import when you are using this approach? Iā€™m just thinking that the auto save could kick in before you finish writing and Drafts would import that file before you finish. What happens then? Does Drafts reimport on the next save to another new draft, or are further updates ignored?


For what itā€™s worth, I used to use Autohotkey on a global hotkey to capture quick notes directly and save to the Drafts import folder. Very similar to as you describe, but without the nice Notepad++ editing, and no auto save. It was very much to capture the odd fleeting thought or clipboard paste - trigger, type, save. Very basic, but lightweight and very fast.

I had to give that up some time ago when I was no longer permittee to use iCloud Drive for Windows on my work PC. Eventually Drafts web capture surfaced, and now that has replaced that. It is not as convenient, due to the login session expiry, but it works for me.

One thing you can do is app-ify it. I have several web sites I use in Chrome where Iā€™ve set them up to run as an app. You can set shortcut keys to launch them and they sit standalone in their own windows. They do share login session details with the main browser instance. Chrome also tends to run a background process too. This means that even when you close the ā€œappā€, you donā€™t get forced to sign back in next time it opens - only when your session validity period expires. I think a session lasts about a day for me.

2 Likes

I just tested it by typing something in notepad++ and keeping it open. Drafts imported the first file and moved the text file into iCloud Drive\Drafts\Inbox\Imported directory. I continue to edit my text and AutoSave will save it again as a new file, with the same file name. Drafts imported this new one as a whole and so I have a duplicate entry in Drafts. I think I can accept this because I use Drafts to triage my notes, and I can easily Trash the duplicate as long as it didnā€™t affect my editing experience in notepad++.

This seems like a painless way to get text into Drafts, thank you. In the Mac, I use Fluid to appify a website. I couldnā€™t find an equivalent in Windows, not knowing that it is a Chrome extension (I am a Firefox user). I can explore this but, the nice thing about my notepad++ approach is that I have a powerful note editor for the job. Also, I have set my global hotkey to launch notepadd++ with the ā€œ-MultiInstā€ parameter, so when I press this hotkey a few times, I can have multiple instances of notepad++ opened, and that allows me to make and edit multiple notepads before being they are imported into Drafts.

1 Like

Given the consistency of the file name of the import and that it is in effect a UUID for the editing session, I expect you could build a sweep-up action to trash older notes for you.

Just to be clear, it isnā€™t a Chrome extension (which is a thing), it is a native Chrome feature.

Firefox can do this natively too as of build 73 last year - the site specific browser feature. But I havenā€™t tried it myself. I have an array of browsers on my work laptop for testing and multi-login segregation purposes, but Chrome has been my daily driver on Windows for years.

1 Like

Thatā€™s what I get for not reading Release Notes! Iā€™ll try this out later!

Thanks to @belgarion and @sylumer for the great write up.

I am wondering if there could be a solution with text files and git (including working copy and a synced folder)

I love the Ė‹Win + 1Ė‹ feature since I found it some years ago.

The appification (in Chrome) creates a Windows shortcut, that can be tied to a Ctrl + Alt keyboard shortcut and even a special icon for the app.

Feel free to ask if you are interested in a detailed writeup.

1 Like

What would git do here? Just an archive of Windows submissions, or receive updates back from Drafts too? If so are you thinking of Drafts updating to and from git automatically?

Not really thought trough. Just an idea.
This is not a easy solution BUT for humans that use git ā€¦

But letā€™s be honest I personally am rethinking the storage of my data in Drafts at the moment.

1 Like

Me too. Today a lot is in Drafts that isnā€™t transient. There might be some value in moving that to Obsidian.

2 Likes

Can you do Ctrl + Alt a few times to create multiple Chrome window so that you can have a few drafts opened at the same time? Iā€™m liking using Notepad++ as I can have multiple Notepad++ opened for the multiple project notes I am entering for the day.

Yes that works. I tried it with Alt + Ctrl + + and could open as many windows as I liked.

To check:

  • Timeout of window
  • Different capture windows with pre-filled tags, flag or syntax
1 Like

Thank you so much, it works!!!

1 Like