Blueman Posted April 5, 2017 Share Posted April 5, 2017 (edited) Hi All, It took me a couple of days to figure this thing out, but i found the problem and i think this is a BUG. But i don't know for sure, so i would like to discuss it with you guys first. I am using the IE Embedded function to open a webpage in a GUI. I am reading the HTML content with; _IEBodyReadHTML($oIE2) This will Return something like; <html><div value="Test">Howdy All!</div></html> Then i am using the function; _StringBetween() $ReadHTML = _IEBodyReadHTML($oIE2) $FoundArray = _StringBetween($ReadHTML, '<div value="Test">', '</div>') When i run the script with sciTE, it is working fine! But when i compile the script, and then activate the .exe The _StringBetween function doesn't find anything,... But wait, when i delete the "" it is working again,.. (after compile),.. $ReadHTML = _IEBodyReadHTML($oIE2) $FoundArray = _StringBetween($ReadHTML, '<div value=Test>', '</div>') Possibly this is a error within the _StringBetween function, or it is a error within the _IEBodyReadHTML() Function. Anyone has an idea? Thanks Guys! EXTRA: AUTOIT Version; 3.3.12.0 / SCITE 3.4.4 Edited April 5, 2017 by Blueman Version number Link to comment Share on other sites More sharing options...
Developers Jos Posted April 5, 2017 Developers Share Posted April 5, 2017 4 minutes ago, Blueman said: But when i compile the script, and then activate the .exe The _StringBetween function doesn't find anything,... But wait, when i delete the "" it is working again,.. (after compile),.. Doubt this is an issue with AutoIt but rather the string received. Do some debugging in your script like writing data to a log file to ensure what is received. Running it from SciTE or compile is basically the same code ran with the same stub so doubt your BUG suggestion is valid, other than possibly in your script. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Blueman Posted April 5, 2017 Author Share Posted April 5, 2017 Hi Jos, I did some debugging and found out that the string received doesn't have the "" Quotes after compile. It does however have the "" Quotes Before the Compile,... Does _IEBodyReadHTML() read the HTML in a different way before and after compile? Thanks! Link to comment Share on other sites More sharing options...
Developers Jos Posted April 5, 2017 Developers Share Posted April 5, 2017 I have no idea why that would be different after compilation. Do you have multiple versions of IE.au3? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Blueman Posted April 5, 2017 Author Share Posted April 5, 2017 (edited) Strange thing then,.. No i don't have multiple versions of IE.au3 The version that i have; Version: T3.0-1 Last Update: 13/06/02 --- EDIT --- Well, i have tried a dozen things but it isn't working. I have however found out why the problem is occurring,.. This is the Explanation from _IEDocReadHTML() Remarks This function returns the document source after any client-side modifications (e.g. by AutoIt or by client-side JavaScript). It may therefore be different than what is shown by the browser So AutoIt is changing the output and then it isn't working anymore,..And that is correct because the output should contain; value="Test" But it is containing; value=TestThe second thing is that all the HTML tags are CAPITAL, so AutoIt is changing a lot of things,... i don't know why,. but OK that is the problem.Now the solution. I would like to use RegEXP in combination with the _StringBetween function. Is this possible? I have tried the following, but it isn't working like it should; $TestOutput = _StringBetween($ReadHTML, '<div value=["|]Test["|]>', "</div>") Thanks Guys! Edited April 6, 2017 by Blueman Link to comment Share on other sites More sharing options...
Blueman Posted April 6, 2017 Author Share Posted April 6, 2017 Well This is Hopeless,.. I have changed the search string to something else other then value="Something",.. It is not a very good workaround but it is working,.. Also i have noticed that this is only happening at HTTPS websites, HTTP websites are fine,. Very Strange, but thanks for the help so far! 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