Jump to content

Possible FAQ for someone to post about


yafreax
 Share

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

Recommended Posts

Okay, i know this is a pretty simple question, (it has to be if i understand it!!!) but it seems to me that a lot of posters sometimes have problems with getting there scripts to end in the right database. Maybe one of you guys should right a FAQ about the different reasons it may be. . .

just a thought

yafreax

Link to comment
Share on other sites

  • 2 weeks later...

I'll start thinking about it.

Yafreax, can you describe and example of the problem?

It sounds like it's a "running external scripts" problem.

Link to comment
Share on other sites

yeah, you haven't noticed all the people that ask why their scripts won't end in the right database?!?!?! I see it all the time, sometimes as just a side question off the main problem.

but yeah, basically when they're running external scripts they end up having the last script step in the wrong database.

The only reason i know is the that FM will end in the database that has the last performed script step in it. So the solution is to put a halt/exit/resume script step in whichever database you want to end in. But it gets a little more complicated if you want to do one thing then switch DB's then switch again, and again, etc.

This used to be a closed, read only forum, that's why i asked about one of you guys doing it and putting it in a seperate post. Plus you could probably explain it a little more clearly and go a little deeper than i can (if need be)

jeremy

Link to comment
Share on other sites

  • 1 month later...

Very briefly, here is how I do it...

Suppose we're currently in dbA and want to end up in dbB. Create a script in dbB that (in this order) changes to the desired layout, then uses the "Refresh Window [bring to front]" script step.

In db A, create a script that (in this order) performs the dbB script externally, then uses the "Toggle Windows [Hide]" command.

The result is that the second database is opened and brought forward, and the first is hidden from view.

I also put in script steps to zoom, maximise and control the ststus bar, but these are optional.

Link to comment
Share on other sites

The way I handle external scripts is I use the "Exit Script" and "Halt Script" steps.

Remember that "Exit Script" just exits the current script that's running. If the script was called from another script, the original script continues to the next step. "Halt Script" stops ALL scripts that are running.

With that in mind, I use the "Exit Script" step in external scripts - unless at that point in the script I want to end up in that file, then I use "Halt Script". In the Main Script I always place a "Halt Script" at the very end of the script - that way the original file ends up being the active file.

I have also used an "OnTop" script that has just two steps: "Refresh Window - Bring to Front" and "Halt Script". Put this script in each file - then if you want to end up in that file, just call that external script in the file as the last script step.

Link to comment
Share on other sites

  • 2 weeks later...

The problem with Halt Script steps is that there might be a need to have another script running "in the background" to peform some task -- halt will kill it.

I try to avoid (or at least minimise the use of) scripts that rely on Halt or copy/paste steps.

Link to comment
Share on other sites

This topic is 7465 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
 Share

×
×
  • Create New...

Important Information

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