mismille 2 Posted September 24, 2019 Posted September 24, 2019 Within the Windows desktop application, I'm looking for an easy way to hit a command/button to create multiple notes that then are inserted into multiple notebooks. Does anyone have any suggestions on how this might be accomplished? More specifically, I would like to create 4 notes at the beginning of each day so that it has the current date and that have a title formatted as listed below and placed each in their corresponding notebooks: Title = "YYYY-MM-DD - Work - Journal" / Notebook = "Work - Journal" Title = "YYYY-MM-DD - Work - To Do" / Notebook = "Work - TO DO" Title = "YYYY-MM-DD - Personal - Journal" / Notebook = "Personal - Journal" Title = "YYYY-MM-DD - Personal - To Do" / Notebook = "Personal - TO DO" The body would initially be set to be blank. Thanks
Level 5* JMichaelTX 4,119 Posted September 24, 2019 Level 5* Posted September 24, 2019 You might take a look at Evernote Windows ENScript . This would provide you with the Windows command line tool to create the Notes, so then all you need is a method to schedule it. I'm sure Windows has tools to do that.
Don Dz 166 Posted September 24, 2019 Posted September 24, 2019 Some of us like to use the free macro program AutoHotkey for such tasks, it can handle that easily.
Level 5* jefito 5,598 Posted September 24, 2019 Level 5* Posted September 24, 2019 A simple PowerShell + ENScript solution: # You may need to modify this according to the location of ENScript.exe $ENscript = "C:\Program Files (x86)\Evernote\Evernote\ENScript.exe" # Create an empty file for input into ENScript command $out_file = "blank.txt" $pre_file = "" $pre_file | out-File $out_file -encoding ASCII # Get the System date and format it to the Evernote expected format $CurDate = Get-Date -Format "yyyy-MM-dd" # Create notes... $Notebook = "Work - Journal" $NoteTitle = '"' + $CurDate + " - " + $Notebook + '"' # DEBUG: write notebook and title to console #Write-Host "NoteTitle = " $NoteTitle " Notebook = " $Notebook & $ENscript createNote /i $NoteTitle /n $Notebook /s blank.txt $Notebook = "Work - TO DO" $NoteTitle = '"' + $CurDate + " - " + $Notebook + '"' & $ENscript createNote /i $NoteTitle /n $Notebook /s blank.txt $Notebook = "Personal - TO DO" $NoteTitle = '"' + $CurDate + " - " + $Notebook + '"' & $ENscript createNote /i $NoteTitle /n $Notebook /s blank.txt $Notebook = "Personal - Notebook" $NoteTitle = '"' + $CurDate + " - " + $Notebook + '"' & $ENscript createNote /i $NoteTitle /n $Notebook /s blank.txt #TODO: delete blank.txt if desired #EXTRACREDIT: Make an array of notebook names so you can use a loop to create # each note title and the associated note Not particularly elegant. I am not an expert PowerShell programmer.
Level 5* JMichaelTX 4,119 Posted September 24, 2019 Level 5* Posted September 24, 2019 16 minutes ago, jefito said: A simple PowerShell + ENScript solution: Looks great, Jeff. I wish I still had a Windows machine to test it. Any ideas on how to schedule execution of this script on a daily basis? For those, like me, unfamiliar with PowerShell, this provides a good intro and summary:PowerShell Commands Cheat Sheet
mismille 2 Posted September 25, 2019 Author Posted September 25, 2019 8 hours ago, jefito said: A simple PowerShell + ENScript solution: # You may need to modify this according to the location of ENScript.exe $ENscript = "C:\Program Files (x86)\Evernote\Evernote\ENScript.exe" # Create an empty file for input into ENScript command $out_file = "blank.txt" $pre_file = "" $pre_file | out-File $out_file -encoding ASCII # Get the System date and format it to the Evernote expected format $CurDate = Get-Date -Format "yyyy-MM-dd" # Create notes... $Notebook = "Work - Journal" $NoteTitle = '"' + $CurDate + " - " + $Notebook + '"' # DEBUG: write notebook and title to console #Write-Host "NoteTitle = " $NoteTitle " Notebook = " $Notebook & $ENscript createNote /i $NoteTitle /n $Notebook /s blank.txt $Notebook = "Work - TO DO" $NoteTitle = '"' + $CurDate + " - " + $Notebook + '"' & $ENscript createNote /i $NoteTitle /n $Notebook /s blank.txt $Notebook = "Personal - TO DO" $NoteTitle = '"' + $CurDate + " - " + $Notebook + '"' & $ENscript createNote /i $NoteTitle /n $Notebook /s blank.txt $Notebook = "Personal - Notebook" $NoteTitle = '"' + $CurDate + " - " + $Notebook + '"' & $ENscript createNote /i $NoteTitle /n $Notebook /s blank.txt #TODO: delete blank.txt if desired #EXTRACREDIT: Make an array of notebook names so you can use a loop to create # each note title and the associated note Not particularly elegant. I am not an expert PowerShell programmer. jefito, Many thanks...this works perfectly and will speed up my morning routine tremendously.
Level 5* jefito 5,598 Posted September 25, 2019 Level 5* Posted September 25, 2019 5 hours ago, mismille said: jefito, Many thanks...this works perfectly and will speed up my morning routine tremendously. You're welcome. You could probably use Windows Task Scheduler to automate the whole thing.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.