uploading file via flash button

ala

Пользователь
Регистрация
15.10.2012
Сообщения
33
Благодарностей
0
Баллы
6
Most document sharing website have flash button to upload doc, which is not supported by ZP MP, what if more site use this type of security?
example: scribd, crocko, crockodoc, ...

ZP ML can open a windows popup window (click image or reg exp) but not can send a variables

imacros(free edition) succesfull load documents via this kind of button...

ala
 

arve_lek

Client
Регистрация
05.06.2012
Сообщения
14
Благодарностей
2
Баллы
3
definitely +1
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
834
Баллы
113
Need a list of such sites for tests
 

peter

Пользователь
Регистрация
07.01.2012
Сообщения
40
Благодарностей
2
Баллы
8
+1

a show-stopper for us too...

Example sites (video upload):
zie.nl
wat.tv
 

peter

Пользователь
Регистрация
07.01.2012
Сообщения
40
Благодарностей
2
Баллы
8
+1

a show-stopper for us too...

Example sites (video upload):
zie.nl
wat.tv
 

arve_lek

Client
Регистрация
05.06.2012
Сообщения
14
Благодарностей
2
Баллы
3
Is this feature will be in the next update?
 

darkdiver

Administrator
Команда форума
Регистрация
13.01.2009
Сообщения
2 285
Благодарностей
2 730
Баллы
113
starting from v4.3.7.1 you can use this approach.
The project sample is attached.
With image click it will work properly only in Lite verison
The proper multithreading project should contain flash button click in C# code. Look the FlashButtonMultiThreaded.xmlz
Unfortuntely this solution depends on your system settings. But it works.
 

Вложения

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
834
Баллы
113
starting from v4.3.7.1 you can use this approach.
The project sample is attached. Unfortuntely this solution depends on your system settings. But it works.
Just tried. Works like a charm. For coordinates finding I suggest to use Pixel Ruller
Also pay attention that uploader window/buttons can have diffirent names in firefox/chrome/etc and ProjectMaker, so call it the same way it is called in Zenno. The same with coordinates.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Getting - Результат: Window not found

Changed variable caption to ''Select files(s) to upload by demo.swfupload.org''
And button text to - Save

Not sure what i need to do with this ruler. Do i need to capture x;y coordinates.
If yes then i'm not sure i'm doing that right because i can get different coordinates with your suggested ruler...

Thanks
 

darkdiver

Administrator
Команда форума
Регистрация
13.01.2009
Сообщения
2 285
Благодарностей
2 730
Баллы
113
Please attach the screenshot of upload window (open file window).
 

lokiys

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

shade

