Solved

Strikethrough Text Using @Commands

Posted on 2003-10-28
7
1,278 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

  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…
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 …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 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