[Goodie] AutoHotKey Script to Execute Code Within a Note

mgainer007
Posts: 5
Joined: Sat Feb 21, 2009 6:58 am
Contact:

[Goodie] AutoHotKey Script to Execute Code Within a Note

Postby mgainer007 » Fri Mar 20, 2009 9:53 pm

AutoHotKey Script to Execute Embeded Code Within a Note

The general idea behind this AutoHotKey script is to be able to execute an embedded AutoHotKey script which is contained with in a note. This allows me to create website/application login scripts.

Currently the script only supports a single embedded script within a note.

Vista users will need to run the script with admin permissions.

The hotkey for the script is Ctrl-Alt-L

The script parses the clipboard contents looking for the below code wrapper, strips out the script code and executes it.

(Can be on a single line)
AutoHotKey::<<
AutoHotKey Script Code...
>>

The steps I use for a website are the following:
  • Search for website note
  • Press Ctrl-C to copy note contents to the clipboard
  • Press F3 to launch browser with website URL
  • After website has loaded, place the cursor at the appropriate login field (if necessary) and press Ctrl-Alt-L

I also have included a couple of example hotkeys for creating note templates for logins. You could also modify the script to include the 2 and 3 steps as part of the process. For myself, I wanted something a little more generic.

Along with the script file I've included a sample batch file for launching the script.

Long Live CintaNotes!

Example Note Text

Code: Select all

This is an example website logon script

AutoHotKey::<<
SendInput {Esc}Username{Tab}pa$$word{Enter}
Sleep 5000
SendInput {Tab 10}Some secret question answer{Enter}
>>

Attachments
CintaNotesLoginHelper.zip
(1.71 KiB) Downloaded 4140 times
toddclausen
Moderator
Posts: 111
Joined: Fri Jan 30, 2009 3:28 pm
Contact:

Re: AutoHotKey Script to Execute Embeded Code Within a Note

Postby toddclausen » Sat Mar 21, 2009 4:46 pm

Thanks mgainer007! I'm playing with this now, changed the hotkey to a new preference. Something like this would be great added to CintaNotes as a plug-in especially in the future with encrypted notebooks!
-Todd
mgainer007
Posts: 5
Joined: Sat Feb 21, 2009 6:58 am
Contact:

Re: AutoHotKey Script to Execute Embeded Code Within a Note

Postby mgainer007 » Sat Mar 21, 2009 10:11 pm

toddclausen wrote:Thanks mgainer007! I'm playing with this now, changed the hotkey to a new preference. Something like this would be great added to CintaNotes as a plug-in especially in the future with encrypted notebooks!


I currently keep CintaNotes on a encrypted USB partion. This way I only have a single password I need to remember.
User avatar
CintaNotes Developer
Site Admin
Posts: 4748
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: AutoHotKey Script to Execute Embeded Code Within a Note

Postby CintaNotes Developer » Thu Apr 09, 2009 9:10 am

mgainer007 wrote:AutoHotKey Script to Execute Embeded Code Within a Note


Sorry I've been able to look into this only now. That's very nice indeed! I think later it would be possible to create a special page on the site dedicated to CN+AHK extensions.

mgainer007, thanks for sharing this with everyone!
Alex

Return to “CintaNotes Personal Notes Manager”