Jump to content
BradDuns

Creating an Image with Field Data & A Picture

Recommended Posts

In one of my layouts I have created an ID Card like view that has a persons image and layered over the top of it I have some fields. 

Is there a way to export that composite as an image?

I was thinking something like if I grouped the composite and gave it a name I could export it as a script step but searching came up with mostly how to copy layout objects to a different layout...

Currently it works to screenshot the composite but I would like to automate the process a little bit.

Thanks for any help

Edited by BradDuns

Share this post


Link to post
Share on other sites

You could print it to a PDF, would that work for you?

Share this post


Link to post
Share on other sites

A PDF isn't an allowed image format so I would need to convert it.

I ended up using a Shell/AppleScript to automate the screen capture and name it using: 

"do shell script \"screencapture -x -R11,221,490,413 ~/FolderPath/" & User::UserName & ".png\""

I put the part I wanted captured in the far upper left of the layout so it's always in the same spot. I got the coordinates using the numbers from Cmd+shift+4. 

Maybe there is a better way but this works pretty good.

Edited by BradDuns

Share this post


Link to post
Share on other sites

why can't you just print them out as labels?

Share this post


Link to post
Share on other sites

The composite image I am creating is for posting to social media.

It has a User's picture with updated stats so I just need the composite digitally. 

Share this post


Link to post
Share on other sites

Screencapture can be unpredictable. What if a user zooms in or out? Or they move the window? An alternative approach is to use imagemagick (open source) in a script. Export the image, then use imagemagick to overlay it with information and keep tight control. Imagemagick works on both OSX and Windows.

Share this post


Link to post
Share on other sites
5 hours ago, OlgerDiekstra said:

Screencapture can be unpredictable. What if a user zooms in or out? Or they move the window? An alternative approach is to use imagemagick (open source) in a script. Export the image, then use imagemagick to overlay it with information and keep tight control. Imagemagick works on both OSX and Windows.

That's true. 

I have updated my script to use GetLayoutObjectAttribute to set the coordinates of the layout object I want to capture. This script won't work on PC but it will adjust if the user moves the window or zooms.

Thank you!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By stan111
      Hi, 
      I created a dashboard with a bunch of buttons, attached script to every button, which allows me navigating to specific record of the Products table. Basically, every script is the same, with minor changes (only record ID field changes).
      The process of creating a script to every button is a very time consuming as I need to write a script that  a) goes to layout b)finds the certain record 
      1 "Step: Go to Layout
          Layout: Products
       
      2 Step: Perform Find" 
       
      Is there a way to simplify the task?
       
      Thanks!
    • By Jonathan Ackerman
      is it possible to append text or images to the end of a loaded doc. (not just another document)-
       
      i.e. something like--
       
      $result=ScribeDocAppend ("new stuff")
       
      it seems the function only looks to append other files, not text
      what i need is to be able to add custom text to the end of some documents-
       
      not sure how to do this.
       
      thanks!
    • By kims
      I am working on a script that will build a document based on a value from a drop down list.
      I have a layout that contains a Document Subtype. If a certain subtype is selected from the drop down list for this record, then I want my script to be able to pull from a specific container holding the appropriate document for that type. Then I can use Doc Append to combine the two documents. Each document would be custom then to the subtype.
      I'm pretty new at FileMaker so I'm still trying to figure a lot of things out and still trying to understand how to put things together and why it will/will not work.
      I was originally using Case but then I realized that was probably not the correct thing to do. It would either append both types of documents or one, but it wasn't always the correct one.
       
      Any guidance would be greatly appreciated.
       
      If this helps, I want something that will do this:
       
      If Subtype = a, b, or c, then append Doc 1
      If subtype = d, e, or f, then append Doc 2
      and so on...
    • By Asu
      Hello FM experts, 
      this is a concept step for a more complex script but I need a script that has 2 independent features:
      1: it selects the field it is attached to as a button
      2: it can be attached to any arbitrary field and it does the same on that field.  
      The imaginary script step would be this:
      Select field [the one I am attached to] The problem I am running into is that "go to field" can not be defined by calculation, while "go to object" gets confusing between the script and the field being grouped, as the problem detailed here [https://www.soliantconsulting.com/blog/story-about-go-to-object] seems to be a complicating factor.
       
      Thanks
      Asu
    • By jcarter
      Hi Guys,
      I've been using CloudMail for a couple of years now to send marketing campaigns for my company. Just recently I have moved to remote hosting with AWS and now my server is offsite I have noticed some performance issues with cloudmail and a few other areas of my solution.
      To address these issues I have started using server-side scripts to perform labour intensive tasks such as creating bulk records (20,000) at one time. This has resulted in excellent performance once again.
      The problem I can't seem to fix is sending my email campaigns using server-side scripts. I have confirmed the plugin is installed etc on the server and with quite a bit of trial and error, I am still unable to send the campaigns.
      Does anyone have a sample script they use, or any advise how I can get this working?
      I appreciate any help and thanks in advance
      Regards,
      Jason
       
×

Important Information

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