mpcluever Posted June 20, 2016 Share Posted June 20, 2016 I've got a google form here https://docs.google.com/forms/d/1hEFvkQfDeqIOLW3QeyB-FmkCFuw2EPwKkc383X0MZEA I can't figure out how to click the submit button without using a mouseclick. I'd like it to run in the background. Any suggestions? Link to comment Share on other sites More sharing options...
RyukShini Posted June 20, 2016 Share Posted June 20, 2016 Are you using <IE.au3> if you do, you can do like this: $colTags = _IETagNameGetCollection($oIE, "span") For $oTag In $colTags If $oTag.value = "Submit" Then _IEAction($oTag, "click") _IENavigate($oIE,"javascript:void(0);") ; javascript:void is triggered. tell me if it works. Link to comment Share on other sites More sharing options...
mpcluever Posted June 20, 2016 Author Share Posted June 20, 2016 (edited) 8 hours ago, RyukShini said: Are you using <IE.au3> if you do, you can do like this: $colTags = _IETagNameGetCollection($oIE, "span") For $oTag In $colTags If $oTag.value = "Submit" Then _IEAction($oTag, "click") _IENavigate($oIE,"javascript:void(0);") ; javascript:void is triggered. tell me if it works. I am using IE.au3, but I'm not sure where to end the If and For functions. Not working without those. Did some more searching and came across a similar setup. This works #include <IE.au3> $oIE = _IECreate("https://docs.google.com/forms/d/1hEFvkQfDeqIOLW3QeyB-FmkCFuw2EPwKkc383X0MZEA") $oAs = _IETagNameGetCollection($oIE, "span") For $oA In $oAs If _IEPropertyGet($oA, "innertext") = "Submit" Then _IEAction($oA, "click") Next Edited June 20, 2016 by mpcluever Found solution Link to comment Share on other sites More sharing options...
RyukShini Posted June 21, 2016 Share Posted June 21, 2016 8 hours ago, mpcluever said: I am using IE.au3, but I'm not sure where to end the If and For functions. Not working without those. Did some more searching and came across a similar setup. This works #include <IE.au3> $oIE = _IECreate("https://docs.google.com/forms/d/1hEFvkQfDeqIOLW3QeyB-FmkCFuw2EPwKkc383X0MZEA") $oAs = _IETagNameGetCollection($oIE, "span") For $oA In $oAs If _IEPropertyGet($oA, "innertext") = "Submit" Then _IEAction($oA, "click") Next Well done. I may have to use this soon actually, mind if I snatch that code? 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