September 17, 200619 yr 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
September 17, 200619 yr 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.
September 17, 200619 yr 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 September 17, 200619 yr by Guest
September 17, 200619 yr Bazaarly i actually wrote this post last night before i went to bed but forgot to post it ... so we actually posted this at pretty much the same time ... I didn't refresh before posting either so 10 more minutes and the roles would have been reversed... :)
September 17, 200619 yr Author 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.
September 18, 200619 yr FWIW I haev a60db solution that works like this in thousands of scripts - no problems!
September 18, 200619 yr 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 September 18, 200619 yr by Guest
Create an account or sign in to comment