bundyxc Posted January 6, 2009 Share Posted January 6, 2009 (edited) I know that there was already a topic on this (here), but it looks like the OP never came back, therefore the topic was left unsolved. By the looks of it, Dale knew exactly what to do, but he wanted the guy to figure it out. Now, I've looked through IE.au3, but in all honesty.. I don't know what I should be looking for.Here's the program.#include <IE.au3> $oIE =_IECreate("http://infiniteadds.com",0,0,1) $o_fid = _IEGetObjByName($oIE,"friendid") $o_submit=_IEGetObjByName($oIE,"action") _IEFormElementSetValue ($o_fid, "21802680") _IEAction($o_submit,"click") _IELoadWait ($oIE) $oIE = _IENavigate($oIE, "http://infiniteadds.org") $o_fid = _IEGetObjByName($oIE,"friendid") $o_submit=_IEGetObjByName($oIE,"action") _IEFormElementSetValue ($o_fid, "442500255") _IEAction($o_submit,"click") _IELoadWait ($oIE) $oIE = _IENavigate($oIE, "http://maxadds.com") $o_fid = _IEGetObjByName($oIE,"friendid") $o_submit=_IEGetObjByName($oIE,"action") _IEFormElementSetValue ($o_fid, "21802680") _IEAction($o_submit,"click") _IELoadWait ($oIE) $oIE = _IENavigate($oIE, "maxadds.com") $o_fid = _IEGetObjByName($oIE,"friendid") $o_submit=_IEGetObjByName($oIE,"action") _IEFormElementSetValue ($o_fid, "442500255") _IEAction($o_submit,"click") _IELoadWait ($oIE) _IEQuit($oIE)And here are all the errors that showed when I ran it (F5).--> IE.au3 V2.4-0 Error from function _IEGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEAction, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IELoadWait, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IENavigate, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEAction, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IELoadWait, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IENavigate, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEAction, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IELoadWait, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEQuit, $_IEStatus_InvalidDataTypeEDIT: Now it works.. but I'd still like to know what was going on. All I did was take out the "$oIE = " before my "_IENavigate"s....? Edited January 6, 2009 by bundyxc Global $arr[2] $arr[0]="hip" $arr[1]="hip" ;^^ hip hip array. ^^ Link to comment Share on other sites More sharing options...
Pain Posted January 6, 2009 Share Posted January 6, 2009 (edited) http://www.autoitscript.com/forum/index.php?showtopic=87205 _IENavigate navigates to the page, there is no need to save the value. The values are:Return Value Success: Returns -1 Failure: Returns 0 and sets @ERROR @Error: 0 ($_IEStatus_Success) = No Error 1 ($_IEStatus_GeneralError) = General Error 3 ($_IEStatus_InvalidDataType) = Invalid Data Type 4 ($_IEStatus_InvalidObjectType) = Invalid Object Type 6 ($_IEStatus_LoadWaitTimeout) = Load Wait Timeout 8 ($_IEStatus_AccessIsDenied) = Access Is Denied 9 ($_IEStatus_ClientDisconnected) = Client Disconnected @Extended: Contains invalid parameter numberNext time you need the handle to the IE object it will fail because -1 isn't an object.Let's take a look at _IECreate.Return Value Success: Returns an object variable pointing to an InternetExplorer.Application object Failure: Returns 0 and sets @ERROR @Error: 0 ($_IEStatus_Success) = No Error 1 ($_IEStatus_GeneralError) = General Error 3 ($_IEStatus_InvalidDataType) = Invalid Data Type 4 ($_IEStatus_InvalidObjectType) = Invalid Object Type 6 ($_IEStatus_LoadWaitTimeout) = Load Wait Timeout 8 ($_IEStatus_AccessIsDenied) = Access Is Denied 9 ($_IEStatus_ClientDisconnected) = Client Disconnected @Extended: Set to true (1) or false (0) depending on the success of $f_tryAttachAs you can see it returns a handle to the IE object and that's what we need to continue.Success: Returns an object variable pointing to an InternetExplorer.Application object Edited January 6, 2009 by Pain Link to comment Share on other sites More sharing options...
bundyxc Posted January 20, 2009 Author Share Posted January 20, 2009 Thanks. My script worked for a while, but now it's acting strange. #include <IE.au3> $oIE =_IECreate("http://infiniteadds.com",0,1,1) $o_fid = _IEGetObjByName($oIE,"friendid") $o_submit= _IEGetObjByName($oIE,"action") _IEFormElementSetValue ($o_fid, "21802680") _IEAction($o_submit,"click") _IELoadWait ($oIE) $oLinks = _IELinkGetCollection ($oIE, 0) $iNumLinks = @extended $link = _IELinkGetCollection($oIE, $iNumLinks - 104); _IEAction($link,"click") _IELoadWait ($oIE) This script is opening up two IE windows. One doesn't go anywhere, and the other goes to the right site, but doesn't do anything. Any ideas? Global $arr[2] $arr[0]="hip" $arr[1]="hip" ;^^ hip hip array. ^^ Link to comment Share on other sites More sharing options...
TerarinK Posted January 20, 2009 Share Posted January 20, 2009 #RequireAdmin is what you need if your script, it is because UAC does that so RequireAdmin bypasses it by running it Admin or Administrator or whatever you have it set to 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
bundyxc Posted January 20, 2009 Author Share Posted January 20, 2009 Wow, thank you SO much. How did you know that this was the problem? Global $arr[2] $arr[0]="hip" $arr[1]="hip" ;^^ hip hip array. ^^ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now