How to access scripts on a modal card that is stuck / not visible?

Keith Clarke keith.clarke at me.com
Fri Mar 18 18:31:28 EDT 2022


Thanks all for the hints and tips. I was able to access the guilty scripts from the message bar using edit script of <control> Thanks Jaque!

As this is just for a personal utility, I’ve made the Browser widget (which is only used for login) act as a rough and ready ‘modal dialogue’...
- Browser widget sized to cover all clickable elements on the card other than a “Cancel” button, with its visible set to false
- “Login” button with script to set the visible of control “Browser” to true and then build and set its authorisation request URL and headers
- Browser widget script with browserNavigateComplete to confirm arrival at the post-authentication callback URL and then set the access_token of the stack (for global access) and set the visible of control “Browser” to false

Seems to work OK, so now I can concentrate on the web service data - and the reason why I started building the stack!
Best,
Keith 

> On 18 Mar 2022, at 17:23, J. Landman Gay via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Modes are only for stacks and can't be used for individual cards. It sounds like the whole stack is going modal. There are several ways to edit a script for a control.
> 
> 1. Click the script lines in the project browser, or right click the control in the app browser and choose "edit script".
> 2. In the message box: edit script of <control>. I.e., edit script of btn 1
> 3. Turn off messages in the toolbar. Then you can edit scripts as usual.
> 4. Choose the edit tool, right click the control, choose to edit the script.
> 5. If the stack is already in modal mode, use the message box to: toplevel <stack name>. Or Cmd-Opt-Shift click the stack and choose toplevel from the Mode menu item. (I assume on Windows that's control-alt-shift.)
> 
> There are also other keyboard shortcuts but those should get you started. Since the mode doesn't change unless you click the button, you should be able to edit the script normally if you don't do that.
> 
> You can display a substack as a modal login, or use a group on the current card.
> 
> --
> Jacqueline Landman Gay | jacque at hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com



More information about the use-livecode mailing list