Jump to content

Locking the back window


JGP

This topic is 6453 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I hoping i've got the right area to post this query.

I'm trying to get it that when my solution opens a new window from a button click that the new window in front is the only one selectable and if you click on the back window it stays in the back until you have clicked a close/commit button on the front layout.

I've had rough success with this through the pause script step in the button script that creates the new window, but doing it this way needs the operator to click the cancel/continue button in the status area. My solution doesn't use the status area in any of the layouts so i was hoping there is a script step that i'm not seeing that may achieve my goal.

Any help would be appreciated.

Thanks in adavnce

JP

Link to comment
Share on other sites

Yes you can actually add any scripted button but be sure to change the "pause script" to "exit script" when defining the button.

[color:red]WARNING the example below could trap your solution in a perminantly paused loop do not add it to a solution unless you are confident you are clear how it works and make sure you have a backup before adding it... Your playing with fire.

Example:

Pause script =

Allow user abort [ off ]

New Window

Go To Layout [ Layout with exit button ]

Hide & Lock Status Area

Loop

Pause [ indefinite ]

End Loop

On the layout include a button with your close window button.

When assigning the script to the button you MUST change "Pause Script" to "Exit Script"... This will exit your loop before closing your window.

Link to comment
Share on other sites

Instead of relying on the Status Area to exit the script you might consider using buttons with scripts assigned to them. In the Button Setup Dialog you'll use to assign scripts to layout objects you'll notice that under Options: Current Script you can Halt (or Exit or Resume or Pause) the current script. In your case it sounds like you'd want to select Halt.

Hope this helps.

Oops, sorry Stuart, I didn't refresh page in time to see your post.

Edited by Guest
Link to comment
Share on other sites

Thanks guys for your feedback. I ran with Stuarts Exit script in the perform script dialog. (after one turn at having the never ending loop. backed up first though). Worked a treat.

Stuart do you see any problem with this style of script in a solution for a client either in FM or runtime?

Once again thanks for your earlier help.

Link to comment
Share on other sites

Hi,

I only ever had one issue. I deploy this in complex database systems and its a very interesting way to make make your database lockup even if you have developer level access. Its easy to bury the unlock button somewhere and add modkeys to the mix.

Anyway...

Only problem i had was a logout script i wrote that ended up looping back to a window about 5 times before exiting and as i did not have developer 6 could not find the cause of the loop. or simulate it.

Apart from that its fine.

Edited by Guest
Link to comment
Share on other sites

This topic is 6453 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.