Replies: 4 comments 3 replies
-
http://stellarium.org/doc/0.21/classStelMainScriptAPI.html#a406729acbcd7991262d5bfd1991b1729 ? |
Beta Was this translation helpful? Give feedback.
-
Thank you very much,
but, how do you get the object you clicked on ? (getObjectData WARNING
- object not selected)
Regards,
Le 16/05/2021 à 20:57, Georg Zotti a écrit :
…
http://stellarium.org/doc/0.21/classStelMainScriptAPI.html#a406729acbcd7991262d5bfd1991b1729
<http://stellarium.org/doc/0.21/classStelMainScriptAPI.html#a406729acbcd7991262d5bfd1991b1729>
?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1674 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AT4WPXBA4FBI3Z4IJPGF2BDTOAIRBANCNFSM447D3XTQ>.
--
*********************************
Cindy Bellanger
ONERA/DOTA/CIO
BP 80100
91123 PALAISEAU Cedex
Tel : 01.80.38.63.84
***@***.***
*********************************
|
Beta Was this translation helpful? Give feedback.
-
Ah ok !
A thought it was possible to interact with a script.
Thank you very much for your answers.
Le 17/05/2021 à 11:09, Georg Zotti a écrit :
…
Obviously you must have an object selected before running the script.
There is no user interaction intended while a script is running.
|map=core.getSelectedObjectInfo(); core.output(map["name"]); |
or as documented in
http://stellarium.org/doc/0.21/classStelMainScriptAPI.html#aebaa4b5ef785df2227317844e95279d7
<http://stellarium.org/doc/0.21/classStelMainScriptAPI.html#aebaa4b5ef785df2227317844e95279d7>
|core.output(core.mapToString(map));|
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1674 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AT4WPXFEXSHDPYLQM5NZJJ3TODMNBANCNFSM447D3XTQ>.
--
*********************************
Cindy Bellanger
ONERA/DOTA/CIO
BP 80100
91123 PALAISEAU Cedex
Tel : 01.80.38.63.84
***@***.***
*********************************
|
Beta Was this translation helpful? Give feedback.
-
You could always add a keypress pause. That is, 1st ask the user to Select a Object, then pause the script to give them a chance and when they are done press to a key to continue. See example // Author: Qam1 // LabelMgr.deleteAllLabels(); txt1 = LabelMgr.labelScreen("Select any Object and then Press B to begin", 400, 100, false, 40, "#FF7777"); ob = ConstellationMgr.getFlagBoundaries(); kp = 0; while (kp == 0) cb = ConstellationMgr.getFlagBoundaries(); if (cb != ob) } ConstellationMgr.setFlagBoundaries(ob); LabelMgr.deleteAllLabels(); map=core.getSelectedObjectInfo(); name = map["localized-name"]; txt1 = LabelMgr.labelScreen("You Selected " + name, 400, 200, false, 40, "#FF7777"); core.wait(2); |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I am writing some scripts to plan future observations.
I am looking for a function equivalent to StelMainScriptAPI::getObjectInfo(name_of_the_object) but accessible by a click on the object in the map instead of the name. I will thus progam some calculus on the datas I recover for the selected object and display them.
Is there an easy way to realize such a function ?
Regards,
Beta Was this translation helpful? Give feedback.
All reactions