--[[ Notecase Pro script (requires Notecase Pro >= 3.3.3) Description: Clones all notes in the List Pane and stores the clones in the clipboard Rights: This script's author, Paul Merrell, hereby waives all copyright and related or neighboring rights to this script, pursuant to the Creative Commons CC0 Universal relinquishment of rights found at http://creativecommons.org/publicdomain/zero/1.0/ --]] -- make sure app version supports necessary scriptable program commands nMaj, nMin, nRev = Nc_Config_GetAppVersion() if (nMaj < 3 or (nMaj == 1 and nMin < 1) or (nMaj == 3 and nMin == 3 and nRev < 3)) then Nc_GUI_MessageBox("ERROR: Script requires NcPro version >= 3.3.3") return end -- get and store current document ID as variable nDocID nDocID = Nc_Doc_ID_GetCur() -- create empty strCloneListvariable strCloneList = "" -- get and store count of listed notes as variable nListCount nListCount = Nc_App_List_GetCount() -- for each note in the List Pane for i=1,nListCount do -- get info on the note (note indexes start from 0) strNoteID = Nc_App_List_Note_GetID(i-1) strNoteTitle = Nc_Note_Title_Get(nDocID, strNoteID) -- create clone and append it to variable strCloneList strCloneList = strCloneList .. "
" .. strNoteTitle .. "
\n" strCloneList = strCloneList .. "\n" end -- write links to clipboard Nc_Env_Clipboard_Set(strCloneList, 1)