Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rich text string
#1
Hello there,

I have this simple code:

Function teste
Code:
Copy      Help
str s
s= "Hello there[]Test!"
run s.from("mailto:test@test.com?subject=Envio%20de%20indisponibilidade" "&body=" s)

I want to make the "Hello there" part bold when it creates the e-mail.
Can I do that?

Thank you very much!
#2
Need to wait for email message window, select the text, and click 'Bold' button or menu item, or maybe Ctrl+B works in your email program.
#3
example with Thunderbird
Macro Macro2132
Code:
Copy      Help
str s
s= "Hello there[]Test!"
run s.from("mailto:test@test.com?subject=Envio%20de%20indisponibilidade" "&body=" s)
int w1=wait(60 WA win("Write: Envio de indisponibilidade" "Mozilla*WindowClass" "" 0x4))
'SE Cb          ;; Shift+End Ctrl+B
'EY             ;; End Enter
#4
I don't know if Mozilla accepts RTF directly but this works to an RTF window:

Function SetRtf
Code:
Copy      Help
_s=
;{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
;{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\b\f0\fs22 Test \b0 not bold \par
;\ul underlined \ulnone not underlined \par
;\i italicized \i0 not italicized}


;;;some RTF scraped from WordPad editor


_s=
;{\rtf1\Bold Test \b0 not bold \par \ul underlined \ul0 not underlined \par \i italicized \i0 not italicized}

;;;simplified to minimum necessary for insert i.e. will take pre-existing other RTF features e.g.  fonttype/fontsize

int w=win("Document - WordPad" "WordPadClass")
int c=id(59648 w) ;;editable text 'Rich Text Window'
act c
_s.setsel("Rich Text Format" c)
#5
It's my "mailto" opens Outlook. So it had to be done on Outlook.

But thanks for your help man!


Forum Jump:


Users browsing this thread: 1 Guest(s)