possible to modifer the properties of windows in Objective C? - objective-c

These are windows besides those that belong to the application. For example, how could I change the title of an open application, for example, TextEdit

You could use mach_inject and mach_override to load code into the target application and then simply use the Objective-C API's to access the window.
You could also try using applescript, but no idea if or how that is done.

Related

Can you attach a drawer to another application in Cocoa?

Is there a way for one Cocoa application to attach drawer-like windows to another application? We might for example want a terminal drawer that followed around a particular Finder window.
There is a program called DTerm that opens little transparent windows over Finder windows, but one might prefer persistence.
You may want to checkout SIMBL. It allows you to write nifty bundles that are loaded into the application your targeting. If you go along with it I'd reccomend using class dump to gather more information on the application your working with (although Im not sure it would work with Finder)

Launch application using openwith on mouse click

Can any one tell me about how to lanch a self-made application using the "openwith" feature of a mouse click event?
Your question is not very clear, but I understand it as "How do I tell the Finder that my application knows handle certain file types?". Once the Finder knows the link, it will suggest your application in the Open With submenu that appears when you ctrl/right-click on a file.
Have a look at the Apple documentation. Basically, you have to declare all the supported file types in Info.plist (or what you called it). The system is based on Universal Type Identifiers.

Question about applescript and expose

Using applescript, how can I get the "preview" of a window of an application? By preview I mean the preview window you see when you use expose on your mac. How can I get those video feeds using applescript, or if not applescript using cocoa framework?
Thanks!
You can't do it from AppleScript, but you can do it from C. See the Quartz Window Services functions and the Son of Grab example.

How do I inspect and activate other application’s menu?

Is it possible to inspect the main application menu of some already running application and execute commands from this menu? For example retrieve the whole main menu hierarchy of Safari and execute the File → New Tab command (by its name, not using the keyboard shortcut). I’m interested in an Objective-C solution.
One way to do this is using the Cocoa Accessibility API
For example,
NSAccessibilityPickAction Selects the
object, such as a menu item
You could use Applescript This is not exactly calling the menus but for a well written program provides the same functionality and using a defined and discoverable API.
To send the events see Scripting Bridge

What programming languages have access to the WinAPI?

I'm looking to start a new programming language and for my first task I want to overlay some text on another applications window, similar to the guy in this post:
Overlay text on some else's window - HUD
Clearly from that post, this can be done in VB.NET, and extrapolating from that, I can probably safely assume that C++\C# can also do this similarly.
My question is; are there any other languages that can do the same? Can Ruby do it? :)
I'm looking for the following capabilities:
Enumerate open windows to find the one I want to overlay on top of.
Overlay text on the 3rd party apps window. (Rich text is a bonus)
Detect window bounds so I can resize the text when the user resizes the window.
Allow click-through of my created text so it doesn't interfere with the 3rd party apps functionality.
Any ideas?
If you want to use Ruby, you have two options: IronRuby and "classic Ruby".
I guess IronRuby would be the preferred option on Windows as it runs on top of .NET and has access to full Windows API through that.
If .NET is too much for your needs and you need to do something simple, then classic Ruby might be a better fit.
For classic Ruby, check out these pages:
Ruby and Microsoft Windows
Microsoft Windows Support
Beware: argument packing and unpacking is not very convenient.