Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Strikethrough Text Using @Commands

Posted on 2003-10-28
7
Medium Priority
?
1,356 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 1600 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…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month9 days, 16 hours left to enroll

926 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