Attachments in hotmail

Mankush

Client
Регистрация
31.10.2011
Сообщения
189
Благодарностей
17
Баллы
28
Hi guys. I`m currently trying to do a routine in which I can attach a jpg into hotmail email before sending.
Some times it works, sometimes it does not.
What I have found is that the match number of the href regex changes from 14 to 15 to 16 to 17 to 18 in a random fashion.

Is there a way to solve this without using "if"? is there a way to do this with just one step?
 

Вложения

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
You can create a loop with increasing of variable (14-18-) and use it as match number. If step of adding photo fails, loop continues.
 
  • Спасибо
Реакции: Mankush

zon3d

Client
Регистрация
22.03.2012
Сообщения
29
Благодарностей
1
Баллы
3
Or simply get rid of the first match condition (use the delete key) and just use the condition that looks for an anchor with innertext as "Attachments".
 
  • Спасибо
Реакции: Mankush

Mankush

Client
Регистрация
31.10.2011
Сообщения
189
Благодарностей
17
Баллы
28
Thank you zon3d, I have tried that, but it does not yield the results I`m looking for.
However, I will use this nifty trick in future cases : )
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)