Jump to content

Karsten Wolf

Members
  • Posts

    67
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Karsten Wolf

  1. Just thinking out loud: - with the exception of header, body, footer and summary parts the layout information is in the XML DDR. - if one goes through the hassle of adapting/transforming that XML (replacing the embedded graphics with paths to image files and marking the content fields) you get a list of layout objects that can be fed to itext. For a first step to split the XML DDR into it's components one can use my DDR-Splitter: https://github.com/karstenw/FileMaker-DDR-Splitter It's free and available as an OSX app and as a python script.
  2. FileMaker refuses for example to import pictures if any of the path elements contains a ':' which will be shown in the Finder as '/'. For unix a '/' is an illegal char in a file or foldername . For the old MacOS ':' had the same meaning as '/' has for unix. The Finder exchanges the two because people like to name folders with a '/' in it. Have you checked shell escaping? ?,:,*,",' have special meaning in a shell. Perhaps that last line should be: do shell script "mkdir '/Volumes/networkFootage/Digital_Deliverables_Packages/" & x & "/_Delivery_Packages/" & y &"'" If all that fails, go to 360works.com, download the free version of the ScriptMaster Plug-in, get acquainted with it and use it to create new folders. It would at least remove 2 redirections; the shell and applescript. -karsten
  3. Have you checked the values of x & y on these computers? Perhaps they need shell escaping because they contain spaces, are empty or contain one of / : " Does the containing folder for the resulting path exist? There are many ways how this script can fail.
  4. I had it running with FMP 10. Maybe you'll need an older version for FMP 9. Perhaps you should contact 360Works.com and ask which version will run with FMP 9.
  5. Revert to 4.134. If I remember correctly that was the version I used until may on 10.4 G4 machine.
  6. @brian rich As I said, I have not tested if but that would be my first angle on the problem (and I have experience getting FMP XML from the clipboard. And yes, there would be lots of <missing> tags that need to be resolved. But it would still be faster that clicking together a whole DB. Has anybody tried it? Does it work?
  7. What you can try (I have not tested this): - open the fp12 database in FMPA12 and copy the table definitions - create a fp7 with FMPA10 and paste the tables. Then try with scripts and layout elements.
  8. The pictures can't be seen since "Macintosh HD" is local to the (peer2peer) server and the client presumably has not the servers "Macintosh HD" mounted. That is the central problem with import by reference. The imported documents Must be located on a file server all clients can access.
  9. If I remember correctly, Tiger (10.4) is incompatible with G3. It could be made work with some tweaks but officially 10.3 was the last OS for G3.
  10. Looking at your code again I see that you're returning the hex encoded base64 string. Is that really needed by your API? Usually you either encode base64 OR hex, not both. Perhaps the last lines in your script should read: digest.init(hashkey); def rawSig = digest.doFinal(text.getBytes()); //def sig = new sun.misc.BASE64Encoder().encode(rawSig); //byte[] hash = sig; byte[] hash = rawSig; return toHex(hash);
  11. Ah. I see. I use it only for identifying files; I was not aware of hmac. The error I get says that "HmacSHA256" is not available. Other demos I found on the web yield the same result. What was your error message? Only the first line of the ScriptMaster.fp7 error dialog.
  12. see http://fmforums.com/forum/topic/86849-sha256-encryption/
  13. 2 ideas: - replace the '-r' with '-f' - you don't want to delete whole folders accidentally. - make a script with 1 SetVar statement or a calculated result field which contains just the code I posted first. Execute it in the context of the _MASTER table and post the result.
  14. Try this. I have not tested it but it corrects some of the mistakes you made. The script assumes that _MASTER::FilePath ends with a "/". You might want to take a look at the ScriptMaster plug-in. It is better suited for such tasks. "try¶" & "do shell script "rm -r " & _MASTER::FilePath & "Cable2.fmp12"¶" & "end try"
  15. I did this in FMP 10 and had the RECORDID missing and FileMaker complained about it. Perhaps it can be left empty. I don't remember now. These lines get copied from stylesheet to stylesheet ;-) and 'real' questions are answered by the XSLT book from Michael Kay (highly technical, highly recommended, 2 pounds with all the answers on the topic)
  16. It must be seen in context: <ROW MODID="0" xmlns="http://www.filemaker.com/fmpxmlresult"> <xsl:attribute name="RECORDID"> <xsl:value-of select="position()" /> </xsl:attribute> ROW is the current output node. It has an attribute MODID. <xsl:attribute... generates another attribute for the current node: RECORDID. It's value will be a unique number, which is required by Filemaker, generated by simply counting the current input node set. position() gives the number of the node inside the set. Have a look at what is generated. This is created by running the XML and XSL files through an external XSLT-processor. These files can be imported directly into FileMaker; that is the step you don't see in FMP. results.zip
  17. By looking at the sample xml my guess would be that you want to import in at least 2 tables. the "Header" part and the "App"s. Here is a import xsl for the header part. Please note, that it would import several "Header" nodes if there are more than one. To play around with these open the sample.xml as "XML Data Source", choose one of the two xsl as stylesheet file and see what happens. The file "sample_app_minimal.xsl" is just a starter. You'll have to fill in the remaining fields. The other file should be complete. sample xml import.zip
  18. No. Kind of. You create one XSL for each import and have a script that does all the imports. I haven't seen a need for that yet. Keep it as simple as possible. If I were you I would concentrate on importing ONE table and use the resulting XSL as a template for remaining tables. For imports the XML is always of the structure given in FMPXMLRESULT. Google that if you haven't heard the term yet. Exporting a table as XML(FMPXMLRESULT) without a stylesheet gives you the import structure; how your transformed XML has to look. The XSL still needs to be written. The XSL structure usually follows the structure of your source XML. If it's not confidential, post a sample XML file.
  19. That is an error in the recipe. It does what you tell it to do.  Return the (string) result of: SMSetVariable ( "symbol" ; MyTable::stock_symbol )   /* =1 for success I guess */ & /*<- remember this symbol? It concatenates strings */ EvaluateGroovy ( "...  What the author meant is most probably:  SMSetVariable ( "symbol" ; MyTable::stock_symbol ) AND EvaluateGroovy ( "...  which does not work either because it simply returns the "1" which means the ANDed result of both operations (with the desired result of the stock quote being discarded).  So we have to play it a bit safer here and ask explicitly for the success of the SMSetVariable call:   If (  SMSetVariable ( "symbol" ; MyTable::stock_symbol ) ;     EvaluateGroovy ( "String url = "http://download.finance.yahoo.com/d/quotes.csv?s=" + symbol + "&f=l1"; return new URL(url).getText().trim();" );     "")   Or you could make it a ScripMaster module which would look like this:    Remember: ScripMaster returns text. If you live in a region of the world where "," instead of "." is used, you'll have to substitute that yourself.
  20. You can't do it with a FileMaker Script. You can't enter layout mode On OSX you can (at least up to FMP10) get the layout as PDF if you select all in layout mode and copy it. Then you need a tool that is capable of reading the PasteBoard. FMP copies 3 items into the PasteBoard: an item of type "CorePasteboardFlavorType 0x584D4C4F" which is an xml representation of the selection like in the DDR. an item of type "Apple PDF pasteboard type" which is a pdf representaion of the selection an item of type "Apple PICT pasteboard type" which is a PICT representaion of the selection. This one is obsolete since 10.6 IIRC windows has a similar feature. So you need a tool that is capable of inspecting the pasteboard/clipboard and saving it's contents to a file.
  21.  The xsl won't work with the provided XMLs. It's referencing "Result" in    <xsl:for-each select="AmazonEnvelope/Message/ProcessingReport/Result">   which does not exist.
  22. Try to process the XML with a different XSLT processor like saxon and import the resulting XML file directly. If it's a XML problem you'll get at least a readable error message. My guess is that FileMaker's 32-bit address space is getting very tight. Have a look at activity monitor/memory consumption during import.
  23. Suggestion was, that you import images into demo and see how this works; then copy & adapt the 2 script to your db. The picts folder was used for testing and I simply forgot to delete. Scripts you'll find in the scripts menu.
  24. Here is a very spartan solution. To test it import a picture folder (only refenece) and run the script "substitute all pictures". The script "rel2abs_image" does the actual replacement. The other just iterates over the table and applies the script to every record. Of course you'll have made a backup before you try that on your database. demo.zip
  25. You'll have to do the import with your data since the copy/pasted demo data has mutilated URLs. fmf_zillow.zip
×
×
  • Create New...

Important Information

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