Solved

Strikethrough Text Using @Commands

Posted on 2003-10-28
7
1,268 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

  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…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

920 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

15 Experts available now in Live!

Get 1:1 Help Now