Page 1 of 1

Open the inspector by script

Posted: Sun Apr 11, 2021 7:14 pm
by Fermin
Hello, please... Is there a direct way to open by script the inspector of a control (field, graphic etc...) to edit its properties?
I'm trying with 'doMenu' but it doesn't seem to work. Is there any other way?

Code: Select all

on mouseUp
   if the optionkey is down then 
      select the target
      doMenu "Object Inspector" of menu "Object"
      exit to top
   end if
   -- etc...
end mouseUp
Thank you very much

I have read something on this forum but I guess there must be something simpler:
viewtopic.php?t=5943

Re: Open the inspector by script

Posted: Sun Apr 11, 2021 7:37 pm
by richmond62
Something wrong here:
-
SShot 2021-04-11 at 21.36.22.png
-
Oddly enough, while the doMenu command works, something subsequently screws up:
-
SShot 2021-04-11 at 21.39.40.png

Re: Open the inspector by script

Posted: Sun Apr 11, 2021 10:25 pm
by Fermin
Ok. I think I found a way:

Code: Select all

select menuItem 1 of menu "object" 
instead of:

Code: Select all

doMenu "Object Inspector" of menu "Object"

Re: Open the inspector by script

Posted: Mon Apr 12, 2021 6:59 am
by richmond62
Ok. I think I found a way:
Then the Documentation needs to be sorted out.

Re: Open the inspector by script

Posted: Mon Apr 12, 2021 6:47 pm
by Klaus
Hi friends,

I Have these scripts in my little personal tools palette to open the inspector for the current card resp. the current stack:

Code: Select all

...
## Card
revIDEOpenInspectorForObjects the long id of this cd of the topstack
...
## Stack 
revIDEOpenInspectorForObjects the long id of the topstack
...
Hope that helps!

HINT:
This will only work with LC >= 8!


Best

Klaus

Re: Open the inspector by script

Posted: Tue Apr 13, 2021 9:50 pm
by dunbarx
I think this has always worked:

Code: Select all

on mouseUp
   select menuItem 3 of menu "object"
end mouseUp
Craig