Oxin8 Posted March 11, 2006 Share Posted March 11, 2006 (edited) I just started to try programming with Dale's IE.au3 and I was quickly forced to a halt. Line 728 (File "C:\Documents and Settings\Oxin8\Desktop\IE.au3"): If IsObj($o_object.document.forms.item ($s_name, $i_index)) Then If IsObj($o_object^ ERROR Error: Variable must be of type "Object". I searched the forums and found close to nothing. _IEFormGetObjByName is where the problem lies. Cut down script that produces the error: #include <IE.au3> $loginpage = "http://login.yahoo.com/config/login?.src=ym&.intl=us&.partner=&.done=http%3A%2F%2Fmail.yahoo.com%2F" $ie = _IECreate() _IENavigate($ie,$loginpage) $myform = _IEFormGetObjByName($ie, "login_form") I'm using the most recent beta(I checked multiple times). Thanks for the help. Edited March 11, 2006 by Oxin8 ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
DaleHohm Posted March 11, 2006 Share Posted March 11, 2006 Have you tried any of the examples to see if they work for you? Is it specific to the URL you are using or does if fail no matter what you use? Also, check the output from AutoIt to insure that it shows that it is running the version you expect Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Valuater Posted March 11, 2006 Share Posted March 11, 2006 (edited) this tested fineLine 728 (File "C:\Documents and Settings\Oxin8\Desktop\IE.au3"):the error occured as you do not have the IE.au3 File in the "Beta\Include" Folderput the file there... thats ithoweverIf IsObj($o_object.document.forms.item ($s_name, $i_indes)) ThenIf IsObj($o_object^ ERRORi get sometimes... Occasionally( hoping for the new release from Dale )8) Edited March 11, 2006 by Valuater Link to comment Share on other sites More sharing options...
Oxin8 Posted March 11, 2006 Author Share Posted March 11, 2006 I'm running the beta(110% positive.) Same error with example script. ( Error: Variable must be of type "Object". ) but in a different line of the IE.au3 Putting it in the beta\include folder didn't help. Maybe something wrong with the object? ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
Valuater Posted March 11, 2006 Share Posted March 11, 2006 try running it 5 times ( due to the occasional error ) try putting a sleep in #include <IE.au3> $loginpage = "http://login.yahoo.com/config/login?.src=ym&.intl=us&.partner=&.done=http%3A%2F%2Fmail.yahoo.com%2F" $ie = _IECreate() _IENavigate($ie,$loginpage) Sleep(3000) $myform = _IEFormGetObjByName($ie, "login_form") it worked for me... except the occasional error 8) Link to comment Share on other sites More sharing options...
Stumpii Posted March 11, 2006 Share Posted March 11, 2006 I'm running the beta(110% positive.)Same error with example script. (Error: Variable must be of type "Object".) but in a different line of the IE.au3Putting it in the beta\include folder didn't help.Maybe something wrong with the object?Be 120% sure by adding a message box to show the @AutoItVersion macro value. I have come across times when AutoIt reverts back to it release version. Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity. Link to comment Share on other sites More sharing options...
Oxin8 Posted March 11, 2006 Author Share Posted March 11, 2006 When I said 110% positive, I meant that I added a message box that shows the version macro. I added the Sleep(3000), and ran 5+ times and got the error for every one. ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
Valuater Posted March 11, 2006 Share Posted March 11, 2006 which error ( to be sure... i might have an answer ) 8) Link to comment Share on other sites More sharing options...
Oxin8 Posted March 11, 2006 Author Share Posted March 11, 2006 Line 728 (File "C:\Documents and Settings\Oxin8\Desktop\IE.au3"):If IsObj($o_object.document.forms.item ($s_name, $i_indes)) ThenIf IsObj($o_object^ ERRORError: Variable must be of type "Object".That error. ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
Valuater Posted March 11, 2006 Share Posted March 11, 2006 (edited) there is an error in the function.... i dont know why... from copying... an older version.. dunnobut here it isyour error.. as i confirmed by you posting it twice....If IsObj($o_object.document.forms.item ($s_name, $i_indes)) ThenIf IsObj($o_object^ ERRORand the actual functionFunc _IEFormGetObjByName($o_object, $s_name, $i_index = 0) ; $o_object - IE object ; $s_name - name of form ; return object reference to specific form If IsObj($o_object.document.forms.item ($s_name, $i_index)) Then SetError(0) Return $o_object.document.forms.item ($s_name, $i_index) Else SetError(1) Return 0 EndIfEndFunc ;==>_IEFormGetObjByNameit seemd you have indes ... not indexmy suggestiojndownload a new copyand get the IE au3 Builder ( really helpful )http://www.autoitscript.com/forum/index.ph...68&hl=Valuater#8) Edited March 11, 2006 by Valuater Link to comment Share on other sites More sharing options...
Oxin8 Posted March 11, 2006 Author Share Posted March 11, 2006 I checked in hope that you were right but no... I just copy and pasted from my first post. It's "index" as it should be. I'll get the builder in hope that it might help somehow but as of now I still get the error. ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
DaleHohm Posted March 11, 2006 Share Posted March 11, 2006 I checked in hope that you were right but no... I just copy and pasted from my first post. It's "index" as it should be. I'll get the builder in hope that it might help somehow but as of now I still get the error.copy and paste is very error-prone. Please right-click and save the file that way. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Valuater Posted March 11, 2006 Share Posted March 11, 2006 (edited) copy and paste is very error-prone. Please right-click and save the file that way. Dale @Dale I am not sure if you are aware that the IE.au3 Builder searches all over for the beta... if not found it prompts the user with a file open dialog... after that... it searches for the IE.au3 Library in the beta directory.. if not found, it asks the user to download it If Not FileExists($AutoItBetaLocation & "\Include\IE.au3") Then $iMsgBoxAnswer = MsgBox(262209, "IE.au3 Error #2", "IE.au3 Library is required " & @CRLF & "Download from www.Autoit3.com ? ") If $iMsgBoxAnswer = 1 Then $web_loc = "http://www.autoitscript.com/forum/index.php?showtopic=13398&hl=#" Run(@ComSpec & " /c Start " & $web_loc, "", @SW_HIDE) MsgBox(262208, "Web Site", "The IE.au3 Library is at the bottom of this page... " & @CRLF & @CRLF & "Save as " & $AutoItBetaLocation & "\Include\IE.au3 ", 10) $Dwait = 1 EndIf ;Exit EndIf that can help eliminate many errors in the beginning 8) Edited March 11, 2006 by Valuater Link to comment Share on other sites More sharing options...
DaleHohm Posted March 11, 2006 Share Posted March 11, 2006 @DaleI am not sure if you are aware that the IE.au3 Builder searches all over for the beta... if not found it prompts the user with a file open dialog...after that... it searches for the IE.au3 Library in the beta directory.. if not found, it asks the user to download itSweet! Thanks Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Valuater Posted March 11, 2006 Share Posted March 11, 2006 (edited) Actually... because IE.au3 Library is so great ( dont get a big head now ... lol ) there are two pages in the Welcome to Autoit describing IE.au3 ... one page is full of functional demos from your page three and more... user only needs to click to run the demo ( thought you might want to know ) 8) Edited March 11, 2006 by Valuater Link to comment Share on other sites More sharing options...
Oxin8 Posted March 11, 2006 Author Share Posted March 11, 2006 I'm still having the same problem..... ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
Oxin8 Posted March 12, 2006 Author Share Posted March 12, 2006 Am I just S.O.L. or what? I'm not a newb or anything so it's not like I made a really dumb error. Could I be missing an updated dll or something that would cause it to mess up? ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
greenmachine Posted March 12, 2006 Share Posted March 12, 2006 I tried this earlier, and was going to post then, but decided against it because I didn't really have anything important to say. But, now I haven't gotten anywhere and I'm still going to post.... Anyway, when I tried it, I only got the error twice (out of more than 30 or 40 tries). I really don't know what would cause it, because it looked the same (at least on the surface) each time it worked right and each time it didn't. I guess the only thing I could suggest is adding some sleeps in there to see if it has to do with a timing issue, or maybe.. doing it in firefox and looking at the page info and page source manually to see if anything is noticeably wrong. If I remember correctly, I got the error once when I switched the code from _IECreate(1) back to _IECreate(), so maybe adding the 1 to make sure it is visible and doesn't rely on the optional parameter would do something? Sounds like it shouldn't, but it's always worth a try. Good luck with that issue. Link to comment Share on other sites More sharing options...
Oxin8 Posted March 12, 2006 Author Share Posted March 12, 2006 ummm... I feel like an idiot. The create fails... What's that mean I'm missing? I have internet explorer and it works.... ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
DaleHohm Posted March 12, 2006 Share Posted March 12, 2006 (edited) @greenmachinethere is what has in the past been a very obscure and elusive timing issue. For some reason it have seen more reports recently and I have posted some test code that I hope will address the issue - please find it here and help with testing. ummm... I feel like an idiot. The create fails... What's that mean I'm missing? I have internet explorer and it works....You showed error messages that indicated a corrupt IE.au3 - if you are still getting the same error then you still have a corrupt IE.au3 If you are having a different problem now you need to post new information and error messages. DaleEdit: added message to greenmachine Edited March 12, 2006 by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble 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