PermaLink OK, It is not Thursday, but Rocky pushed me into this...02/24/2006 02:41 PM
Category : Show-n-Tell Thursday
Location : Cincinnati, Ohio, USA
Technorati tags: , ,

Rocky did a post about an agent to fix the issues from in Technote 1229918, that Katherine Emlong had asked him to do. Rocky, of course, used the very geeky and kewl NotesStream class to handle the file I/O. He asked me to look at it and I asked "Why use NotesStream?" He said "It ROCKS?" I said, "Yeah, but it is not backward compatible to the folks this agent is supposed to help?" He said "Right, so why don't you.... " It was right about then I knew I was being conned.....

So I rewrote the agent to use LotusScript files...

I borrowed his stuff and reworked the main part of the code to use files. The whole thing is here.

The basic deal is to read the keyview.ini file and write it back out to a new file that cna then be copied back over the keyviewfile.ini. And, yeah, I added some style stuff to the way I did it so that someone coming along behind me might be able to see what was done and why.
fileInfo = Dir$(outfilename) If Not (fileInfo = "") Then rslt = Msgbox ("keyviewFixed.ini found in Notes Excutable Directory." & Chr(10) & getNotesProgramDirectory() & Chr(10) & "Overwrite it?", 16 + 4 ) If rslt <> 6 Then Exit Sub Kill outfilename End If
inpFile = Freefile Open fileName For Input As inpFile outFile = Freefile Open outFileName For Output As outFile While Not Eof(inpFile) Line Input #inpFile, fileBuffer Forall d In dlls dllpos = Instr(Lcase(fileBuffer), Lcase(d)) If dllpos > 0 Then If Left(fileBuffer, 1) <> ";" And Left(fileBuffer, 1) <> "*" Then ' if it is already commented out, don't do it again fileBuffer = "; " & fileBuffer Print #outFile, "; The next line was commented out by an agent fixing Technote 1229918," changes = changes + 1 End If End If End Forall Print #outFile, fileBuffer Wend Close #inpFile, #outFIle
Then at the end I add some cleanup stuff:
If changes = 0 Then Kill outfileName Msgbox ("No changes were made. You are proteted from the issues of the technote.") Else Kill filename Filecopy outfileName, fileName Kill outfileName Msgbox (changes & " were made to the keyview.ini file. You are now proteted from the issues of the technote.") End If getOut: Exit Sub
This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at nsftools.com.

This page has been accessed 343 times. .
Comments :v

1. Rock02/24/2006 04:44:50 PM
Homepage: http://www.lotusgeek.com


Well, not really. This fix is specifically for 6.x (less than 6.5.5) and 7.x (less than 7.0.1). R5 isn't affected. So, my code technically works for the target audience; however you're right in that if we had a need to do this for the R5 folks, my solution wouldn't work - yours would.

But hey, at least I got you to post

Rock




2. Newbs02/28/2006 12:19:45 PM
Homepage: http://www.henrynewberry.com


Fixed the download link, sorry about that.




Post a comment ^


Email addresses provided are not made available on this site.





You can use UUB Code in your posts.

[b]bold[/b]  [i]italic[/i]  [u]underline[/u]  [s]strikethrough[/s]

URL's will be automatically converted to Links


:-x :cry: :laugh: :cool: :-( :huh: :rolleyes: :grin: :-p :angry: :-D ;-) :-) :-\ :lips: :emb: :-o
bold italic underline Strikethrough





Remember me    

Add Manual Trackback
Please enter the details of the trackback post. Your trackback will not appear on the site until it has been verified. This won't be immediate, as trackbacks are validated on a scheduled basis. Be patient.











Useful Links
Contact Me
Calendar
February 2012
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Planet Lotus
By Category
The BlogRoll
Monthly Archive
Lotus Domino ND6 RSS News Feed RSS Comments Feed RSS Validator Blog Admin Lotus Geek Open Notes Picture Database OpenNTF CoComment Integrated BlogSphere
Powered by
Blogsphere