Jump to content

JF Fortier

  • Content Count

  • Joined

  • Last visited

  • Days Won


JF Fortier last won the day on October 9

JF Fortier had the most liked content!

Community Reputation

1 Neutral

About JF Fortier

  • Rank

FileMaker Experience

  • Skill Level
  • FM Application

Platform Environment

  • OS Platform
  • OS Version
  1. I found the code that I had that only return the coordinates and screen size. I just add the "import" section, that is what was missing from my previous attempt. import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.Rectangle; GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); String boundsString = ""; for (GraphicsDevice gd : ge.getScreenDevices()) { Rectangle bounds = gd.getDefaultConfiguration().getBounds(); boundsString += bounds.x.intValue() + " " + bounds.y.intValue() + " " + bounds.width.intValue() + " " + bounds.height.intValue() + "\n" } return boundsString; and it return plain data 0 0 1920 1080 -1680 0 1680 1050 Maybe this will help someone else in the future, you have 2 options, you just have to extract the data you want from the result. JF
  2. @john renfrew This is going in the right direction! In your case the retina display, I may be wrong put it's not something like @2x in the Apple docs? so the pixel is 1/2 of the resolution so your 5120 x 2880 return in fact 2560x1440 My Monitor #1 is 1920 x 1080 Monitor #2 (left) is 1680 x 1050 The result is gs[0] = java.awt.Rectangle[x=0,y=0,width=1920,height=1080] gs[1] = java.awt.Rectangle[x=-1680,y=0,width=1680,height=1050] So monitor 1 sets at 0,0 1920x1080 and monitor 2 (left) is the screen resolution 1680 x 1050, since it's on the left side is -1680,0 On the right I get gs[1] = java.awt.Rectangle[x=1920,y=0,width=1680,height=1050] So for me, this code is working, if I try with gs[2] and I don't have a 3rd monitor I get Groovy Script failed:2 I added a variable to set the monitor number "ScreenNo" and the Groovy now look like this import java.awt.GraphicsConfiguration import java.awt.GraphicsEnvironment int x = Integer.parseInt(ScreenNo); ge = GraphicsEnvironment.getLocalGraphicsEnvironment() gs = ge.getScreenDevices() gd = gs[x] gc = gd.getConfigurations() return gc[0].getBounds() and after some cleaning, the code requires is import java.awt.GraphicsEnvironment int x = Integer.parseInt(ScreenNo); return GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()[x].getConfigurations()[0].getBounds() I can now run a script with a loop that will go from 0 until the plugin return ERROR and get into variables the info and with a custom function get this the data out of this result "java.awt.Rectangle[x=0,y=0,width=1920,height=1080]" Thanks John, you just made my day
  3. @Josh Ormond The command line is not working, it's telling me that I have only one monitor connected. I played around that command line tool, but I only get one monitor, one set of resolution ?!? I have tried other way, I might investigate that path and find another command line tool, but if not Win standard, I will have the install that tool in every PC... not the best practice in deploying a solution. @john renfrew The Groovy part is to set up a ScriptMaster plugin that will return the information into a variable and with that info I will script conditions to do what I need. So if I have 2 monitors, the solution will open the second window. If the 2nd monitor is L or R I will get the current FM function to send the new window in the right location. I once found a Groovy code that was supposed to do that (didn't save the URL !) but I recall copy/past in the demo file of scriptmaster but the script was not working, error running/compiling... Thanks,
  4. I appreciate your help! The best way to learn is by searching and finding it when someone point you in the right direction. But sometimes people say use the Groovy function get(monitor.xyz){};HelloWorld,zulu... as it may be useful for someone that already knows Groovy, this is not helping me to get a full function that works! I'm trying to achieve a plugin that will return the number of monitors 1 or 2, is the 2nd monitor located to the right or left and maybe the resolution (for future use) for now I don't need it. I want to build my start-up script so that a user with 2 monitors will have 2 windows open. We use an integration of SeedCode Calender in our solution and I want to have the calendar open full screen on the 2nd monitor and always stay open in that one, and the rest of the solution is within the main monitor, so ; If (PlugIn.results = 2 monitor) New Window ( x,y,z. Top:0 (if Plugin.results = MonitorLeft ; -300; get(WindowDesktopWidth) +300) // the new windows will then be in the 2nd monitor Adjust Window [Maximize] Else ... End Unless you have a way of doing this native in FM... as of today, I haven't found it. Thanks
  5. Hi, I know nothing about Java or Groovy etc! I want to deploy my solution and take advantage of dual screen. So I need to have information, if a 2nd screen is installed, is it to the left or right of the main screen. I have found many script exemples, but every time I copy them in the ScriptMaster file and run them, I get a compilation error. So if you want to help, please just don't say, use this command, or x,y,z... I would need to full script from A to Z, as I know nothing how to write a Groovy script, debug or else ! Thank you for your help. JF
  6. Thanks, but it's all Chinese to me, I have no clue how to insert any of these info into one working script. I can built an IKEA piece of furniture without the manual, but not java script !! I need to have the full script and copy it... of the "how to" otherwise I add lines of codes and only gets error. Thanks
  7. Thanks, I have seen that post long time ago, but I have no clue HOW to get it inside the Java and put it as a header in the code... that link only tells you that you need to have that header section, not how to get it into Java. And all the example that I found online don't work when I create a new module in the SM. I'm always willing to learn more stuff and make my FM app better... but my main job is driving a HVAC business!! I'm pretty good with FM, 25 years of self learning, but I have my limits My current code is (if I recall, I merge 2 module from the SM demo file to have a HTML option with inserting a file. My Variables are smtpHost. from, to, subject, htmlBody and attachmentPath import javax.mail.*; import javax.mail.internet.*; Properties props = new Properties(); props.setProperty("mail.smtp.host", smtpHost); MimeMessage msg = new MimeMessage(Session.getInstance(props)); Multipart content = new MimeMultipart(); // first the message body MimeBodyPart bodyPart = new MimeBodyPart(); bodyPart.setContent(htmlBody, "text/html"); content.addBodyPart(bodyPart); // then the attachment if (attachmentPath) { MimeBodyPart attachmentPart = new MimeBodyPart(); attachmentPart.attachFile(attachmentPath); content.addBodyPart(attachmentPart); } msg.setContent(content); msg.setSubject(subject); msg.setFrom(new InternetAddress(from)); msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to)); Transport.send(msg); return true Then I would also want to have a variable to enter the "text/plain" version Thanks
  8. Hi, I have absolutely no knowledge in Java. I'm using all the function already in the demo file of ScriptMaster (Send Email With Attachments), I have a licence so I generated my plugin and run it on the server to send email. It's not a mass mailing, I send individual email, it's a system that confirms appointment. The email is HTML formed for a better-looking experience. I need to add: #1-header info (maybe multiple items), otherwise I get flag (mostly by Hotmail) as spam, the header should at least include the "Unsubscribe-list:" attribute #2-with the HTML email, I need a "text/plain" short version I have a score of 9.1 right now on SpamAssassin but still get flag as spam (DKIM, DMARC, host name-mail server, IP is all good) on Hotmail. Not Gmail, and not my own Exchange server. I currently use the default Java code in the demo file. I need the code modification, please the whole code, not add this xblabla in the code as I have no clue the run down of Java. I've been searching all day how, I got some string of code, but when I add them to the original code, I either get an error or it doesn't do anything. Thanks for your help. JF
  9. Hooo boy this is an old one, but the idea for this is awesome !! using this not GetLayoutObjectAttribute ( "button.obj.name" ; "IsObjectHidden" ) The only issue is with the button bar divider and lines that we can't still conditional format ☹️ The left and right justify you see the empty button at the end. Maintain holes works great Maintain holes with conditional format... button can still be pressed
  10. Hello group, I was wondering if there's a way to know if the scribe plugin can help me with my project. Using FMA11 I want to populate a PDF that have permission to write, fill and save the form. My problem is that I have on my PC Acrobat professional but the reste of the office only have Reader. So when I test on my PC it work, since I have Pro When other user are doing it, when the file is created, data are populate from FM and the file is open so user can enter remaining information... but the new created file lost the permission to fill the form and save it. The way it's configure, I'm not using a container field, but I link it to a template file located on the server (so any change to the file can be done easely) it open the file, fill the forms, save the file to a new location with a specific name. I don't think having 2 container fields as the demo show it, would change anything, unless you tell me otherwise, but keep in mind the resulted filled PDF must be save in the server after it as beeing fully filled by the user. The only reason I don't want to use container is the problem with using global field over a network file (close the server file, importe the PDF into field, every time I need to change the main PDF file). So can this be done without haing Acrobat Pro on every station = lost of more $$$ Now I'm using a demo of the scribe plug for testing. Thank you JF
  • Create New...

Important Information

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