Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Script works differently one layout to the other


bigzilla

Recommended Posts

Why is it that I can run a script in one Layout and it works perfectly. Then I call the same script from another file and it doesn't work the same way. I have a script that in my [Lines] file opens up the "Report layout" and centers the screen. When I call this same script from my [Customer] layout, it opens the [Lines] file and the "Report" layout, but the screen is at the bottom right of my screen. But if I run the script again from my [Lines] file, the "Report" layout centers in the screen! What gives?

 

In other versions of FMP, you called a script an it did just as it would as if you were in that file. Is there something else I need to do that is unique to 7? BTW I'm using the separate file method if that makes a difference. I've messed with this for a couple days now trying different things, but I've run out of ideas.

 

Thanks for your help,

 

Bill

Link to comment
Share on other sites

Hi Ender and thanks for your reply. The script I'm using is;

Allow User Abort [Off]

Set Window Title [Current Window; New Title “Mail”]

Go to Layout [Reports] (Restof)

Commit Records/Requests ()

Set Zoom Level [75%]

Set Zoom Level [100%]

Adjust Window [Resize to Fit]

*Move/Resize Window

Refresh Window

 

 

*Window Name

Height: Get ( WindowContentHeight ) + 37

Width: Get ( WindowContentWidth ) + 15

Distance from top: (Get ( ScreenHeight ) - Get ( WindowContentHeight )) / 3

Distance from left: (Get ( ScreenWidth ) - Get ( WindowContentWidth )) / 2

 

As I said it works great in the file it resides, but does not work correctly when called from a different file.

 

Bill

Link to comment
Share on other sites

If the external file is active, then Current Window refers to that file's window. I would think this could be a major problem.

Link to comment
Share on other sites

Hi Ender,

 

I took the Current window step out but it does not work. Let me ask the question differently.

 

How would you write a script that goes to another file and opens a layout in the middle of the screen. That's all I really want to do!

 

Thanks Ender,

 

Harry

Link to comment
Share on other sites

Nope, same thing. It's fine in the layout it's in. But when I call it from another file it opens at the bottom of the screen.

 

Bill

Link to comment
Share on other sites

In the file you are leaving, write:

 

Toggle window (Minimize)

Perform Script (External) This to call the script which centers the window in the target file.

 

Be well . . .

 

Tom

Link to comment
Share on other sites

Hi Guys,

 

Well, I think I'm missing something here. Maybe I'm putting the script steps in the wrong place, but it's not working. Maybe you can spell that out for me a little more!

 

All I want to happen when this script is called is to center the window, regrdless of where someone left it. If they want to move the screens, that's fine, but when the script is called, I need to have the layout centered on the screen from one file to the next.

 

Don't quit on me now guys, I think we're almost there!

 

Bill

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...

Important Information

Terms of Use