Script only works sometimes: Formatting text in Evernote Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Stephan87
Posts: 4
Joined: 10 Jan 2021, 17:03

Script only works sometimes: Formatting text in Evernote

Post by Stephan87 » 26 Jun 2022, 14:12

Hi,

I want to achieve that the current date is entered into my Evernote note in bold and highlighted text. For that I send STRG+b (for making it bold), then I send STRG+Shift+H (for Highlighting), then the date.

This is my script:

Code: Select all

F11::
Send ^b
Send ^+h
FormatTime, datum,, dd.MM.yyyy
SendInput, %datum%
Send ^b
Send ^+h
return
It works - sometimes. This is how the output looks if I press F11 a couple of times (I add line breaks between manually):

Image

Its strange, I absolutely cannot explain to me what happens there...

Thank you.

User avatar
mikeyww
Posts: 26931
Joined: 09 Sep 2014, 18:38

Re: Script only works sometimes  Topic is solved

Post by mikeyww » 26 Jun 2022, 14:14

If Evernote is slow, then you might need to slow down your script, add Sleep, etc.

Explained: SetKeyDelay

Stephan87
Posts: 4
Joined: 10 Jan 2021, 17:03

Re: Script only works sometimes: Formatting text in Evernote

Post by Stephan87 » 26 Jun 2022, 14:17

This sounds very reasonable. Thank you! I will try it. My Evernote is very slow because I am on a very slow computer.

User avatar
boiler
Posts: 16949
Joined: 21 Dec 2014, 02:44

Re: Script only works sometimes: Formatting text in Evernote

Post by boiler » 26 Jun 2022, 14:19

And it might help if you send your key presses like this:

Code: Select all

Send {Ctrl down}b{Ctrl up}
Send {Ctrl down}{Shift down}h{Shift up{Ctrl up}
And experiment with different settings of SetKeyDelay. (edit: as mikeyww suggested)

Stephan87
Posts: 4
Joined: 10 Jan 2021, 17:03

Re: Script only works sometimes: Formatting text in Evernote

Post by Stephan87 » 26 Jun 2022, 14:21

Works flawless now! Thank you!

Post Reply

Return to “Ask for Help (v1)”