Client
Регистрация
19.11.2010
Сообщения
580
Благодарностей
346
Баллы
63

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Did not helped.
Actually when zenno pressing this hello button then this choose file windows opens somewhere in background but when i press with mouse click then it appears in front...
But in both ways same error... :(
 

darkdiver

Administrator
Команда форума
Регистрация
13.01.2009
Сообщения
2 285
Благодарностей
2 730
Баллы
113
try this one, i tested it on English windows
it requires much less information just window caption.

JavaScript:
lock (SyncObjects.InputSyncer)
{    
    // click hello button
    Emulator.ActiveWindow(instance.FormTitle);
    Emulator.MouseClick(instance.ActiveTab.Handle, MouseButton.Left, MouseButtonEvent.Click, 105, 335);
    string dialogCaption = project.Variables["caption"].Value;
    string fileToUpload = project.Variables["fileToUpload"].Value;
    System.Threading.Thread.Sleep(2000);
    // activate dialog
    Emulator.ActiveWindow(dialogCaption, true);
    System.Threading.Thread.Sleep(1000);
    System.Windows.Forms.SendKeys.SendWait(fileToUpload+"{ENTER}");
}
 

Вложения

raphael

Client
Регистрация
20.07.2012
Сообщения
62
Благодарностей
4
Баллы
8
i subscribe to see for more info.
 
  • Спасибо
Реакции: LightWood

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Благодарностей
14
Баллы
18
Work with slideshare?
 

raphael

Client
Регистрация
20.07.2012
Сообщения
62
Благодарностей
4
Баллы
8
uploading file via flash button work with V5 ?
 

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Благодарностей
14
Баллы
18
Clicking on the flash element doesn't work with the code bellow and it should be. Why?

Код:
    Tab tab = instance.MainTab;
    HtmlElement he = tab.FindElementById("SWFUpload_0");
	he.Click();
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
834
Баллы
113
Does it work with mouse click emulation ?
 

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Благодарностей
14
Баллы
18
Summary: Mouse click requires project instances to work in visible mode. I am pretty sure clicking on element by ID would not require this.

So yes - it works, but there were some errors (only with multithreading) because the dialog box from forms aren't properly locked. So if 2 threads are there it is overlaping is possible. Especially because there it takes 20-30 miliseconds for the dialog box from to become focused windows. Meanwhile, it could happen that something else pop-ups so the file patch is filled in another form.

I solved the problem by writing in a txt file that file dialog box is open and then I make all other thread except current waiting till the proccess finishes. When the process is finished i write in the txt file that process is finished and then all the other threads can start to work. I add a random pause in milliseconds to avoid the case when two thread get into process at the same time.

It is a bit slower but the success rate is 99.8% (923 of 925) per my testing.
 

yozoo

Client
Регистрация
08.11.2012
Сообщения
36
Благодарностей
0
Баллы
6
try this one, i tested it on English windows
it requires much less information just window caption.

JavaScript:
lock (SyncObjects.InputSyncer)
{    
    // click hello button
    Emulator.ActiveWindow(instance.FormTitle);
    Emulator.MouseClick(instance.ActiveTab.Handle, MouseButton.Left, MouseButtonEvent.Click, 105, 335);
    string dialogCaption = project.Variables["caption"].Value;
    string fileToUpload = project.Variables["fileToUpload"].Value;
    System.Threading.Thread.Sleep(2000);
    // activate dialog
    Emulator.ActiveWindow(dialogCaption, true);
    System.Threading.Thread.Sleep(1000);
    System.Windows.Forms.SendKeys.SendWait(fileToUpload+"{ENTER}");
}
Please Help!!!
Can not click the right coordinates all the time for x;y coordinates change everytime.
How can i deal with this problem?
 

darkdiver

Administrator
Команда форума
Регистрация
13.01.2009
Сообщения
2 285
Благодарностей
2 730
Баллы
113
If you are using 5.0.3(1) it will not work on some sites with flash. Should be fixed in nwext build.
Or you can use 5.0.1 for example.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
Should work for 5.0.4.0 or later build.
 

Gfoblin

Client
Регистрация
30.05.2013
Сообщения
4 596
Благодарностей
1 014
Баллы
113
Summary: Mouse click requires project instances to work in visible mode. I am pretty sure clicking on element by ID would not require this.
What OS (XP/7) and what version of ZP do you use (single, multi)?
Have same problem with clicks but support showed me video it's click ok on flash button in invisible mode!!!
 

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Благодарностей
14
Баллы
18
Its win7 and zp 4.5
 

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Благодарностей
14
Баллы
18

basamaty

Client
Регистрация
07.01.2011
Сообщения
20
Благодарностей
2
Баллы
3
Excellent! And how can I select all files in the folder and send them all?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
If all files are located in one folder you can use this format instead of single path
"C:\dir\1.txt"_"C:\dir\3.txt"_"C:\dir\3.txt" (replace _ with space)
 

basamaty

Client
Регистрация
07.01.2011
Сообщения
20
Благодарностей
2
Баллы
3
If all files are located in one folder you can use this format instead of single path
"C:\dir\1.txt"_"C:\dir\3.txt"_"C:\dir\3.txt" (replace _ with space)
there is one problem - in this line can not be set longer than 240 characters... but i need it...
I know how to solve it - you need to open the loader in the correct directory and select all the files in it.... How to make it by C-code I do not know.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
Not possible at the moment.
 

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