Howto make a kind of lookup table

xavmd

New member
Hi, On receiving SMS I want to send an email to the sender.
Email, so sender are few less than ten and all in Contact.
When SMS arrive (Trigger) I want to look for the email address and paste it In Message (using UI)
How can that be done.
Thanks.
 

Dimlos

Well-known member
I made a macro that acquires a phone number when receiving an SMS, searches the contact book based on the phone number, acquires an email address, and sends an email. Please try it.
 

Attachments

  • Macro.jpg
    Macro.jpg
    667 KB · Views: 18
  • SMS_to_Search_Address.macro
    6.9 KB · Views: 10

xavmd

New member
I Dimlos I am very happy with macro . Now I come back because I would like to extract the phone number out of contact knowing Name as it appear in Whatsapp notification {not_title}. I try my best to do that extraction but my little competence and the lack of doc about Contacts Task plugin makes me helpless.
Can someone point me to a document or the best do the macro for me.
Thanks.
 

Dimlos

Well-known member
If you want to search for a phone number by name, I think it would be something like this.
 

Attachments

  • ContactsTask.jpg
    ContactsTask.jpg
    127.4 KB · Views: 8
  • Variables.jpg
    Variables.jpg
    230.7 KB · Views: 7

xavmd

New member
@ Dimlos thank for reply . I grab name from a Whatsapp Notif ( not_title for fiirsname and family name) I assume that search_result will contain data about that name picked out of contacts. I have a lv SenderName fill up with not_title that is all, nothing into lv search_result .
Even if I get a reuslt, hard thing is to make regex exp to extract the phone number. The one give me before is impressive!
Could you please go thru thid help. thanks
 

Dimlos

Well-known member
@xavmd
I am sorry, but WhatsApp is not widely used in my country and I do not have an account.
Also, I could not build it as a macro because I expect the format of phone numbers to be different in different countries.

If you provide such information with your personal information hidden, someone might be able to help you.
 

xavmd

New member
@ Dimlos Thank to help. Finaly after numerous test I manage to make Contacts Task doing my goal:
MD search contacts Action, search criter %myvar for name then Phone list to var search_result
then MD text manipulation Action: Extract text({lv=search_result},([+][0-9-()]+) save to var phone
 
Top