Upload file using activex
Hi reteset, I am building another project using your plugin. I want to automatically send an image file to an uploadfile form without opening the explorer file browse window.
Example: a web page contains:
<form method="post" action="file-upload-1.htm" name="submit" enctype="multipart/form-data">
<input type="file" name="fileField"><br /><br />
<input type="submit" name="submit" value="Submit">
</form>
Instead of clicking choose file and manually selecting a path, then clicking submit... Can I automatically assign a path (c:/my desktop/pic.jpg) and submit the form?
Thx
Announcement
Collapse
No announcement yet.
Get HTML code from web object
Collapse
X
-
i do not think that user agent string would cause a problem
the version difference might be due to MS's design
Internet Explorer application changes it on the fly , activex control remains unchanged when it is hosted by another application
this plugin hosts the internet explorer activex that is installed on your system
and you see what your explorer installation shows (version)
propably there is a custom protection system that blocks your attempts
but it is not the web browser object , web site can not detect whether it is in a hosted web object (there are few exceptions tho)
maybe you are missing a hidden form field or something else
Leave a comment:
-
I just ran a test at browserspy.dk using my internet explorer browser and the plugin. It appears the plugin shows different properties than my Windows Explorer browser.
PLUGIN INFORMATION TEST
UserAgent from header:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E)
User Agent from JavaScript:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E)
Browser string: Microsoft Internet Explorer 7.x
Operating System: Microsoft Windows 7
Browser name: Yes - version msie
Browser version: Yes - version 7
WINDOWS BROWSER INFORMATION TEST:
UserAgent from header:
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
User Agent from JavaScript:
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E)
Browser string: Microsoft Internet Explorer 9.x
Operating System: Microsoft Windows 7
Browser name: Yes - version msie
Browser version: Yes - version 9
--------------------------------------------
As you can see the plugin properties are not accurate. My IE version is 9.x NOT 7.x
If you click this link with your browser, then again with the plugin you will see the difference.
As you can see, "internet explorer real version" reads 9,0,8112... yet the navigator.appVersion reads MSIE 7.0 (contradicts itself)
Could this be why Craigslist is ghosting my ads only when using the plugin?
Is it possible for this information to be corrected showing accurate readings when information is collected?Last edited by Stephen G.; 06-17-2012, 01:40 PM.
Leave a comment:
-
It can't be flood because I set timers on everything (2 minutes between pages).
I have the control set to silent mode if that matters.
You mention cookies... Do the cookies work the same way as a regular browser?
Leave a comment:
-
a web site can not detect a hosted (internet explorer) web browser control
because there is no difference between them
web site might be detecting your ads as flood ,if you attemt to send them very fast
another reason might be document cookies
Leave a comment:
-
Hi Reteset,
Thank you for the reply it works well. Here is an issue which I am concerned about:
Example: When I post multiple ads on Craigslist.org using my Windows Explorer Browser, the ads show up on Craigslist search, no problem. When I post multiple ads on Craigslist using the activex plugin, the ads will not show up on Craigslist search (it's called Ghosting) because Craigslist knows I am using software to post the ad. Is there a way to identify the activex plugin so it is not detected as software, but rather the same browser properties as using the Windows Explorer Browser?
Thank you.
Leave a comment:
-
i am away from my computer , and everything that i am going to write were not tested
1: scroll to bottom
2: This answer applies to that as wellCode:local Doc = IEObject:getDocument() local Win = Doc:getparentWindow() local Body = Doc:getBody() Win:scrollTo(0,Body:getscrollHeight())
example:
3:Code:local Document = IEObject:getDocument(); local Forms = Document:getForms(); Form = Forms:getItem(0) -- get first form if(Form) then Form:getItem(0)-- get first element of first form end
i can not answer your last question right now
Leave a comment:
-
Reteset,
I forgot to ask you how does the plugin automatically click on links within a webpage.
Example: I want to click the "About us" link on a page.
Leave a comment:
-
Hi reteset,
I have 2 additional questions about your plugin.
1. How do I get the page to automatically scroll down to the bottom?
2. When clicking radio buttons, can I select them by item # like the forms rather than by id? I am trying to select radio buttons on a page where all the buttons have the same id #
Thank you,
Stephen
Leave a comment:
-
first of all , ActiveX plugin does not render web page and does not run any script
it is *only* a container that hosts specified OLE control and allows you to access OLE control's methods and properties
in this case we host Internet Explorer control
if a web page has a badly coded javascript (contains errors)
this is not the fault of Internet Explorer object , it shows a message box and tells you an error occured
you want to disable this error message dialogs , and you do this with a way
but this is not fix the error in javascript , so it will not function properly
like i said ActiveX plugin has no relation with the web page you host
Internet Explorer renders the web page and executes javascripts but
Internet Explorer can not fix errors in javascripts that are written by bad coders
for now i would suggest using
this should disable all pop-up dialogsCode:IEObject:setSilent(true);
and all messages are not errors, they are mostly exceptions which are not affect script badly
Leave a comment:
-
I am assuming I need javascript to be enabled in the plugin.
The script error message I am getting is:
---------------------
An error has occurred in the script on this page.
Line: 3
Char: 30
Error: pID is undefined
Code: 0
URL: https://post.craigslist.org/js/postings.js?v=3
---------------------------
Leave a comment:
-
Hi Reteset, the (2) code works fine to disable popups, however, the reason I was having this problem is because a javascript was unable to run through the plugin. Is there a way to enable all javascript to run through the plugin?
Leave a comment:
-
here are few methods to disable error messages
1:
2: (requires admin rights)Code:IEObject:setSilent(true);
3:Code:Service.Stop("Machine Debug Manager", "",0);
Code:REGEDIT4 [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main] "Disable Script Debugger"="yes" "DisableScriptDebuggerIE"="yes"
Leave a comment:
-
Thanks for your help Reteset, your Active X plugin is truly an awesome addition to AMS.
Is there a way to prevent script error popups from opening?
When I visit a webpage with an error, an explorer message box pops up and asks if I want to continue running this script. Can this be blocked so it doesn't open?
Leave a comment:
-
getItem() method returns a form by its zero based indexCode:local Document = IEObject:getDocument(); local Forms = Document:getForms(); Form = Forms:getItem(0) -- get first form if(Form) then Form:Submit() end
will point to 5th form in documentCode:Forms:getItem(4)
Leave a comment:
Leave a comment: