Refactor
:my
=>
'code'
Codes
Refactorings
Popular
Best
Submit
Spam
Account
Logout
Login
JavaScript doesn't seem to be activated, expect things to be ugly and sloppy!
Learn How to Create Your Own Programming Language
createyourproglang.com
Recent
How to get accepted in Fileice (200% Working) 22/2012
Premium Account
FILE HOSTS PREMIUM ACCOUNT
ALL FILE HOST PREMIUM ACCOUNTS
Zynga Slingo Trainer v5.12
iTunes Gift Card Generator V3.1 2012
Diablo 3 GOLD Coins FREE
Working PS3 Jailbreak 3.65 And 3.66
ExtaBit Premium Accounts and Cookies
Steam Wallet Hack - Money Adder & Hack v3
Popular
XBOX POINTS GENERATOR - MICROSOFT POINTS GENERATOR v1.2012
11 may 2012 premium uploading accounts 100% working
Free Microsoft Points
Free Microsoft Points - Microsoft Points Generator - Xbox Live Codes 2012
Car Town Free Blue Points Hack
Free CarTown Blue Points Generator and CarTown Templates
Better way to get content via jQuery $.get()
Free Microsoft Points
Simple Days Purger
Sharecash Downloader Bypass Surveys New 05/2012
Pastable version of
First LotusScript Agent
<pre class='prettyprint' language='java'>Sub Initialize Dim customername As String Dim servername As String Dim feedname As String Dim alertthresholdinhours As Integer Dim inputfeedpath As String ' Set for each feed customername = "" servername = "" feedname = "" alertthresholdinhours = 6 inputfeedpath = "\*.*" ' Counts files in input folder Dim pathName As String, fileName As String Dim inputfeedcounter As Integer inputfeedcounter = 0 pathName$ = inputfeedpath fileName$ = Dir$(pathName$, 0) Do While fileName$ <> "" inputfeedcounter = inputfeedcounter + 1 fileName$ = Dir$() Loop Dim entry As NotesViewEntry Dim vc As NotesViewEntryCollection Dim filesprocessed As Integer Dim session As New NotesSession Dim db As NotesDatabase Dim newDoc As NotesDocument Dim rtitem As NotesRichTextItem Set db = session.CurrentDatabase Dim view As NotesView Set view = db.GetView( "Sessions\by Feed" ) Set newDoc = New NotesDocument( db ) Set rtitem = New NotesRichTextItem( newDoc, "Body" ) Dim todaysdate As New NotesDateTime("Today") Dim flag As Integer Dim counter As Integer Dim files As Integer Dim errors As Integer Dim lastdate As String Dim lastdayran As String Dim lasttime As String Dim lasttimeran As String Dim filesp As Integer Dim lastdayfiles As Integer Dim lastdaysfiles2 As Integer Dim terrors As Integer Dim lastdayerrors As Integer lastdate = "" lastdayran = "" counter = 0 flag = 0 filesp = 0 lastdayfiles = 0 lastdaysfiles2 = 0 terrors = 0 lastdayerrors = 0 ' Finds date for last time processed, counts files processed and errors While flag = 0 Dim dateTime As New NotesDateTime(todaysdate.DateOnly) Dim keyarray(1) As Variant keyarray(0) = feedname Set keyarray(1) = dateTime Set vc = view.GetAllEntriesByKey(keyarray, False) Set entry = vc.GetFirstEntry If entry Is Nothing Then Call todaysdate.AdjustDay(-1) End If While Not entry Is Nothing files = 0 Forall colval In entry.ColumnValues If counter = 9 Then counter = 0 Elseif counter = 8 Then counter = 9 Elseif counter = 7 Then counter = 8 Elseif counter = 6 Then errors = Cint(colval) counter = 7 Elseif counter = 5 Then counter = 6 Elseif counter = 4 Then files = Cint(colval) counter = 5 Elseif counter = 3 Then counter = 4 Elseif counter = 2 Then counter = 3 lasttime = colval Elseif counter = 1 Then counter = 2 lastdate = colval Elseif counter = 0 Then counter = 1 End If End Forall filesp = filesp + files terrors = terrors + errors Set entry=vc.GetNextEntry (entry) flag = 1 Wend Wend lastdayfiles = filesp lastdayerrors = terrors lastdayran = lastdate lasttimeran = lasttime 'Counts previous files processed filesp = 0 terrors = 0 lastdate = "" flag = 0 Call todaysdate.AdjustDay(-1) While flag = 0 Dim dateTime2 As New NotesDateTime(todaysdate.DateOnly) Dim keyarray2(1) As Variant keyarray2(0) = feedname Set keyarray2(1) = dateTime2 Set vc = view.GetAllEntriesByKey(keyarray2, False) Set entry = vc.GetFirstEntry If entry Is Nothing Then Call todaysdate.AdjustDay(-1) End If While Not entry Is Nothing files = 0 Forall colval In entry.ColumnValues If counter = 9 Then counter = 0 Elseif counter = 8 Then counter = 9 Elseif counter = 7 Then counter = 8 Elseif counter = 6 Then counter = 7 Elseif counter = 5 Then counter = 6 Elseif counter = 4 Then files = Cint(colval) counter = 5 Elseif counter = 3 Then counter = 4 Elseif counter = 2 Then counter = 3 Elseif counter = 1 Then counter = 2 Elseif counter = 0 Then counter = 1 End If End Forall filesp = filesp + files Set entry=vc.GetNextEntry (entry) flag = 1 Wend Wend lastdaysfiles2 = filesp ' Prints line of CSV into body of email Call rtitem.AppendText ( customername ) Call rtitem.AppendText ( ", " ) Call rtitem.AppendText ( servername ) Call rtitem.AppendText ( ", " ) Call rtitem.AppendText ( datetime.timezone ) Call rtitem.AppendText ( ", " ) Call rtitem.AppendText ( lastdayran ) Call rtitem.AppendText ( " " ) Call rtitem.AppendText ( lasttimeran ) Call rtitem.AppendText ( ", " ) Call rtitem.AppendText ( lastdayfiles ) Call rtitem.AppendText ( ", " ) Call rtitem.AppendText ( lastdayerrors ) Call rtitem.AppendText ( ", " ) Call rtitem.AppendText ( lastdaysfiles2 ) Call rtitem.AppendText ( ", " ) Call rtitem.AppendText ( inputfeedcounter ) Call rtitem.AppendText ( ", " ) Call rtitem.AppendText ( alertthresholdinhours ) Call newDoc.Save( False, True ) newDoc.Subject = feedname ' Running from server line should be 'newDoc.SendTo = "" newDoc.SendTo = "" newDoc.Send( False ) End Sub</pre> <a href="http://www.refactormycode.com/codes/789-first-lotusscript-agent" style="color:#fff" title="As seen on RefactorMyCode.com"><img alt="Small_logo" src="http://www.refactormycode.com/images/small_logo.gif" style="border:0" /></a>