Jump to content

IE function in hide mode


Recommended Posts

It is customary for you to share your solution after others have expended effort to try to help you.

Dale

you are right, but the solution is in the 15 topic of this discussion..... At the end I make visible ie and send the correct line

#include <IE.au3>

Opt("MouseCoordMode", 0)
$username = filereadline(@ScriptDir&"\username.txt",1)
$password = filereadline(@ScriptDir&"\password.txt",1)

$oIE=_IECreate ("http://youtube.com/login?next=/my_videos_upload",1,0,1)

$oForm = _IEFormGetObjByName ($oIE, "loginForm")

$oQuery = _IEFormElementGetObjByName ($oForm, "username")
_IEFormElementSetValue ($oQuery, $username)
sleep(2000)

$oQuery2 = _IEFormElementGetObjByName ($oForm, "password")
_IEFormElementSetValue ($oQuery2, $password)
_IEFormSubmit ($oForm,1)
sleep(2000)

$oForm2 = _IEFormGetObjByName ($oIE, "theform")
$oQuery3 = _IEFormElementGetObjByName ($oForm2, "video_title")
_IEFormElementSetValue ($oQuery3, "title...........")
_IEFormSubmit ($oForm2, 0)
;~ sleep(1200)

$oForm2 = _IEFormGetObjByName ($oIE, "theform")
$oQuery4 = _IEFormElementGetObjByName ($oForm2, "video_description")
_IEFormElementSetValue ($oQuery4, "video descriptions...")
_IEFormSubmit ($oForm2, 0)
;~ sleep(1200)

$oForm2 = _IEFormGetObjByName ($oIE, "theform")
$oQuery5 = _IEFormElementGetObjByName ($oForm2, "field_myvideo_categories")
_IEFormElementOptionselect ($oQuery5, "19", 1, "byValue",1)
;~ sleep(1200)

$oForm2 = _IEFormGetObjByName ($oIE, "theform")
$oQuery6 = _IEFormElementGetObjByName ($oForm2, "field_myvideo_keywords")
_IEFormElementSetValue ($oQuery6, "nokia n95 rigenerator")
_IEFormSubmit ($oForm2, 0)

$oSubmit = _IEGetObjByName ($oIE, "action_upload")
_IEAction ($oSubmit, "click")
sleep(3000)

$oForm2 = _IEFormGetObjByName ($oIE, "theform")
$oQuery7 = _IEFormElementGetObjByName ($oForm2, "field_uploadfile")


_IEAction($oIE, "visible")
_IEAction($oQuery7,"focus")
send("c:\provaprova.mp4{ENTER}")

exit

like this...

Thanks DaleHohm

Link to comment
Share on other sites

Hello Dale, and thanks for your warning, in the end I found the solution in the AutoIt Help, I read the remarks for _IEFormElementSetValue, and finally the script works well, I mean this function, because I have a lot of others functions to do to make it complete. Thanks, Raul.

Edited by 7le
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...