Pick out a link based on existing records

  • Автор темы Автор темы gonnacai
  • Дата начала Дата начала

gonnacai

Новичок
Регистрация
09.08.2013
Сообщения
6
Реакции
3
Баллы
1
Dears,

Thanks for creating such great software.

I've a problem and need some help. Here is the problem.

Harvest Result
50 links from website, such as:
www.example.com/article-title-11111.html?abcde
www.example.com/article-title-22222.html?fghij
www.example.com/article-title-33333.html?klmn
www.example.com/article-title-44444.html?opors

11111: 5 random digits
abcde: 5 random digits and letter.

Now, I made a record in a list (22222, 33333)

How to click 22222 link while the harvest result has 22222 link?
How to click 33333 link while the harvest result has 33333 link?
How to do NOT click 22222 link while the harvest result do NOT have 2222 link?

Thank you!
 
Yes, Lightwood, completely right.
 
Yes, Lightwood, completely right.

C#:
Развернуть Свернуть Копировать
List<string> list = new List<string>();
list.AddRange(project.Lists["all"]);
string myString = project.Variables["recipient"].Value;
var matchingvalues = list
.FindAll(x => x.IndexOf(myString, StringComparison.OrdinalIgnoreCase) != -1);
return matchingvalues.First();

Most easy way is to use this C# code.
Get line from the list1 to variable "recipient"
Name of the the second list is "all". You can change that.
In result variable of C# code you will get a link.

Try and let me know.
 
Hello LightWood, thank you so much for your help!

I tested the code but failed. It's my fault, not yours, this is the 1st time I use C# code, and I don't have enough knowledge to learn it :P

And, due to some reasons, the project has switched to another method.

Anyway, thank you!
 
  • Спасибо
Реакции: LightWood
Hello LightWood, thank you so much for your help!

I tested the code but failed. It's my fault, not yours, this is the 1st time I use C# code, and I don't have enough knowledge to learn it :P

And, due to some reasons, the project has switched to another method.

Anyway, thank you!
Welcome
 

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