confutatis Posted October 13, 2005 Share Posted October 13, 2005 (edited) Hello again... Here's a simple script: $obj=ObjCreate("Shell.Application") $obj.Open ("C:\Program Files\") When I run the script, I get this error: $obj.Open("c:\program files\") $obj^ERROR Error: Variable must be of type "Object". I have no clue why it's telling me this. I'm running XP and the AutoIt beta. Please put a heat gun to my brain by telling me what I've done wrong. Thanks, David --As a matter of fact, I went to the AutoIt3 help documents under ObjCreate and tried running the example file and received the same error. Edited October 13, 2005 by confutatis Link to comment Share on other sites More sharing options...
BigDod Posted October 13, 2005 Share Posted October 13, 2005 Hello again...Here's a simple script:$obj=ObjCreate("Shell.Application") $obj.Open ("C:\Program Files\")When I run the script, I get this error: $obj.Open("c:\program files\") $obj^ERROR Error: Variable must be of type "Object".I have no clue why it's telling me this. I'm running XP and the AutoIt beta. Please put a heat gun to my brain by telling me what I've done wrong.Thanks,David--As a matter of fact, I went to the AutoIt3 help documents under ObjCreate and tried running the example file and received the same error.Works for me, are you sure you are using Beta version to run it. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
confutatis Posted October 13, 2005 Author Share Posted October 13, 2005 Works for me, are you sure you are using Beta version to run it.Yeah, I'm using the beta version...Very odd. Link to comment Share on other sites More sharing options...
BigDod Posted October 13, 2005 Share Posted October 13, 2005 (edited) Yeah, I'm using the beta version...Very odd.Put the following code at the top of script your just to check$ver=@AutoItVersion MsgBox(0, "AutoIT Version", $ver) Edited October 13, 2005 by BigDod Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
confutatis Posted October 13, 2005 Author Share Posted October 13, 2005 Put the following code at the top of script your just to check$ver=@AutoItVersion MsgBox(0, "AutoIT Version", $ver)Comes back 3.1.1.75 Link to comment Share on other sites More sharing options...
BigDod Posted October 13, 2005 Share Posted October 13, 2005 Comes back 3.1.1.75Download the latest Beta which is 3.1.1.83 Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
confutatis Posted October 13, 2005 Author Share Posted October 13, 2005 Download the latest Beta which is 3.1.1.83Upgraded....still no go...Very frustrating. Link to comment Share on other sites More sharing options...
BigDod Posted October 13, 2005 Share Posted October 13, 2005 Upgraded....still no go...Very frustrating.Did you type the code in your post or "copy and Paste". The reason for asking is incase there is a typing error in the original script. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
confutatis Posted October 13, 2005 Author Share Posted October 13, 2005 Seems like I create any object but the Shell.Application object...UGH! Link to comment Share on other sites More sharing options...
BigDod Posted October 13, 2005 Share Posted October 13, 2005 Seems like I create any object but the Shell.Application object...UGH!Sorry I have run out of ideas Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
w0uter Posted October 13, 2005 Share Posted October 13, 2005 $obj=ObjCreate("Shell.Application") MsgBox(0, '', @error) $obj.Open ("C:\Program Files\") My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
confutatis Posted October 13, 2005 Author Share Posted October 13, 2005 $obj=ObjCreate("Shell.Application")MsgBox(0, '', @error) $obj.Open ("C:\Program Files\")Comes back with -2147024770 for the error code, and then the same error.Could this have anything to do with XP SP2 and security? Link to comment Share on other sites More sharing options...
Skruge Posted October 13, 2005 Share Posted October 13, 2005 (edited) Sounds like some controls got unregistered, or you have corruption in the registry.It might help to reinstall WSH... http://www.microsoft.com/downloads/details...&displaylang=en Edited October 13, 2005 by Skruge [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
confutatis Posted October 13, 2005 Author Share Posted October 13, 2005 Sounds like some controls got unregistered, or you have corruption in the registry.It might help to reinstall WSH... http://www.microsoft.com/downloads/details...&displaylang=enReinstalled as advised, but still getting the error that it's not an object variable...Unbelievable! Link to comment Share on other sites More sharing options...
Skruge Posted October 13, 2005 Share Posted October 13, 2005 How about reregistering Shell32.dll? Regsvr32 Shell32.dll [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
confutatis Posted October 13, 2005 Author Share Posted October 13, 2005 Nope...but thanks for all the suggestion. Link to comment Share on other sites More sharing options...
confutatis Posted October 13, 2005 Author Share Posted October 13, 2005 How about reregistering Shell32.dll?Regsvr32 Shell32.dllNo, still no object...I tried the same script on an NT machine and got the same error. Link to comment Share on other sites More sharing options...
confutatis Posted October 14, 2005 Author Share Posted October 14, 2005 Just bringing this back up front...wondering if anyone else has any ideas. I've been searching the Web for a solution and I have found some articles related to the shell.application object and XP SP2 security. Has anyone else read about this? Most of the articles mention something about Active Desktop needing to be enabled (but not necessarily running) in order for a programmer to use the shell.application object. Also, there's mention that NT must also have Active Desktop enabled to be able to use this object. Any thoughts, comments, solutions? David Link to comment Share on other sites More sharing options...
w0uter Posted October 14, 2005 Share Posted October 14, 2005 i run standard XP home SP 2 and never had any problems regarding shell.application. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
confutatis Posted October 14, 2005 Author Share Posted October 14, 2005 i run standard XP home SP 2 and never had any problems regarding shell.application.Thanks for the post...I just connected to my XP home computer and ran the shell.application script--and it worked. Apparently, this has something to do with XP Pro security.David 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