Newbies Phil66 0 Posted December 7, 2020 Newbies Share Posted December 7, 2020 I am trying to capture the object name of a slide using the OnPanelSwitch script trigger so that I can return to the slide after going to another layout. The problem is that because the script trigger is pre (processed) it captures the name of the slide that it is leaving not the current slide it arrives at. This is the script that it triggers: Set Variable [ $panellnfo ; Value: Get ( TriggerCurrentPanel ) ] Set Variable [ $$objectName ; Value: GetValue ( $panellnfo ; 2 ) ] Any ideas...? Link to post Share on other sites
comment 1,817 Posted December 7, 2020 Share Posted December 7, 2020 (edited) I am not sure I fully understand the scenario you describe. In any case: the Get ( TriggerCurrentPanel ) function returns the index and object name of the panel to switch from when the OnPanelSwitch script trigger is activated; the Get ( TriggerTargetPanel ) function returns the index and the object name of the panel to switch to when the OnPanelSwitch script trigger is activated. Note that unless your script exits with a false result, the triggering event will be processed immediately after the script has run out - so it's not clear why you need this. Edited December 9, 2020 by comment Link to post Share on other sites
Newbies Phil66 0 Posted December 7, 2020 Author Newbies Share Posted December 7, 2020 Thank you, I didn't know about Get(TriggerTargetPanel) for some reason. That works wonderfully. Just a quick follow up question. Get(TriggerCurrentPanel)and Get(TriggerCurrentPanel) return a list that contain the "slide number" and the slide object name. Can the slide number be used in any useful way to navigate to a slide. That would be handy as I wouldn't have name all the slides and could move them around in order with out renaming them into the right sequence order. Thank you again for your reply Link to post Share on other sites
comment 1,817 Posted December 8, 2020 Share Posted December 8, 2020 7 hours ago, Phil66 said: Can the slide number be used in any useful way to navigate to a slide. Not that I know of. Link to post Share on other sites
Steve Martino 44 Posted December 8, 2020 Share Posted December 8, 2020 I fell into this vortex when I redid my business solution with FM16 a few years ago. I think I know what you are going for. The problem for me was it got so complicated (for me) with all the script triggers, and global variables, and calculations, that adding/editing layouts became such a headache. It wouldn't always refresh, or if on panel had a portal, that would cause a hit/delay. Sometimes refresh object/refresh portal, refresh layout wouldn't work consistently. I ended up abandoning that and continuing with simpler layouts. Link to post Share on other sites
Newbies Phil66 0 Posted December 9, 2020 Author Newbies Share Posted December 9, 2020 On 12/8/2020 at 5:49 PM, comment said: Not that I know of. Yes it seems unnecessary. Thanks again 9 hours ago, Steve Martino said: I fell into this vortex when I redid my business solution with FM16 a few years ago. I think I know what you are going for. The problem for me was it got so complicated (for me) with all the script triggers, and global variables, and calculations, that adding/editing layouts became such a headache. It wouldn't always refresh, or if on panel had a portal, that would cause a hit/delay. Sometimes refresh object/refresh portal, refresh layout wouldn't work consistently. I ended up abandoning that and continuing with simpler layouts. 9 hours ago, Steve Martino said: I fell into this vortex when I redid my business solution with FM16 a few years ago. I think I know what you are going for. The problem for me was it got so complicated (for me) with all the script triggers, and global variables, and calculations, that adding/editing layouts became such a headache. It wouldn't always refresh, or if on panel had a portal, that would cause a hit/delay. Sometimes refresh object/refresh portal, refresh layout wouldn't work consistently. I ended up abandoning that and continuing with simpler layouts. agreed things get out of hand pretty quickly but my problem in this case was simply not knowing the right script trigger Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now