March 29, 200223 yr Hi there, Don't know if you can help me but i'm trying to make a script. I have a dbase with addresses and 3 different layouts. On my keyboard-port i have a chipscanner. After i scan a chip, i want to save the date(9 numbers), and then print one of the layouts (depending on data in dbase). And if it's possible with only one confirmation max to print the active record. Then program should go to the next record. Scan new chip and print layout. Don't know if you understand what i'm talking about but thx in advance if you can help. Siegbert
March 30, 200223 yr You can enter the date automatically, as a modified on field type. The printing depending on the data can be made with an if statement, and the loops can take you to next records. However, I am not sure of what you are really trying to do. Maybe you could give us more explanations, and tell us a little more about the whole process. Is the scanning done automatically? do you want users to interact with each records? Do you create a new record each time you scan, or is it an upddate of an existing record?
March 30, 200223 yr You can do this without any extra user interaction, either by: 1) Starting a looping script, and setting your scanner to add Enter after each scan, to continue the script (most scanners can do this); or 2) If your scanner supports control characters, you can make it run a script by number from the script menu. Either way, the script can create a new record, or add to an existing record, and/or go to layouts, print with no dialog, etc. etc. What part of the script is giving you trouble?
April 2, 200223 yr Author Hi, Maybe some more information to explain problem. I have a dbase with addresses. Every address has a layout nr (1, 2 or 3). Every layout nr corresponds with a different A4 lettre. I also have an empty column that has to contain data (sorry, not date). On my mouseport i have a scanner. The goal is that I can go to my tableview and go to an address. I have some keychains(chips) that contain a number (data). When I put the chip on the scanner, he reads the data an enters (i can see that in excel). What i want the script to do is automaticcaly select and print the correct layout and go to the next address. The problem is I know nothing about scripts in filemaker (usually work on pc and access). Don't know how loop works etc. My script would be If ["layout = 1"] Go to layout ["layout_lettre1"] Print [] end if If ["layout = 2"] .... Thats about everything i got so far. If you could give me some more advice, that would be very kind. Thx in advance.
April 2, 200223 yr A Loop simply repeats a series of script steps until you cancel it or a certain condition is met (e.g. the last record is reached). It looks like you're familiar with If() statements, you're on the right track there. Loops use the same kind of logic. However, another way to get a similar effect is to simply put a Perform Script("your same script") at the end of the script, so it will keep repeating until you cancel. Now then, it sounds like you are not creating new records, but are scanning data into existing records. Your script would be: Go to layout [the scanning layout] Go to field [the scan field] Pause # here is where you scan, followed by Enter If ["layout = 1"] Go to layout ["layout_lettre1"] Print [no dialog] end if If ["layout = 2"] ....etc. end if Go to record [next, exit after last] Perform script [this script]
April 11, 200223 yr Author Thx, It worked. Now I just have to change my forms a little and we're there. Thx
Create an account or sign in to comment