karose Posted June 16, 2009 Share Posted June 16, 2009 #include <IE.au3> #include <Array,au3> $oIE = _IECreate ("192.168.1.100") $sHTML = _IEDocReadHTML ($oIE) $sessionID = StringRegExp ($sHTML, "sessionID=(.*)\&action,3) Msgbox (0, "sessionID", $sessionID[0])I'd like to get sessionID from HTML source, but cause "Subscript used with non-Array variable.:" with &sessionID[0]It works fine if set $sHTML to "version1.0&sessionID=224522&action=get" Link to comment Share on other sites More sharing options...
oMBRa Posted June 16, 2009 Share Posted June 16, 2009 try this: #include <IE.au3> #include <Array,au3> $oIE = _IECreate ("192.168.1.100") $sHTML = _IEDocReadHTML ($oIE) $sessionID = StringRegExp ($sHTML, "sessionID=(.*?)&action",3) Msgbox (0, "sessionID", $sessionID[0]) you dont have to escape "&" Link to comment Share on other sites More sharing options...
karose Posted June 16, 2009 Author Share Posted June 16, 2009 try this: #include <IE.au3> #include <Array,au3> $oIE = _IECreate ("192.168.1.100") $sHTML = _IEDocReadHTML ($oIE) $sessionID = StringRegExp ($sHTML, "sessionID=(.*?)&action",3) Msgbox (0, "sessionID", $sessionID[0]) you dont have to escape "&" Thanks, it works !!!! 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