Look at the Objects of A Running Application?

Discussion in 'Mac Programming' started by rob356, Mar 22, 2009.

  1. macrumors newbie

    Joined:
    Mar 22, 2009
    #1
    I have started learning Cocoa and I have a question. In an application I am trying it has to get information from other applications, ones that I have not made and do not have the source for. Specifically how can I have an application look at what objects another application has created.

    For Example: My application wants to find the value of a slider in another application.
    How can I "ask" that other applications slider what its value is? I know how to ask a slider that is part of my own application, so that isn't a problem.

    Short Version: Can I see what objects another application has created and talk to them?

    Is this possible? Thanks
     
  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    I think you can use F-Script Explorer to explore the objects in another Cocoa app...
     
  3. macrumors 68030

    Catfish_Man

    Joined:
    Sep 13, 2001
    Location:
    Portland, OR
    #3
    In general you can't do this. The other application can provide ways to do it, but without its "permission", it would require something quite tricky (inserting your code into its address space, or abusing the accessibility APIs, or something).
     
  4. thread starter macrumors newbie

    Joined:
    Mar 22, 2009
    #4
    Thanks for the replies. F-Script does exactly what I want, only now I have to figure out how to make F-Script Anywhere integrate into my application, so that I can get the value of stuff from the app it is inserted into, and create a pointer to it. Maybe I could create a pointer to the location of it, but I don't know yet.

    Actually, does anyone know if you can use the accessibility framework to find out the value of a progress bar? That seems to be the easiest way now.
     

Share This Page