Sign in to follow this  
Followers 0
BreadthFirst

Newbie Question: File example

5 posts in this topic

Something weird is going on with my internet explorer.

I am running the example included in the IE.au3 UDF to write to an Input type = file element:

; *******************************************************
; Example 4 - Set the value of an INPUT TYPE=FILE element
;               (security restrictions prevent using _IEFormElementSetValue)
; *******************************************************
;
#include <IE.au3>

$oIE = _IE_Example("form")
$oForm = _IEFormGetObjByName($oIE, "ExampleForm")
$oInputFile = _IEFormElementGetObjByName($oForm, "fileExample")

; Assign input focus to the field and then send the text string
_IEAction($oInputFile, "focus")
Send("C:\myfile.txt")

However, this program is simply writing "C:myfile.txt" to internet explorer's URL bar instead of the fileExample input. Why is this happening and how can I solve this issue? I have internet explorer 8.

thanks.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I tried here and it's working...

Edit: hmmm, in my brother's computer it's happening... I'll investigate.

Edited by A. Percy

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator[center] VW Bug user[/center]Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral

Share this post


Link to post
Share on other sites

Interesting... It's disabled. Only works when I click the button.


Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator[center] VW Bug user[/center]Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I got this error when I used _IEFormElementSetValue:

--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidObjectType (Browser securuty prevents SetValue of TYPE=FILE)

Maybe you can't send characters to the control either. Just a guess.

Edited by dantay9

[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

I got this error when I used _IEFormElementSetValue:

--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidObjectType (Browser securuty prevents SetValue of TYPE=FILE)

Maybe you can't send characters to the control either. Just a guess.

Example 4 - Set the value of an INPUT TYPE=FILE element

(security restrictions prevent using _IEFormElementSetValue)

That's not supposed to work. The example I posted, however, is. I don't know why it fails on some computers, as A. Percy pointed out. What version of internet explorer do you have on the computer where the program fails?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0