Jump to content

SuperMacGuy

Members
  • Posts

    29
  • Joined

  • Last visited

SuperMacGuy's Achievements

Contributor

Contributor (5/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. My db currently relies on a lot of script steps and some significant Applescript steps. Has anyone tested Applescript or scripts in general to say if everything seems OK, or are there some issues? Going from FM7 to FM11 there was a bug in using Applescript where there needed to be something changed in a script because it went from synchronous to asynchronous running. Something like a delay or pause needed to be added after certain steps. I want to make sure I'm not caught out by anything like this in 12. Thanks Chris
  2. My operation here could be done in just one database, assuming a couple variables were filled in. I should have described more what it does. I need to find for each of my printers, the last record of the week. So there will be 6 records found in the end, one for each "printer1,2,3,etc". I was trying to loop through to do the find request for a printer based on the printer name and week it printed, then sort those records by date, then save the unique identifier in my Applescript variable. Then repeat. Once I have all the unique identifiers, I can show only those records in the db by finding for each one. Not sure how to save a found record's data in FM as a list, and I don't think I can 'mark' a record as found (I don't want to change the db to add fields just for this).
  3. I have a script that works great in Script Editor, but does not work in FMP natively. I have a repeat loop in the script. I have pasted the entire Applescript into just one FM Script step ("perform Applescript") and it does not work right. What it seems like is that the repeat loop does not do its repeat, it just goes through to the last value of the repeat. Inside of this repeat is another FM script that does a Find and then Sorts and goes to the last record found then. Does FM handle doing script steps inside itself differently? Do they happen too fast? Does it ignore steps? Also, does anyone have a suggestion how to save multiple variables into a list, like AS can? Can this be converted into a full FM script, or is it too complex? Thanks for any help. Chris Here is the script: set myLastBookList to {} set myPrinterList to {"Printer1", "Printer2", "Printer3", "Printer4", "Printer5", "Printer6"} display dialog "Make sure that all books have complete book-done information or this script will give false information." tell application "FileMaker Pro" --get fields from the main GigTracker set myWeek to get field "BookPrintWeek" of current record of database "GigabyteTracker" set myYear to get field "Year" of current record of database "Tracker" tell database "BookRunPrinter_" show database "BookRunPrinter_" do script "shrink_window" go to layout "Standard View" set field "g_FindWeeks" to myWeek set field "g_findDays" to myYear repeat with i in myPrinterList set field "g_FindPrinter" to i try do script "Find_YrWkPr_sort_last_sent" --this script finds the books, and sorts them by last transmission time end try try copy (get field "BookCode" of current record) to end of myLastBookList --copy code to the list end try end repeat go to layout "Finding_by_book_code" --we MUST clear out all old find data or this won't work! do script "Clear_All_Finds" repeat with b in myLastBookList set c to {(characters 1 thru 5 of : as string, (characters 6 thru 8 of : as string, ("20" & (characters 9 thru 10 of } create request with data c end repeat find end tell end tell
  4. I need to do a Find function on my db. I've just switched to v8 from v6 : and when I script my find, it does not find "only" the criteria I just entered, it "keeps" the previously found records as well. What am I missing? [color:blue]set [color:green]BookCode to "00113" tell application "FileMaker Pro" tell database "BookRunPrinter_" do script "show_all" delete every request create request with data [color:green]BookCode find end tell end tell
  5. Well, the script won't enter incorrect info, but a user always can. It's a big system I have, so there are sufficient safeguards to automation, but when users are more direct then there are not. Do you have a suggestion that will help me? Thanks! -)
  6. I have a db that has a validation of 'not empty' and also has strict and a message on it. But now I'd like to script making records into the db but also need the validation for when users manually enter info. When I script a record to be made and try to enter the info into a field when the validation is on, it fails, but when I turn off the validation on the field then I can add any info I like. Can I get around this at all? [color:blue]set myNewRecord to create record go to myNewRecord set cell "BookCode" of myNewRecord to "0027000605"
  7. OK I still need to know how I can bypass the dialog box that opens up when I call for another db file to open... can I use a "with password" with "get URL".. ?
  8. have you tried this? tell app "filemaker pro" tell database "whatever database" set myFind to create new request with data "==car" find end tell end tell You may have to add tabs to the beginning of the request, like " ==car". I have found doing it like this, the script acts like you are actually tabbing through fields to get to the one you want, so you need to add tabs to get to the one you want, you can't call it by name (at least i think i can't).
  9. I'm currently using FMP 5.5 on System 9.22. FWIW, the "getURL" command will open the file then from my remote machine, but once I enter in the password the rest of the script stops. :-( I may need to use the "getURL" command to open the files from our FMP server. Is there a way to open the file and include the password? What I have tried so far has not worked, that is, script editor just won't accept a phrase like "with password "Blahblah" I am using this: getURL "FMP5://255.255.255.255/Scan_database" to open the file. (The 255 is the made up machine IP address) after this Applescript step is done, the rest of the script stops. Also, the entire script will run from Script Editor perfectly every time. Just when I run it inside the Filemaker "perform applescript" step does it not work. Or if anyone has any ideas on building the script entirely or mostly in FileMaker's scripting then that would work too. I can post up the code or email you the couple files I am working with, email me at the address below.
  10. I'm trying to have a file open via a "perform Applescript" command in a FileMaker script. When the script gets to the point to open the other file, an error happens that says "Data is being accessed by another user, script, or transaction (error -10011). This other file is not opened at all. Here is the sample of how I have it coded, I need to open several files all of which start with a single letter, thus the variable part of the name of the file. open file ("Artist's Drive:Database Files:" & item i of myParaList & "_Scans_Database") any ideas?
  11. Well ima dork. Scripting guide: get remote URL: Opens a hosted FileMaker Pro database get remote URL Result: string -- The URL specification for the opened database in the form "FMP5://[host]/filename"
  12. Sounds like a good time to switch some users to Macs. :-) Chris
  13. I couldn't find a completely satisfactory answer with my search, soooo.. Can anyone explain how I can open a remote file via applescript or a Filemaker script? I have several files, on an OSX box. I want a script to call open a file named "A-scans" on our remote hosting unit using a script and a pre-defined password. I do not want to show the user any "open remote" dialog boxes or any password dialogs. There may be as many as 30 databases opened and searched with the Applescript/FMPscript, so speed and user simplicity is important. TIA, Chris
  14. If you are positive that you won't both use the database at the same time, copy the file from your FTP to your computer's hard drive, open the file, do your stuff. Close it, then FTP/copy the file back up to your FTP server. This may be the only way since you are not working in a LAN or a WAN or VPN kind of situation. It may be that your FTP server won't allow "continuous" activity to it or can't handle the stream of writing that FMP does as files are used.
  15. Can anyone tell me how the XML output is beefed up in v6? I specifically want to know if output from a portal can be formatted differently or if xslt transformations can be applied in FM. (Currently I can't get our XML output from several FM portals to work in our Mac environment because I cannot transform the column-like xml portal output back into a row-like format that the portal should be viewed as .) So can FM do xslt transforms, or has any good new xslt parsers for InternetExplorer for Mac popped up? Does the new ie5.21 parse xml/xslt better? Thanks Chris
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.