msroehrs Posted June 20, 2014 Share Posted June 20, 2014 Hi, I'm a new AutoIT user and have a question for the forum on why I get the following syntax error: 'error: Statement cannot be just an expression.' My code is below. Any help is greatly appreciated. Thanks! #include <IE.AU3> Local $oIE = _IECreate ("url I'm going to") Local $oForm = _IEFormGetObjByName ($oIE, "login for name") Local 05.$oQuery1 = _IEFormElementGetObjByName ($oForm, "login form userid") Local 06.$oQuery2 = _IEFormElementGetObjByName ($oForm, "login form password") 07.$uname="my user name" 08.$pwd="my password" 09._IEFormElementSetValue ($oQuery1,$uname) 10._IEFormElementSetValue ($oQuery2,$pwd) 11.$oButton=_IEGetObjById($oIE,"login form button") 12._IEAction ($oButton, "LOGIN") 13._IELoadWait($oIE,0) Link to comment Share on other sites More sharing options...
Danp2 Posted June 20, 2014 Share Posted June 20, 2014 Welcome to the forum! In the future, be sure to use the blue Code button when posting your code so that it is easier for others to read. I'm assuming that the line numbering (05-13) in the code you posted is strictly a posting issue and this doesn't exist in your actual script. Which line are you receiving the syntax error? Also, what website are you attempting to log into? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
JohnOne Posted June 20, 2014 Share Posted June 20, 2014 There is also no such action as "LOGIN" AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
msroehrs Posted June 20, 2014 Author Share Posted June 20, 2014 Welcome to the forum! In the future, be sure to use the blue Code button when posting your code so that it is easier for others to read. I'm assuming that the line numbering (05-13) in the code you posted is strictly a posting issue and this doesn't exist in your actual script. Which line are you receiving the syntax error? Also, what website are you attempting to log into? Ok, thanks. Yes lines 05-13. Link to comment Share on other sites More sharing options...
msroehrs Posted June 20, 2014 Author Share Posted June 20, 2014 There is also no such action as "LOGIN" Is 'Click' the one to use? Link to comment Share on other sites More sharing options...
JohnOne Posted June 20, 2014 Share Posted June 20, 2014 Yes. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JohnOne Posted June 20, 2014 Share Posted June 20, 2014 You might also want to look at _IEFormSubmit() AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
msroehrs Posted June 20, 2014 Author Share Posted June 20, 2014 Welcome to the forum! In the future, be sure to use the blue Code button when posting your code so that it is easier for others to read. I'm assuming that the line numbering (05-13) in the code you posted is strictly a posting issue and this doesn't exist in your actual script. Which line are you receiving the syntax error? Also, what website are you attempting to log into? It is an optumcoding website. Would having the URL help? Link to comment Share on other sites More sharing options...
Danp2 Posted June 20, 2014 Share Posted June 20, 2014 Possibly... did you try John's suggestions? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
msroehrs Posted June 27, 2014 Author Share Posted June 27, 2014 Yes I did. Thanks for the help everyone! 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