Sample WinBatch Script To Automate Sending Faxes to MS Fax from FileMaker Pro
Keywords: FileMaker Pro Fax
Once you have a button set up in FileMaker Pro, you can use the following WinBatch script to send keystrokes to your Print Dialog boxes:;mountain.wbt WinActivate("FileMaker Pro") Sendmenusto("FileMaker Pro", "File Print") WinWaitExist("Print", 6) Sendkeysto("Print", "{TAB}") ;to initiate the cursor Sendkeysto("Print", "!n!n!{DOWN}m{ENTER}{ENTER}") WinWaitExist("Compose New Fax", 15) Sendkeysto("Compose New Fax", "{TAB}{TAB}{TAB}{ENTER}") Sendkeysto("Compose New Fax", "!f{TAB}") Sendkeysto("Compose New Fax", "^v{ENTER}") Sendkeysto("Compose New Fax", "!n{ENTER}") Sendkeysto("Compose New Fax", "{ENTER}{ENTER}{ENTER}") WinActivate("FileMaker Pro")Steps to Customize a Button Bar in FileMaker Pro Associated with a WinBatch Script:
- Start up FileMaker Pro and open an existing template, such as "Fax Cover Sheets."
- Add a new record.
- Change from Browse mode to Layout mode.
- Click on your button you want to customize.
- Go into the Format menu. Go down to Button. The cursor will be on "Perform script". Below under Options: "Specify", where it says "unknown", change that to "Fax", and hit OK.
- Go into the Script menu. Go down to Scriptmaker. On "Fax", hit ENTER, which brings up a Dialog box. Hit "Clear All" on bottom left. You'll see a menu in the left column. Scroll down to the Editing section. Double click on Copy. This moves you to the right column, and under "Specify", "Field", choose "Fax number". Select "Select Entire Contents" and then hit OK.
- Then, in the left column, under Miscellaneous, doubleclick on Send Message. Click on Specify. Then select the radio button next to "File", and hit the Specify button, is where you will specify the name of the WBT file (above), in this case "mountain.wbt". Make sure that the "Bring target application to foreground" box is checked.
- Hit OK, then OK again, then Done.
- Now go back to the Browse mode by clicking on Layout.
- Then click on Your Own Button to launch the script.
Related Question:
I have attempted to use the example above. I tried the script many times, but it fails to capture the MS Fax Driver on the "Print" Window. It is able to tab to the "Name:" of Printer. However, "!n!n!{DOWN}m{ENTER}{ENTER}" does not seem to be able to swith from HP Laserjet 5P into MS Fax. The above sequence of keystrokes seems to work when I enters the keys manually. I am using window 95 and FileMaker Pro 3.0. Please advice what I am doing wrong.I have also tried the Sendkeys command without much success. Please advice. Thank you.
Answer:
If you can figure out what it *does* do and work backwards, then you should be able to figure out the mistake it is making. The script is probably tailored towards one particular computer system.In cases like this I have seen many times that another {DOWN} was needed.
Article ID: W13011Filename: WB Script for MS Fax.txt