splatz Posted September 25, 2005 Posted September 25, 2005 Hi all, I have a script that creates a COM connection to iTunes, using the following command: $iTunesApp = ObjCreate("iTunes.Application") It works great. The problem I am having is when I attempt to quit iTunes, the autoit script does not disconnect itself, and iTunes pops up a warning. I would like to know if there is a command I can call within autoit to either disconnect the object from iTunes, or destroy the object completely. Thanks, Splat
DaleHohm Posted September 25, 2005 Posted September 25, 2005 You should be able to do this by setting the object variable to 0 or a null string ("").$iTunesApp = 0DaleHi all,I have a script that creates a COM connection to iTunes, using the following command:$iTunesApp = ObjCreate("iTunes.Application")It works great. The problem I am having is when I attempt to quit iTunes, the autoit script does not disconnect itself, and iTunes pops up a warning. I would like to know if there is a command I can call within autoit to either disconnect the object from iTunes, or destroy the object completely.Thanks,Splat Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
splatz Posted September 26, 2005 Author Posted September 26, 2005 Hi, and thanks for the reply. Unfortunately, setting the object variable to null does not destroy the actual object. iTunes still believes that autoit is connected to it. I know there must be some way, because if I ask autoit to terminate itself when iTunes quits, i don't receive an error. This means that autoit performs some disconnect command when quitting. Any ideas would be appreciated!-SplatYou should be able to do this by setting the object variable to 0 or a null string ("").$iTunesApp = 0Dale
sykes Posted September 26, 2005 Posted September 26, 2005 Maybe try this: $iTunesApp.Close We have enough youth. How about a fountain of SMART?
splatz Posted September 30, 2005 Author Posted September 30, 2005 Maybe try this:$iTunesApp.CloseUnfortunately, that didn't work either. That command is trying to ask the object to do something. What I'm looking for is a command to tell autoit to disconnect the given object. Thanks for the guesses tho!
GaryFrost Posted September 30, 2005 Posted September 30, 2005 Take a look at this thread, depending on the object used:http://www.autoitscript.com/forum/index.php?showtopic=12407 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
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