- 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
- 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.
- 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.
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.
- 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)
- 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.