How to find object model of an OSX application? - macos

Is there any reference documentation on the object model of every OSX application? How can I know that finder has an home attribute and textedit has a document attribute?
Is there a way to inspect all commands and events I can use with applescript ?

You can drop the application onto (Apple)Script Editor to view the dictionary. With appscript you can also generate HTML format documentation.

If you're already in AppleScript Editor, you can also select File>Open Dictionary (Cmd-Shift-O) to see a open an application's dictionary. Script Debugger has an additional feature where it will organize running applications near the top of a submenu for ease of selection.

Related

MFC:CDHtmlDialog Purpose/Usages to open other views?

I was thinking of writing a new app where a users selects an option of what procedure they want to perform and the view changes to that until done then goes back to the main menu. I came across CDHtmlDialog and looked like a nice easy way to add a nice looking menu using html. But I wonder if that is the purpose of that class? Can I set it up so when a button or graphic link is clicked it changes out the view to another one (I would need to use traditional things like CTreeView with CListView with a splitter) or is it more for staying within the HTML world?
Thanks.
From the MSDN MSDN documentation
CDHtmlDialog Class is used to create dialog boxes that use HTML rather than dialog resources to implement their user interface.
From what I can gather from your post, I think you should consider SDI application using view classes that you want. To switch views on the command you do not need a splitter window. A static splitter is used to display a number of views in a different part of the splitter simultaneously.

Nativescript prompt dialog select all text

I was just wondering if it was possible to have a nativescript prompt dialog select all of the text upon opening without going so far as to create an entire custom dialog. I don't see any settings when creating it, but I was wondering if someone knew of a way to do this?
Thanks in advance.
The native dialog controller or the UI components inside are private to the dialogs module, not exported for public use. Hence you will need a custom one in order to operate on the textfield.

Is there a way to get table contents from 3rd party UWP application?

There is UWP application which has a table with data and no built-in way to export it anyhow.
Is there a way to "spy" on the window to at least get raw text content of the table, or all text of whole window?
Can WinAPI be used here, I wonder? Even the most "perverted" way will do.
EDIT: To clarify,
acceptable case: to get table contents "manually" as temporary measure;
desired case: to get table contents from within my own application.
If you just need a tool to see the UI contents, Windows SDK Inspect.exe could help you.
https://msdn.microsoft.com/en-us/library/dd318521(v=vs.85).aspx
If you want to write a program to interact with UI contents, use the Windows UIAutomation library. https://msdn.microsoft.com/en-us/library/windows/desktop/ee684009(v=vs.85).aspx. Previous url also shows some info on UIAutomation.

how to show a preference page using mozilla Add-on SDK?

I am developing an extension using the Addon-SDK. I want to show a preference page in order to get some users' configuration.
simple-prefs is too simple to use as its supported data type is so limited.
In a XUL app, I can use the following
<em:optionsType>3</em:optionsType>
<em:optionsURL>chrome://myaddon/content/options.html</em:optionsURL>
to set my preference page.
I found
the XUL migration guide
which says:
This is provided only as a migration aid, and it's still a good idea to port XUL windows to HTML.
How then can I make an HTML preference page ?
Many thanks!
I solved it in the following way:
Use simple-prefs with the preference type set to control. On its click event, open a page using the tab module, then use simple-storage to store data.
That's it!

Adding controls to a Property Sheet at runtime (without Dialog Templates)

As far as I can see, the way you normally create Property Sheets in Win32 (I am using the API, not MFC) programming is you have a bunch of dialog templates for each tab page, and you make the property sheet out of them. I have read about creating Dialog Templates 'in memory' but I would prefer not to do it this way. How do you add controls to a Property Sheet programatically at runtime, just like you can create a BUTTON and add it to a Window at runtime?
I suggest that you create a blank template and link that to your app. You can then create the property sheet with CreatePropertySheetPage and then add and remove controls to that property sheet as you please.
If you absolutely have to use a template built on the fly in memory, and you can't bring yourself to link a resource to your app, then you need the DLGTEMPLATE structure.

Resources