Copy to clipboard problem - need solution

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

ek3ekytop

Client
Регистрация
09.03.2012
Сообщения
121
Реакции
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
GIF_zpsn7mofz7s.gif


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 !
 
Try this(C#):
Код:
Развернуть Свернуть Копировать
return System.Windows.Forms.Clipboard.GetText();

In C# block use return to variable 8-)
 
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
 
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 ...
 
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.
 
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

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