Create a Lua script file and assign a keyboard shortcut to it

  • Open the example script page and copy the contents of the sample script.

  • Paste the contents into an empty text file, using a text editor

    Screenshot of notepad with timestamp.lua script

  • Save the file as "timestamp.lua" in your new "Scripts" folder. Take care to choose "All files" as file type, otherwise the text editor may append ".txt" to the file name.

    Screenshot of editor's Save As options

  • In NoteCase Pro, use the "Scripts" / "Execute File" menu item, pick "timestamp.lua" and let the script append the timestamp at the end of the current note.

    Screenshot of timestamp appended to note


Assign a keyboard shortcut

Now, you may want to make it easier to append a time stamp to your notes. Assign the script to a keyboard shortcut:

  • Use NoteCase Pro's menu "Scripts" / "Register Scripts" to open the script registration dialog

  • Click the "+" button to add a script

  • Choose your timestamp.lua script

  • Close the dialog with the "X" button. Now your script is registered, appears directly in the Scripts menu and can be easily launched from there.

    Screenshot of script menu with registered script

  • Open "Tools" / "Shortcut Settings"

  • Choose from the "Context" dropdown the entry "Scripts and Plugins" to list the registered scripts and plugin

  • Select "timestamp.lua"

  • Then hit the desired shortcut, e.g. [Ctrl]-[.] (Ctrl and the dot)

    Screenshot of shortcuts dialog

  • Close the shortcuts dialog using the "OK" button.

Now you can easily append a timestamp to the current note by hitting [Ctrl]-[.]


Next, in preparation for the next tutorial, please delete the shortcut assignment again.
Also, remove the script registration.

Then, you may proceed with the next tutorial: Create an embedded script file.

You may also directly proceed with the Plugin Creation Tutorial, in order to learn, how you can easily generate a Plugin from your Lua scripts.