Solved

Strikethrough Text Using @Commands

Posted on 2003-10-28
7
1,282 Views
Last Modified: 2013-12-18
Hello everyone...
I would like to create a smarticon that adds a strikethrough to highlighted text.  Can this be done without Lotuscript?  If so, how?
Here is a formula that I use to add a date/time stamp.  I would like to add a strikethrough in place of the textbold command.  Is this possible?  Thanks.

@Command([TextNormal]);
@Command([TextSetFontColor]; [DarkBlue]);
@Command([TextBold]);
@Command([EditInsertText]; @Text("("));
@Command([EditInsertText]; @Text("John Doe"));
@Command([EditInsertText]; @Text(" - "));
@Command([EditInsertText]; @Text(@Now));
@Command([EditInsertText]; @Text(") - "));
@Command([TextBold])
0
Comment
Question by:Aquilon7
  • 3
  • 3
7 Comments
 
LVL 31

Expert Comment

by:qwaletee
ID: 9636836
Sorry, there is @Command([TextStrikethrough])
0
 
LVL 15

Expert Comment

by:Bozzie4
ID: 9636939
And you can't use lotusscript in smarticons.

You could add a Lotusscript agent to "a" database, and then call that agent from you smarticon.

@Command([fileopendatabase] ; "server" : "database" );
@command([toolsrunmacro];"agent)

That agent can contain the lotusscript to do the same stuff (using notesrichtextstyle ... see the help for examples)

cheers,

Tom
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9637410
Why is that you want this only on smarticons, can't it be done in a database as an action ?

~Hemanth
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 31

Expert Comment

by:qwaletee
ID: 9637469
Oops, I left out "no" -- there is no such @Command.

Bozzie's suggestion will NOT work, as NotesRichTextStyle in LotusScript is only good for switching styles for the next bit of text to be added to the rich text field.
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 400 total points
ID: 9637480
If you can do it from action button then I have a simple soln.

Download the sendkeys script library from this location

http://www.notesdesign.com/ndhtml/ndsendky.htm

In the script libraries copy SendKeys Library and paste it into your db.

Create an agent called Strikethrough, set to run Manually from agent list. Here is the script to simulate strikethrough

' (Declarations)
Use "SendKeys Library"

' Initialize event
Sub Initialize
      PushKeys "%TK"      
End Sub

Save the agent.

Now, Create an action where you will set the field value to this formula

@Command([TextNormal]);
@Command([TextSetFontColor]; [DarkBlue]);
@Command([TextBold]);
@Command([EditInsertText]; @Text("("));
@Command([EditInsertText]; @Text("John Doe"));
@Command([EditInsertText]; @Text(" - "));
@Command([EditInsertText]; @Text(@Now));
@Command([EditInsertText]; @Text(") - "));
@Command([EditSelectAll]);
@PostedCommand([ToolsRunMacro]; "(Strikethrough)")


0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9638355
Hemanth,

Or to keep it simple, just a smarticon that executes an external sendKeys program (e.g., a simple VB app), via @Command([Execute]; ... )
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9638494
I have a C API alternative too. When Aquilon asks for it I will give that one... so till then keeping it very simple.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question