Copy to clipboard problem - need solution

ek3ekytop

Client
Регистрация
09.03.2012
Сообщения
111
Благодарностей
17
Баллы
18
Hi. I'm working on reddit comment poster, but I have a little problem. I need to get the url of my comment after it is been posted. Everything works and even reddit shows that the link is been copied to the clipboard - see this


But nothing is copied at all. It works when i click manually "copy link" I tried to scrape the link from the source code , but it can't be found.
Any idea why the link is not copied to clipboard ? Or how to do it properly?
Thanks in advance !
 

Snowflake

Новичок
Регистрация
15.11.2017
Сообщения
6
Благодарностей
0
Баллы
1
Try this(C#):
Код:
return System.Windows.Forms.Clipboard.GetText();
In C# block use return to variable 8-)
 

ek3ekytop

Client
Регистрация
09.03.2012
Сообщения
111
Благодарностей
17
Баллы
18
Try this(C#):
Код:
return System.Windows.Forms.Clipboard.GetText();
In C# block use return to variable 8-)
Yes, this is what I use to write copied link to text file, but it only works when I click manually. When the script click on it, there no copied data to clipboard. Page showing copied link (as it is in the gif above) but no copied data to clipboard ... Really weird
 

ek3ekytop

Client
Регистрация
09.03.2012
Сообщения
111
Благодарностей
17
Баллы
18
It paste my previously copied text from the clipboard on every loop and create repeating lines in my txt file (if this matters)
I still need a solution. Now I work with the script with a breakpoint to click on "copy link" manually, but it is really annoying ...
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Hi. Thats surely is a problem.
But as workaround there are everything in source.
I can find comment link easy. https://i.imgur.com/sx9VZXf.png
I guess You have to reload page if comment is not found right away after posting.
 

ek3ekytop

Client
Регистрация
09.03.2012
Сообщения
111
Благодарностей
17
Баллы
18
Thank you very much lokiys. I don't know how i miss it the first time when trying to do it. Now after I created RegEx to parse it, the script works just fine ... even no need to reload the page.
Thanks again!
 
  • Спасибо
Реакции: Pierre Paul Jacques

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