VISUAL QUICKPRO GUIDE FileMaker Pro 7 Advanced FOR WINDOWS AND MACINTOSH [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

VISUAL QUICKPRO GUIDE FileMaker Pro 7 Advanced FOR WINDOWS AND MACINTOSH [Electronic resources] - نسخه متنی

Cynthia L. Baron, Daniel Peck

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید











Fixing Typical Errors


Some errors are classics: They crop up in every new scripter's efforts and are all very easily fixed. Before you try troubleshooting your scripts from scratch, check this group of suggested problems and their solutions.

To fix missing or wrong records



1 .If the troublesome script is supposed to find a certain set of records, choose Scripts > ScriptMaker (Control+Shift+S/ Command+Shift+S).

2 .In the Define Scripts dialog box, double-click the script you want to check.

3 .When the Edit Script dialog box appears, double-click the Perform Find step in the script-assembly list.

4 .

When the Specify Find Requests dialog box appears, double-click to select the Find Request for the script you are running (Figure 10.3).

Figure 10.3. Update the Find Request by correcting its specifications.


5 .When the Edit Find Request dialog box appears, check the Action drop-down list to verify that the right selectionFind Records or Omit Recordswas selected (Figure 10.4).

Figure 10.4. Choose to do a regular or an inverted Find in the Action drop-down list.


[View full size image]

6 .Highlight the Find Request to see the Find criteria last used by the script. Make the necessary changes in the "Find records when:" and Criteria sections. Click OK four times to finish.


To fix an incorrect sort



1 .If your script has any Find steps, make sure you follow the steps in the previous section "To fix missing or wrong records."

2 .

Choose Scripts > ScriptMaker (Control+Shift+S/Command+Shift+S).

3 .In the Define Scripts dialog box, double-click the script you want to check.

4 .When the Edit Script dialog box appears, double-click the SortRecords step in the script-assembly list.

5 .

When the Sort Records dialog box appears, check that the table occurrence in the drop-down list on the left is correct. Change the sort fields and their order as needed (Figure 10.5). Click OK three times to finish.

Figure 10.5. Update the Sort Records information by reordering them in the Sort Records dialog box.



To fix an incorrect print format



1 .Choose Scripts > ScriptMaker (Control+Shift+S/Command+Shift+S).

2 .In the Define Scripts dialog box, double-click the script you want to check.

3 .

When the Edit Script dialog box appears, double-click the Print or Print Setup steps in the script-assembly list. When the Print or Print Setup dialog box appears, change the format as needed. Click OK.

4 .In the Script Step Options section, uncheck "Perform without dialog" if it is checked (Figure 10.6).

Figure 10.6. When you uncheck "Perform without dialog," the script will pause and let you see the print settings and change them if necessary.


5 .Click OK, then click Perform to check the script. If the correct print settings appear, double-click the script again. In the Edit Script dialog box, select the Print or Print Setup script step you changed, and recheck "Perform without dialog." Click OK twice to finish.


To make a script end on a different layout



1 .Choose Scripts > ScriptMaker (Control+Shift+S/Command+Shift+S).

2 .In the Define Scripts dialog box, double-click the script.

3 .When the Edit Script dialog box appears, highlight the last script step in the script-assembly list (Figure 10.7).

Figure 10.7. Highlighting a script step allows you to insert a new step directly below it.


4 .

In the Navigation section of the step list on the left, double-click Go to Layout.

5 .

In Script Step Options, choose the layout you want the script to end on from the Specify drop-down menu (Figure 10.8). Click OK three times to finish.

Figure 10.8. You can choose any layout as the ending place for the script.



.Tip

If you end a script with a sub-script, the sub-script, in effect, becomes the main script. This can be confusing if the sub-script calls information from another file, because it can leave you in the external file if that file contains the last selected window. The solution is simple: Add a Navigation script step to the end of the main script. We recommend Go to Layout, using the default option of "original layout," to end up in the same layout you were in before you ran the script.

To fix a loop that won' t end



1 .Choose Scripts > ScriptMaker (Control+Shift+S/Command+Shift+S).

2 .In the Define Scripts dialog box, double-click the script.

3 .When the Edit Script dialog box appears, look for a Go to Record/Request/Page step. If you see one, click to select it.

4 .

Under Script Step Options, check the "Exit after last" check box (Figure 10.9). Click OK, twice to finish.

Figure 10.9. Make sure that the script exits after the last record.


5 .If you have no Go to Record/Request/Page step, look for an Exit Loop If step. If you don't find one, click to select the step above the End Loop step (Figure 10.10).

Figure 10.10. This script has no step to tell it when to exit the loop.


6 .In the step list on the left, double-click Exit Loop If.

7 .Under Script Step Options, click Specify to bring up the Specify Calculation dialog box and specify the circumstances under which you want the script to end. Click OK three times to finish.

In our example, we have the loop exit when the counter is greater than 10 (Figure 10.11).

Figure 10.11. Looping scripts need to be told when to exit.



Tip


The Allow User Abort script step (Figure 10.12) controls whether you can cancel a running script. When you're creating and testing scripts that contain loops, add it as the first line of your script and set its option to On. When the script runs, you can stop it by pressing Escape (Windows) or Command+period (Macintosh). If you have sub-scripts in your script that call steps you might want to cancel, you'll need to place an Allow User Abort step in them and turn it on as well.

Figure 10.12. This loop has no Exit condition, so it will never end unless you can manually cancel the script.


You can cause yourself problems if you cancel a script before it finishes. Caught in mid-stream, an unfinished script leaves an inconsistent database with some records processed and some untouched. To avoid creating problems instead of solving them, remember to turn the Allow User Abort option to Off after you've finished troubleshooting. Otherwise, if your script has a step in it that already includes a pause for input (like a Find request), a Cancel button will appear in the status area and someone could click Cancel instead of Continue (Figure 10.13).

Figure 10.13. When Allow User Abort is on, the Cancel button appears in Find mode.



/ 227