Here is an O2 Script/API that helps to find the control to script (via the script_Me extension method)
Let's say that you have a script that opens a Findings Viewer:
Which looks like this:
By adding a reference to the API_HackEye.cs you can call the openControlFinder (via the new REPL menu added)
This will open up a popup window with the HawkEye
Drag the eye (i.e. the target icon) on top of a control to see its properties, and click on the 'Open ScriptMe for this control' link:
This will open a script editor, with the selected object passed as a parameter:
Note that this will only work for WinForm controls that exist in the current .NET process.
Source Code: