How to edit Theme in Tumblr

mikelac

Client
Регистрация
16.08.2011
Сообщения
26
Благодарностей
0
Баллы
1
I'm puzzled on this one. Something that should be so simple to do.

I've created a Tumblr Account maker. Everything works great. But, I want to change the Theme to a Custom one. I go and edit the theme. Zennoposter puts the cursor inside the text area that contains the html code. Now, I want Zennoposter to select all of the text and clear it out. Just a simple Ctrl-A. Then a backspace. Can not figure out how to simply select all of the text and clear it out. Once the text is cleared, then I want to paste my html code in. How can I paste the text in without using keyboard emulation? Keyboard emulation would take a long time to enter in 100 lines of HTML code.

I've tried everything in the Action designer to try and accomplish this with no luck.

Why is it so difficult to try and do simple things such as select all, copy and paste in Zennoposter? It would be soooo nice if Zennoposter would be able to select all text, copy that text to a variable, and simply paste text from a variable.
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
835
Баллы
113
You can take outtertext of the textarea (to copy text), then fill it in with your value. Do this in projectsettings: http://clip2net.com/s/2AZkK
 
  • Спасибо
Реакции: mikelac

mikelac

Client
Регистрация
16.08.2011
Сообщения
26
Благодарностей
0
Баллы
1
Thanks for the reply!

However, I have been trying that with zero success.

I can provide you with Account details for a Tumblr Account and see if you can do it. Or you can create an Account and try it.

It is very simple to do manually. Ctrl-A, Backspace, Ctrl-V, Done. If Zennoposter would easily emulate the Ctrl-A and Ctrl-V, I would have no problems easily accomplishing this.

Thanks! :-)
 

mikelac

Client
Регистрация
16.08.2011
Сообщения
26
Благодарностей
0
Баллы
1
I've spent a long time on this already and am extremely frustrated.

I want to create hundreds of Tumblr accounts. But I need to go into the Customize Theme part. Click on customize html. Select all of the html code and clear it out. Then paste my own html code in. It will take me a long time if I have to do it one by one. Everything else about my Tumblr Account Creator works perfectly.

I've tried setting my own value using outertext with no luck. I must be doing something wrong.

Here is a feature request that would have saved me a lot of frustration. Emulate the Ctrl-A, Ctrl-C, and Ctrl-V. So, I could just use the Search by picture and get the cursor inside the text box. Then use Ctrl-A emulation to select all text inside box, then use Ctrl-C to copy that text to a variable, then use Ctrl-V to paste text from a variable. I'm surprised that ZP can not do this.
 

mikelac

Client
Регистрация
16.08.2011
Сообщения
26
Благодарностей
0
Баллы
1
It has been 3 days now since I posted this thread and still no solution.

I'm currently in the process of creating 330 Tumblr Accounts. 12 down and 318 to go!

I have it set up so that a Javascript alert box tells me when the Theme is ready for editing. I then go into the instance and do a "Ctrl-A". Then click the OK button in the Alert box so that Zennoposter can continue. If only Zennoposter could do the "Ctrl-A", I wouldn't have to manually do this one by one. I just need it to select all text. That is it! That is all I want to do! But here I am stuck in front of my Computer because I have to select all text for Zennoposter myself using the Ctrl-A buttons for every one of the 330 Accounts that I am trying to create.

I've tried setting my own text using outertext with zero luck. Tried everything in the actions designer to accomplish this with zero luck. There must be something that I am not doing right.

Please help before I go nuts! :-)
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
This part is hard coded.
I dont thinks it's any close to be easy for ZP)
Zennoposter cannot emulate Ctrl+A or Ctrl+V at this moment :-)

 
  • Спасибо
Реакции: mikelac

drvosjeca

Client
Регистрация
26.10.2011
Сообщения
512
Благодарностей
455
Баллы
63
CTRL+A, CTRL+V or not...who cares, problem can be solved even without that :D
 
  • Спасибо
Реакции: Kepperbes и mikelac

mikelac

Client
Регистрация
16.08.2011
Сообщения
26
Благодарностей
0
Баллы
1
Thanks for the replies rostonix and drvosjeca!

Rostonix, I want to thank you for all of the posts that you make on this Forum helping myself and many others. I have certainly learned a lot from your many helpful posts! :az:

Drvosjeca, I have learned a lot from you as well from your posts and especially your many videos! I certainly appreciate your efforts. :D

But this issue has me stumped beyond belief. I've spend a long time on this trying to figure it out. I give up. Guess I can not do this without having to press Ctrl-A myself with each and every Tumblr Account that I create.

Is Zennoposter going to eventually have the option to emulate Ctr-A and Ctrl-C? I'm amazed that a complex Software like Zennoposter can't do something as simple as selecting all text in a textbox. :confused:
 

drvosjeca

Client
Регистрация
26.10.2011
Сообщения
512
Благодарностей
455
Баллы
63
why dont you make temporary solution like i would make in this case...

