burners Posted March 17, 2011 Share Posted March 17, 2011 (edited) I have an application called Spotlight and I want to see what is available from it via com so I used the OLE/COM and found the app class and IDispatch, then found a list of methods. The methods that are void I can trigger like Hide, Show, Minimize, Maximize etc... Any other Method I am not able to get anything from because I am not doing something correct. Here is my script, I also attached a screenshot of the method I am trying to pull data from $oSpotlight= ObjCreate("Spotlight.SpotlightExConsole") $oSpotlightGET=$oSpotlight.GetConnectionManager() ; GetConnectionManager if Isobj($oSpotlightGET) then $string="" for $line in $oSpotlightGET $String = $line.ISpotlightExConnectionManager() MsgBox(0,"Spotlight",$String) next EndIf Edited March 17, 2011 by burners ~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK Link to comment Share on other sites More sharing options...
trancexx Posted March 17, 2011 Share Posted March 17, 2011 What screenshot? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
burners Posted March 17, 2011 Author Share Posted March 17, 2011 It didn't attach the first time, there now ~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK Link to comment Share on other sites More sharing options...
trancexx Posted March 17, 2011 Share Posted March 17, 2011 What logic lead you to write that code out of that screenshot? Where do you see the collection? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
burners Posted March 17, 2011 Author Share Posted March 17, 2011 What logic lead you to write that code out of that screenshot? Where do you see the collection?The screenshot is from microsoft OLE/COM Viewer, not anything I wrote.I wrote the code posted in code tags but its not correct because it doesn't work. ~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK Link to comment Share on other sites More sharing options...
burners Posted March 17, 2011 Author Share Posted March 17, 2011 Here is another example, this one actually works but its just a VOID Method so nothing is returned, this will Maximize then Minimize the Spotlight application $oSpotlight= ObjCreate("Spotlight.SpotlightExConsole") $oSpotlightGET=$oSpotlight.Maximize() $oSpotlightGET=$oSpotlight.Minimize() ~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK Link to comment Share on other sites More sharing options...
trancexx Posted March 17, 2011 Share Posted March 17, 2011 The screenshot is from microsoft OLE/COM Viewer, not anything I wrote.I wrote the code posted in code tags but its not correct because it doesn't work.Could you please read again what I wrote and you quoted.Anyway, GetConnectionManager method gets you ISpotlightExConnectionManager object. This object is not collection. This object have two methods, Connect and Disconnect. Once again, it's not a collection. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
burners Posted March 17, 2011 Author Share Posted March 17, 2011 Sorry i misunderstood, I thought that maybe "Getconnectionmanager" got all of the current connections. How did you see that it is not a collection and that it has the properties of connect and disconnect ? ~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK Link to comment Share on other sites More sharing options...
trancexx Posted March 17, 2011 Share Posted March 17, 2011 I guess I know stuff. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
burners Posted March 17, 2011 Author Share Posted March 17, 2011 After reading more and trying to fully understand this it looks like I am missing a piece of the puzzle. I was basing the fact that I should get info from the method by the Intent of the Argument The INTENT of the argument, one of the following list: [in] - the argument value is read but not modified by the method [out] - the argument value is not read, but is modified by the method [in, out] - the argument value is both read and modified by the method [out, retval] - the argument represents the return value of the method Unfortunately if I am understanding this correctly it looks like I still need to know the arguments to pass to the methods? ~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK Link to comment Share on other sites More sharing options...
burners Posted March 17, 2011 Author Share Posted March 17, 2011 Is there any way to find the available arguments to pass to the methods or is that something I would have to get from the application developers? ~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK 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