New
#11
Hi pacman10
I couldn't find any program that did what you wanted, so I wrote a simple script to read a simple text file and display a random line from that file.
You can save this to a file with the extension .wsf and create a shortcut with WScript "Path to the wsf file" anywhere. The data file 'Quotes.txt' must be in the same folder as the .wsf file.Code:<job id="vbs"> <script language="VBScript"> Set objFSO=CreateObject("Scripting.FileSystemObject") Set objReadFile=objFSO.OpenTextFile("Quotes.txt", 1) I=1 Do Until objReadFile.AtEndOfStream Redim Preserve arrData(I) arrData(I)=Replace(objReadFile.ReadLine, "vbCrLf", (CHR(13) & CHR(10))) I=I+1 Loop objReadFile.Close Randomize MyNumber=Int(Rnd()*UBound(arrData))+1 'WScript.Echo MyNumber strContents=arrData(MyNumber) 'WScript.Echo strContents MsgBox strContents, 0, "Quotes" </script> </job>
If you check the data file I've attached you'll find a few lines with vbCrLf. Wherever you add vbCrLf to a line, a line feed [ENTER] will be added.
You can then use Task Scheduler to run the shortcut repetitively.
Task Scheduler - Create New Task
I've attached the files also with this post.