1. Emulate Click in HTML CODE field
2. Use keystrokes emulation for RIGHT and BACKSPACE to delete some crap of content
3. Use Get to grab the code from field
4. Use IF to see if string you get is empty
5. If string is not empty, LOOP back to keystrokes emulation where you go right and backspace again


PS: make sure to make all keystrokes settings to fast because even on fast way it is going to last, but you wont have to do it manualy :-)


Not most elegant, but working method!
 
  • Спасибо
Реакции: mikelac

mikelac

Client
Регистрация
16.08.2011
Сообщения
26
Благодарностей
0
Баллы
1
I'll have to give that a try. :-)

One thing that does work is putting the cursor inside the text box right before the <html>. Then scroll all the way to the end and right click after the </html>. This selects all of the text. It requires 38 clicks on the scrollbar to get to the end of the code. I used the search by picture to click on the scrollbar. Used a loop to do that 38 times. Problem is, sometimes it worked and sometimes the template crashed because it failed to find the picture for some reason. Not only that, but it is painfully slow clicking on the scrollbar 38 times.
 
Регистрация
01.02.2011
Сообщения
99
Благодарностей
15
Баллы
0
If Zennoposter would easily emulate the Ctrl-A and Ctrl-V, I would have no problems easily accomplishing this.
You can use Ctrl-A in ZP, Ctrl-A & Ctrl-V are system clipboard functions, not browser/firefox functions, so you can bridge from your system to the site with a simple python script run as .bat file (python can access & control 99.9999% of system resources with std library).

Pythons got a few libraries for playing with clipboards, so i'd assume c# does as well, so you could google up a simple c# recipe for a macro that could pass clipboard data to a variable & run http verbs thru HTTP GET & POST actions as another option?
 
  • Спасибо
Реакции: mikelac

darkdiver

Administrator
Команда форума
Регистрация
13.01.2009
Сообщения
2 285
Благодарностей
2 731
Баллы
113
starting from version 4.3.7.1 you can use this approach
[xcode=c#]
// reading new variable with the theme content
string newTheme = project.Variables["newTheme"].Value;
lock(SyncObjects.InputSyncer)
{
// filling the clipboard with the required text
if (Global.Variables.IsProjectMaker)
{
var th2 = new System.Threading.Thread((System.Threading.ParameterizedThreadStart) delegate { System.Windows.Forms.Clipboard.SetText(newTheme); });
th2.SetApartmentState(System.Threading.ApartmentState.STA);
th2.Start();
th2.Join();
}
else
{
System.Windows.Forms.Clipboard.SetText(newTheme);
}
// click in the theme editor area (coords x = 100; y = 100)
Emulator.MouseClick(instance.ActiveTab.Handle, MouseButton.Left, MouseButtonEvent.Click, 100, 100);
// activate window
Emulator.ActiveWindow(instance.FormTitle);
// sending Ctrl+A Delete Ctrl+V
System.Windows.Forms.SendKeys.SendWait("^a{DEL}^v");
}
[/code]
Sample project is attached.
 

Вложения

Kepperbes

Client
Регистрация
19.12.2011
Сообщения
247
Благодарностей
81
Баллы
28
You can use Ctrl-A in ZP, Ctrl-A & Ctrl-V are system clipboard functions, not browser/firefox functions, so you can bridge from your system to the site with a simple python script run as .bat file (python can access & control 99.9999% of system resources with std library).

Pythons got a few libraries for playing with clipboards, so i'd assume c# does as well, so you could google up a simple c# recipe for a macro that could pass clipboard data to a variable & run http verbs thru HTTP GET & POST actions as another option?
Good post :^).
 

mikelac

Client
Регистрация
16.08.2011
Сообщения
26
Благодарностей
0
Баллы
1
starting from version 4.3.7.1 you can use this approach
[xcode=c#]
// reading new variable with the theme content
string newTheme = project.Variables["newTheme"].Value;
lock(SyncObjects.InputSyncer)
{
// filling the clipboard with the required text
if (Global.Variables.IsProjectMaker)
{
var th2 = new System.Threading.Thread((System.Threading.ParameterizedThreadStart) delegate { System.Windows.Forms.Clipboard.SetText(newTheme); });
th2.SetApartmentState(System.Threading.ApartmentState.STA);
th2.Start();
th2.Join();
}
else
{
System.Windows.Forms.Clipboard.SetText(newTheme);
}
// click in the theme editor area (coords x = 100; y = 100)
Emulator.MouseClick(instance.ActiveTab.Handle, MouseButton.Left, MouseButtonEvent.Click, 100, 100);
// activate window
Emulator.ActiveWindow(instance.FormTitle);
// sending Ctrl+A Delete Ctrl+V
System.Windows.Forms.SendKeys.SendWait("^a{DEL}^v");
}
[/code]
Sample project is attached.
Thanks for the reply! :-)

I'll have to give that a try. Just typing this reply approx. 1 minute after reading your post, so haven't tried it out yet. I will give it a try later today.

Thanks again! :az:
 

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