Is it currently possible to get the HWND for a given control in a script dialog?
I thought it was the same as the Dialog object itself, so if you cast it to a string you could get the dialog's window HWND, but it looks like this doesn't apply to controls.
I was playing around to see if I could do some things with windows like AutoHotkey does, but using other languages.
Specifically, I tried to embed a magnifier into an Opus dialog, which actually works very well, but since I don't know the control's HWND, I have to use a placeholder and then search through all controls.
If you're doing it from a language that knows about HWNDs, you should be able to find it directly using the Windows API (e.g. EnumChildWindows, then checking the window class, title and/or ID).
BTW, the color picker that's built into Opus has a magnifier already. I think you can already use it via color buttons (similar to the ones in Preferences), but we could expose other ways of using it to scripting if they're needed.
Yes, that's what I was doing. It's not really a big deal since there are only a few controls, but I was wondering if there's a way to get the ID, since that would be more direct.
That would be nice, I guess; the more features, the better .
This is really just a test script, but I imagine the idea can be expanded into much more useful things, e.g. showing locations on a map in real time based on the info from a selected photo, etc.