Hello,
Mouser asked me an addnote tool for his Farr tool...
Here's the beast that can be compiled there :
http://gedd123.free..../studio/fbsl2exe.php' // ------------------------------------------------------------------
' // Addnote -clip|-timestamp|-top YOURMESSAGE_UNDERSCORES_MEAN_CRLF :)
' // ------------------------------------------------------------------
Dim $szCmd1, $szCmdFull, %fp, $szTemp
Begin Const
file = ".\addnote.txt"
sepa = "------------------------------------"
End Const
If STANDALONE = TRUE Then
szCmd1 = LCase(Command(1))
szCmdFull = Remove(Command(-1), szCmd1)
szCmdFull = Replace(szCmdFull, "_", CRLF)
szCmdFull = Trim(szCmdFull)
szCmdFull = Replace(szCmdFull, ch34 & ch34, "")
If Left(szCmdFull, 1) = ch34 AndAlso Right(szCmdFull, 1) = ch34 Then szCmdFull = Mid(szCmdFull, 2, StrLen(szCmdFull) - 2)
szCmdFull = Trim(szCmdFull)
If StrLen(szCmdFull) = 0 Then ExitProgram(-1)
Select Case szCmd1
Case "-clip"
fp = FileOpen(file, APPEND)
FilePrint(fp, szCmdFull)
FilePrint(fp, sepa)
ClipboardSetText(szCmdFull)
FileClose(fp)
Case "-timestamp"
'March 12, 2006 - 19:35:27 PM
fp = FileOpen(file, APPEND)
FilePrint(fp, GetMonth(Time(6)) & " " & Time(7) & ", " & Time(5) & " - " & _
Time(1) & ":" & Time(2) & ":" & Time(3) & " " & Time(4))
FilePrint(fp, szCmdFull)
FilePrint(fp, sepa)
FileClose(fp)
Case "-top"
fp = FileOpen(file, BINARY_INPUT)
szTemp = FileGet(fp, FileLen(file))
FileClose(fp)
fp = FileOpen(file, OUTPUT)
FilePrint(fp, szCmdFull)
FilePrint(fp, sepa)
FilePrint(fp, szTemp)
FileClose(fp)
End Select
End If
Function $GetMonth(ByVal %iMonth)
Select Case iMonth
Case 1
Return "January"
Case 2
Return "February"
Case 3
Return "March"
Case 4
Return "April"
Case 5
Return "May"
Case 6
Return "June"
Case 7
Return "July"
Case 8
Return "August"
Case 9
Return "September"
Case 10
Return "October"
Case 11
Return "November"
Case 12
Return "December"
End Select
End Function
So mouser?