Solved

Strikethrough Text Using @Commands

Posted on 2003-10-28
7
1,259 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
Comment Utility
Sorry, there is @Command([TextStrikethrough])
0
 
LVL 15

Expert Comment

by:Bozzie4
Comment Utility
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
Comment Utility
Why is that you want this only on smarticons, can't it be done in a database as an action ?

~Hemanth
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now