Weird Problem, How To Solve?

mark leenheer

Client
Регистрация
29.01.2012
Сообщения
156
Благодарностей
6
Баллы
0
Weird Problem With Tumblr Can't Add Post, How To Solve?

This is probably something easy I am missing but I can not seen to find an answer so here goes.

After I click the html button on the editor I can follow up with KB emulation and enter the post fine
without specifying any field value, it's in the right place already but this takes too long.

Can I somehow just dump in my content from a variable where the mouse is positioned and NOT according to any
field data because it's hidden, or missing and I can't find anything that works.

This, is what I need to do;
Untitled.jpg


Geesh I've spent a few hours trying to figure this out and am not sure what to try next, anyone have any ideas?
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
831
Баллы
113
that's how I do that with tumblr. fast copy paste from a variable articleText

JavaScript:
Emulator.ActiveWindow(instance.FormTitle);
System.Windows.Forms.Clipboard.SetText(project.Variables["articleText"].Value);
System.Windows.Forms.SendKeys.SendWait("^v");
 
  • Спасибо
Реакции: mark leenheer

mark leenheer

Client
Регистрация
29.01.2012
Сообщения
156
Благодарностей
6
Баллы
0
Awesome! Thank You, I would have NEVER figured that out!
 

hogarinho

Client
Регистрация
16.11.2011
Сообщения
14
Благодарностей
0
Баллы
0
Hey Bulldozer,

Where do I put that code?

Please help!
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 180
Баллы
113

hogarinho

Client
Регистрация
16.11.2011
Сообщения
14
Благодарностей
0
Баллы
0
Hey thanks for the quick response.

But,now I get this error when I run the template:

"Error in action "CS0234" "The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an assembly reference?)" в строке "System.Windows.Forms.SendKeys.SendWait("^v");""
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 180
Баллы
113
JavaScript:
string newTheme = project.Variables["article"].Value;
lock(SyncObjects.InputSyncer)

{

       System.Windows.Forms.Clipboard.SetText(article);
       Emulator.ActiveWindow(instance.FormTitle);
       System.Windows.Forms.SendKeys.SendWait("^v");

}


Not sure about HB code but this code working fine.
 
  • Спасибо
Реакции: hogarinho

nevadahsot

Client
Регистрация
27.04.2012
Сообщения
106
Благодарностей
5
Баллы
18
found one
 

Вложения

  • 35,2 КБ Просмотры: 739

convict29

Пользователь
Регистрация
10.07.2014
Сообщения
114
Благодарностей
3
Баллы
18
Hey i got the same issue, i do this:
  1. Emulator.ActiveWindow(instance.FormTitle);
  2. System.Windows.Forms.Clipboard.SetText(project.Variables["articleText"].Value);
  3. System.Windows.Forms.SendKeys.SendWait("^v");
And what is pasting, is just an OK out of nowhere.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 706
Баллы
113
It's not good idea to try clipboard for instances. Fill forms with standard actions.
 

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