NirKlieman Posted November 22, 2015 Posted November 22, 2015 Hi allMy code works pretty fine, but when I check it via the Syntax-Check-Prod I got many errors such as:"C:\Projects\qasa_GWAPP_Tests_6.6\misc\Call Generator\AutoIt3\AutoIT_scripts\emsFuncsOnebox.au3"(555,81) : error: _IEGetObjById() called with Const or expression on ByRef-param(s). _IEAction(_IEGetObjById(_IEFrameGetCollection($oIE, 1), "jqi_state0_buttonOk")~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^"C:\Projects\qasa_GWAPP_Tests_6.6\misc\Call Generator\AutoIt3\Include\IE.au3"(1882,41) : REF: definition of _IEGetObjById().Func _IEGetObjById(ByRef $oObject, $sId)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^for line of code such as: _IEAction(_IEGetObjById(_IEFrameGetCollection($oIE, 1), "jqi_state0_buttonOk"), "Click") [Get frame #1 in IE object, search for object with ID "jqi_state0_buttonOk", and Click on it]Can you help me fix the syntax (or the syntax-checker) so I won't see these errors?Thanks
Developers Jos Posted November 22, 2015 Developers Posted November 22, 2015 Try putting the result of _IEFrameGetCollection($oIE, 1) into a variable and use the variable in the _IEGetObjById() functions, as the helpfile states the Param is ByRef.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.
NirKlieman Posted November 22, 2015 Author Posted November 22, 2015 JosThanks. After I did what you said and did the same for the result of Object it stopped invoke errors.$oFrame = _IEFrameGetCollection($oIE, 1) $object = _IEGetObjById($oFrame, "jqi_state0_buttonOk") _IEAction($object, "Click")but now I get three lines of code instead of one, and it makes the code ugly. Is there any way to avoid it (except using a function ) ?Thanks a lot !
Developers Jos Posted November 22, 2015 Developers Posted November 22, 2015 but now I get three lines of code instead of one, and it makes the code ugly. Is there any way to avoid it (except using a function ) ?Seriously?Guess the "ugly" comment is really "in the eye of the beholder" and think you should ask yourself whether it is really the case or simply a matter of changing your own expectations.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.
NirKlieman Posted November 22, 2015 Author Posted November 22, 2015 ok ok .. THANKS anyway ! Seriously?Guess the "ugly" comment is really "in the eye of the beholder" and think you should ask yourself whether it is really the case or simply a matter of changing your own expectations.
Developers Jos Posted November 22, 2015 Developers Posted November 22, 2015 (edited) You're welcome Edited November 22, 2015 by 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.
NirKlieman Posted November 23, 2015 Author Posted November 23, 2015 You're welcome Jos, just know that somehow, after all the fixes that I made, the number of lines was lowered from 2381 to 2373 !!!
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