dinodod Posted March 26, 2008 Share Posted March 26, 2008 I'm not familar with object variables and how to allow them to be passed to a function. Can anyone please advise? Tried GLOBAL $oIE. $oIE = _IECreate ("www.google.com") _Test() Func _test() _IELoadWait ($oIE) endfunc Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007 Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 26, 2008 Share Posted March 26, 2008 I'm not familar with object variables and how to allow them to be passed to a function. Can anyone please advise? Tried GLOBAL $oIE. $oIE = _IECreate ("www.google.com") _Test() Func _test() _IELoadWait ($oIE) endfunc So what happens when you try it? There's nothing wrong with what you posted except you didn't put the #include <IE.au3> at the top. There's nothing special about object typed varaibles; they obey the same scope rules as other variables. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
fielmann Posted March 26, 2008 Share Posted March 26, 2008 I'm not familar with object variables and how to allow them to be passed to a function. Can anyone please advise? Tried GLOBAL $oIE. $oIE = _IECreate ("www.google.com") _Test() Func _test() _IELoadWait ($oIE) endfunc I'm missing an explicit "EXIT" after calling _Test() to end the script. Behind the EXIT you can place your function. Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 26, 2008 Share Posted March 26, 2008 I'm missing an explicit "EXIT" after calling _Test() to end the script.Behind the EXIT you can place your function.Exit isn't required there. When script execution reaches that point and there is nothing left to execute (Func declarations don't get run unless explicitly called), it Exits on its own. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
dinodod Posted March 27, 2008 Author Share Posted March 27, 2008 Odd, it seems to be working now, perhaps some syntax error from before. Thanks for the help!So what happens when you try it? There's nothing wrong with what you posted except you didn't put the #include <IE.au3> at the top.There's nothing special about object typed varaibles; they obey the same scope rules as other variables. Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007 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