Last active
April 2, 2023 19:12
-
-
Save sunkast/0dc83353809b587eaacdcd4c11338ba1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Create text file in documents folder with today's date | |
'Note if you have a recording that crosses into the next day, a new file will be created | |
dim FILENAME = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)+"\RecordingLog"+DateTime.Now.ToString("MMddyyyy")+".txt" | |
'Get recording duration | |
dim xml = API.XML() | |
dim x as new system.xml.xmldocument | |
x.loadxml(xml) | |
dim Duration = integer.parse((x.SelectSingleNode("//recording/@duration").Value)) | |
dim Second = math.floor(Duration mod 60) | |
dim Minute = math.floor((Duration / 60) mod 60) | |
dim Hour = math.floor((Duration / (60 * 60)) mod 60) | |
'Write recording duration to file | |
System.IO.File.AppendAllText(filename, string.format("{0:00}:{1:00}:{2:00}"+" - ", Hour, Minute, Second)) | |
'Write note to file | |
dim myValue as String = Microsoft.VisualBasic.InputBox("Edit Description", "Enter Value", "") | |
System.IO.File.AppendAllText(filename, myValue & Environment.NewLine) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment