Thursday, February 12, 2009

LotusScript version of KillNotes

Paste the code below into a button - then you have a simple 'Click to kill' feature :-)
Works in both 7.02 and 8.5....

Sub Click(Source As Button)
Dim a As Variant
a = Split( "", "#" )
a = Arrayappend( a, getData())
End Sub

Function getData() As Variant
Exit Function
End Function

7 comments:

Keith Ryan said...

Just curious, but if Notes is "Stuck", how do I access it to click the button?

:)

Kevin Pettitt said...

What Keith said.

Andy Stewart said...

Yes but what fun you could have sending users an email with a 'Click me' button in.

Anonymous said...

This one is even better. You don't have to wait for the Notes to stuck.

Hans C. Koch said...

"Write me an e-mail, if your e-mail doesn't work".

And by the way, wouldn't it be better, if you executed the nsd.exe with the -kill switch? Then you would also get crash logs... IF you are able to press the button :)

Graham Richards said...

Just click on the large, gray, window with the errors listed, and press Enter. The button is selected by default, even if we can't see it.

Jakob Majkilde said...

Thank you for all the comments :-)

Ofcourse the code example doesn't have any practical use, but:
- It shows the importance of controlling/validating the data in your code. When calling a function that returns a variant - you dont know what you get, so some kind of validation is required before using it
- And, when writing a function, please let it return something meningfull, always! don't just exit the function (like I did in the sample)
- It shows a bug i Lotus Script, so you can avoid it and Lotus can fix it.

 
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.