BlackDistrib Posted June 23, 2017 Share Posted June 23, 2017 I am trying to get some variables of _IEGetObjById in the new _IENavigate URL and not the initial URL. Putting them after the first section of script seems to work as far as the variables go but the function stops running before performing the remaining script, after the injected variables. I am a beginner to AutoIT. I am trying to make a interesting bot between pages. Included is the code. Global $iOE = _IECreate ("https://sample.com/") Local $username = _IEGetObjByName($iOE,"log") Local $pass = _IEGetObjByName($iOE,"pwd") Local $button = _IEGetObjByName ($iOE,"wp-submit") _IEFormElementSetValue ($username, "user1") _IEFormElementSetValue ($pass, "pass1") _IEAction ($button, "click") _IELoadWait ($iOE) _IENavigate ($iOE, "https://sample.com/sample") ;New variables because of new URL Local $title = _IEGetObjById ($iOE, "title") Local $switch = _IEGetObjById ($iOE, "content-html") Local $content = _IEGetObjById ($iOE, "content") Local $save = _IEGetObjById ($iOE, "save-post") Local $host = _IEBodyReadHTML ($iOE) Local $hostchg = $host.ResponseText() Local $logout = _IEGetObjById ($iOE,"wp-admin-logout") _IEFormElementSetValue ($title, "Snowballs") _IEAction ($switch, "click") _IEFormElementSetValue ($content, "Take a step back and weep my children!") Sleep(5000) _IEAction ($save, "click") Link to comment Share on other sites More sharing options...
BlackDistrib Posted June 23, 2017 Author Share Posted June 23, 2017 Nevermind! Placing another function and a call fixed it. Link to comment Share on other sites More sharing options...
Danp2 Posted June 23, 2017 Share Posted June 23, 2017 Glad you got it working. For future reference, I didn't respond to your earlier post because it was unclear to me what wasn't working correctly. Next time, post the results from the Scite output window so that we can see any errors, feedback, etc. Latest Webdriver UDF Release Webdriver Wiki FAQs 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