![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Does anyone know how to detect the Layout mode in script? The funny is when you try to use the function Get(WindowMode) FileMaker goes to Browse mode and this function returns Browse mode state. |
#3
| |||
| |||
|
|
Does anyone know how to detect the Layout mode in script? The funny is when you try to use the function Get(WindowMode) FileMaker goes to Browse mode and this function returns Browse mode state. |
#4
| |||
| |||
|
|
In article <1170161076.929000.100... (AT) v33g2000cwv (DOT) googlegroups.com>, "DataApex" <h... (AT) dataapex (DOT) com> wrote: Does anyone know how to detect the Layout mode in script? The funny is when you try to use the function Get(WindowMode) FileMaker goes to Browse mode and this function returns Browse mode state. It's not the Get(WindowMode) command. You simply can't run scripts in Layout mode. Obviously buttons won't work in Layout mode, but as soon as you run a script via the keyboard shortcut or menu FileMaker switches back to Browse mode - even a simple script that simply has just the Beep command. I can't think of any real reason you would want to. There's not even any script commands for manipulating layouts or layout objects. Helpful Harry Hopefully helping harassed humans happily handle handiwork hardships ;o) |
#5
| |||
| |||
|
|
On Jan 31, 1:36 am, Helpful Harry <helpful_ha... (AT) nom (DOT) de.plume.com wrote: In article <1170161076.929000.100... (AT) v33g2000cwv (DOT) googlegroups.com>, "DataApex" <h... (AT) dataapex (DOT) com> wrote: Does anyone know how to detect the Layout mode in script? The funny is when you try to use the function Get(WindowMode) FileMaker goes to Browse mode and this function returns Browse mode state. It's not the Get(WindowMode) command. You simply can't run scripts in Layout mode. Obviously buttons won't work in Layout mode, but as soon as you run a script via the keyboard shortcut or menu FileMaker switches back to Browse mode - even a simple script that simply has just the Beep command. I can't think of any real reason you would want to. There's not even any script commands for manipulating layouts or layout objects. Helpful Harry Hopefully helping harassed humans happily handle handiwork hardships ;o) There is one reason I think. We use FM DB as company Information System and we continously modify their functions "under run" which is interrupt every time a automatic script is recalled. We would like to periodically call special scripts by means of SFire plugin (Dacons). For instance: - Logout script every 10 minutes to keep DB protected when operator leave computer and forget to logout manually - Commit script every let say 1-2 minutes to release record modified somebody who forget to release it manualy. - Periodically update exchange ratio provided by internet connection - Periodically synchronise with other IS and simultaneuosly we need to develop, modify and correct layouts (our system consists of apx. 20 files, 60 tables and 100 layouts). So we need to detect Layout mode and block automatic scripts not disturb a developer by automatic switching to Browse mode. Probably our approach is not perfect and probably some of these requirements might be solved by different approach, however we consider this one as the easiest. Anyway I would appreciate any advise. Thank you Jan Hruby DataApex |
#6
| |||
| |||
|
|
I would strongly recommend not having your developers work on a open and shared solution. You're opening yourself up for a host (pun intended) of issues, including scripts not functioning correctly, users being locked out of records, changes not being saved, etc. |
#7
| |||
| |||
|
|
On Jan 31, 1:36 am, Helpful Harry <helpful_ha... (AT) nom (DOT) de.plume.com wrote: In article <1170161076.929000.100... (AT) v33g2000cwv (DOT) googlegroups.com>, "DataApex" <h... (AT) dataapex (DOT) com> wrote: Does anyone know how to detect the Layout mode in script? The funny is when you try to use the function Get(WindowMode) FileMaker goes to Browse mode and this function returns Browse mode state. It's not the Get(WindowMode) command. You simply can't run scripts in Layout mode. Obviously buttons won't work in Layout mode, but as soon as you run a script via the keyboard shortcut or menu FileMaker switches back to Browse mode - even a simple script that simply has just the Beep command. I can't think of any real reason you would want to. There's not even any script commands for manipulating layouts or layout objects. Helpful Harry Hopefully helping harassed humans happily handle handiwork hardships ;o) There is one reason I think. We use FM DB as company Information System and we continously modify their functions "under run" which is interrupt every time a automatic script is recalled. We would like to periodically call special scripts by means of SFire plugin (Dacons). For instance: - Logout script every 10 minutes to keep DB protected when operator leave computer and forget to logout manually - Commit script every let say 1-2 minutes to release record modified somebody who forget to release it manualy. - Periodically update exchange ratio provided by internet connection - Periodically synchronise with other IS and simultaneuosly we need to develop, modify and correct layouts (our system consists of apx. 20 files, 60 tables and 100 layouts). So we need to detect Layout mode and block automatic scripts not disturb a developer by automatic switching to Browse mode. Probably our approach is not perfect and probably some of these requirements might be solved by different approach, however we consider this one as the easiest. Anyway I would appreciate any advise. Thank you Jan Hruby DataApex |
#8
| |||
| |||
|
|
In article <1170228739.801418.217... (AT) a75g2000cwd (DOT) googlegroups.com>, "DataApex" <h... (AT) dataapex (DOT) com> wrote: On Jan 31, 1:36 am, Helpful Harry <helpful_ha... (AT) nom (DOT) de.plume.com wrote: In article <1170161076.929000.100... (AT) v33g2000cwv (DOT) googlegroups.com>, "DataApex" <h... (AT) dataapex (DOT) com> wrote: Does anyone know how to detect the Layout mode in script? The funny is when you try to use the function Get(WindowMode) FileMaker goes to Browse mode and this function returns Browse mode state. It's not the Get(WindowMode) command. You simply can't run scripts in Layout mode. Obviously buttons won't work in Layout mode, but as soon as you run a script via the keyboard shortcut or menu FileMaker switches back to Browse mode - even a simple script that simply has just the Beep command. I can't think of any real reason you would want to. There's not even any script commands for manipulating layouts or layout objects. Helpful Harry Hopefully helping harassed humans happily handle handiwork hardships ;o) There is one reason I think. We use FM DB as company Information System and we continously modify their functions "under run" which is interrupt every time a automatic script is recalled. We would like to periodically call special scripts by means of SFire plugin (Dacons). For instance: - Logout script every 10 minutes to keep DB protected when operator leave computer and forget to logout manually - Commit script every let say 1-2 minutes to release record modified somebody who forget to release it manualy. - Periodically update exchange ratio provided by internet connection - Periodically synchronise with other IS and simultaneuosly we need to develop, modify and correct layouts (our system consists of apx. 20 files, 60 tables and 100 layouts). So we need to detect Layout mode and block automatic scripts not disturb a developer by automatic switching to Browse mode. Probably our approach is not perfect and probably some of these requirements might be solved by different approach, however we consider this one as the easiest. Anyway I would appreciate any advise. Thank you Jan Hruby DataApex Since the scripts are being called via a plug-in and not FileMaker itself, then it is a possibility that FileMaker doesn't automatically go into Browse Mode until you hit that Get(WindowMode) function, as you said ... although I wouldn't like to bet on it. Assuming that's true, you could try using the Get(CurrentUserName) function instead. In the developer's copy of FileMaker go to the Preferences and set the User Name to be a custom one of "Developer" (for example). Then your scripts could start by testing for that user and only continue if it's not the developer. ie. If (Get(CurrentUserName) = "Developer") Exit Script End If {continue with normal script} Helpful Harry Hopefully helping harassed humans happily handle handiwork hardships ;o)- Hide quoted text - - Show quoted text - |
#9
| |||
| |||
|
|
To Paul: Yes you are right the possibility to work on a open and shared solution is a fantastic advantage balancing a lot of FM weak points. As in-house developer (and company co-owner) for more than 10 years I'm tottaly satisfied with so flexible style of work. As SW company with 20 employees we need to react to changes of company structure, current projects and new technologies quickly, flexibly without downtime. |

|
A special edit layout (similarly to a special find layout) represents 2 (3) times more work when you need to change any item in layout and definitelly it causes inconsistency. |
|
Periodic items mean for instance displaying current date, and current exchange ratio. These items are actualized everytime when the DB is initialized during start, however our PCs (surprisingly, except programmers of coarse) don't shut down for weeks. Yes there are other posibility how to hook them on some other event however a timer would be simplest and reliable solution.... |
#10
| |||
| |||
|
| I agree completely, but if you want to force people to exit records I |
| because I have 2 things I wish to add : |
![]() |
| Thread Tools | |
| Display Modes | |
| |