uploading file via flash button

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

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
 
+1

a show-stopper for us too...

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

a show-stopper for us too...

Example sites (video upload):
zie.nl
wat.tv
 
Is this feature will be in the next update?
 
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.
 

Вложения

  • FlashUpload.xmlz
    FlashUpload.xmlz
    31,6 KB · Просмотры: 1 264
  • FlashUpload.jpg
    FlashUpload.jpg
    128,2 KB · Просмотры: 2 920
  • FlashUploadMultiThreaded.xmlz
    FlashUploadMultiThreaded.xmlz
    33,3 KB · Просмотры: 1 147
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.
 
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
 
Please attach the screenshot of upload window (open file window).
 
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... :(
 
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}");
}
 

Вложения

i subscribe to see for more info.
 
  • Спасибо
Реакции: LightWood
Work with slideshare?
 
uploading file via flash button work with V5 ?
 
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();
 
Does it work with mouse click emulation ?
 
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.
 
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?
 
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.
 
Should work for 5.0.4.0 or later build.
 
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!!!
 
Its win7 and zp 4.5
 
Excellent! And how can I select all files in the folder and send them all?
 
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)
 
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.
 
Not possible at the moment.
 

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