JamesBand Posted November 14, 2007 Share Posted November 14, 2007 (edited) Requirements: ScriptMaster for FMP (AWESOME!) Install Groovy and Reboot (yes you have to reboot, the ActiveXProxy won't work without it) (During setup ActiveXProxy is an option, make sure it installs with Groovy.) Recommended: Install Advanced Security for Outlook Should be in a startup script: (if this runs more than once, it stops working!) SMLoadJar ( "file://C:/Program Files/Groovy/lib/scriptom-1.2.jar" ) & SMLoadJar ( "file://C:/Program Files/Groovy/lib/jacob.jar" ) Setup the variables for the message: /* you can use multiple addresses seperated by ';' */ SMSetVariable ( "eTO" ; "[email protected]" ) & SMSetVariable ( "eSUBJ" ; "The thing" ) & SMSetVariable ( "eBODY" ; "You know, the thing." ) EvaluateGroovy ( " import org.codehaus.groovy.scriptom.ActiveXProxy; // Create the Outlook Object def oOutlook = new ActiveXProxy("Outlook.Application"); //Create the MAPI namespace object and logon def oNS = oOutlook.GetNamespace("MAPI"); oNS.Logon "Outlook"; //Create the Email Item def oEmail = oOutlook.CreateItem(0); //Apply the Properties oEmail.Recipients.Add eTO; oEmail.Recipients.ResolveAll oEmail.Subject = eSUBJ; oEmail.HTMLBody = eBODY; //Display the Email oEmail.Display ""; " ) Edited November 15, 2007 by Guest Link to comment Share on other sites More sharing options...
Jesse Barnum Posted November 14, 2007 Share Posted November 14, 2007 Wow, that is cool -) As soon as I get a chance to test this (I'm on a Mac, so I'll need to get a virtual Windows setup) I'll add it to the ScriptMaster examples file. Link to comment Share on other sites More sharing options...
_henry_ Posted December 18, 2007 Share Posted December 18, 2007 Will it bypass the security outlook warning by using ScriptMaster and Groovy? Or should I install the plugin that you recommended? Thanks Link to comment Share on other sites More sharing options...
Genx Posted December 18, 2007 Share Posted December 18, 2007 You can also download "ClickYes" to bypass the dialog. Link to comment Share on other sites More sharing options...
_henry_ Posted December 19, 2007 Share Posted December 19, 2007 Hello Alex, Thank for your information. "Download Click Yes"? What do you mean by that? I am sorry that I got lost. However, I found one of member writing VB Script to bypass the security outlook warning directly (the program that I want to make is full automation without any kind of user interface). I am wondering if you know how to get the filename on a folder by their creation date. For example, today, I would create 10 filenames. I want VB Script to throw their filepath names (the 10 filenames) to Filemaker to process them to database. Tomorrow, I would have 5 filenames, then I would read only the 5 rest filenames and not the 15 filenames (10 filenames plus 5 filenames). Is that possible? Thank you. Link to comment Share on other sites More sharing options...
Genx Posted December 19, 2007 Share Posted December 19, 2007 http://www.contextmagic.com/express-clickyes/ Link to comment Share on other sites More sharing options...
_henry_ Posted December 19, 2007 Share Posted December 19, 2007 Thank you for the plugin. Well, do you know the idea to solve my question? Link to comment Share on other sites More sharing options...
JamesBand Posted December 21, 2007 Author Share Posted December 21, 2007 Thank you for the plugin. Well, do you know the idea to solve my question? Recommended: Install Advanced Security for Outlook Click the link and read what it will do for you regarding Outlook Security. Link to comment Share on other sites More sharing options...
_henry_ Posted December 21, 2007 Share Posted December 21, 2007 Hello James, Sorry for the misunderstanding. I am asking about this message below... (from my previous question) I am wondering if you know how to get the filename on a folder by their creation date. For example, today, I would create 10 filenames. I want VB Script to throw their filepath names (the 10 filenames) to Filemaker to process them to database. Tomorrow, I would have 5 filenames, then I would read only the 5 rest filenames and not the 15 filenames (10 filenames plus 5 filenames). Is that possible? About bypassing the security warning outlook, Alex (Genx) mentioned to download Click Yes and actually I found out one member, if not mistaken aholtzapfel, that wrote VB Script that can bypass the security warning. Happy holidays... Link to comment Share on other sites More sharing options...
JamesBand Posted December 21, 2007 Author Share Posted December 21, 2007 That would be a groovy script. And Scriptmaster will run them... Sometimes you have to modify them, but you should be able to do that. Go to the Groovy website and look over the tutorials. Link to comment Share on other sites More sharing options...
_henry_ Posted December 21, 2007 Share Posted December 21, 2007 Thanks for your guide, James. Currently, I am looking Auto It program to do that. Still in learning mode... Link to comment Share on other sites More sharing options...
JamesBand Posted December 21, 2007 Author Share Posted December 21, 2007 I do alot of AutoIT programming. I love it! But it doesn't integrate with Filemaker easily. You can use the ActiveXProxy in groovy with Scriptmaster to access the AutoITX object but it seems a bit silly to me, since groovy will do so much. Link to comment Share on other sites More sharing options...
_henry_ Posted December 21, 2007 Share Posted December 21, 2007 Hello again James, So, what is the best functions or ideas that you can used from using AutoIt over Groovy? It seems that you like to use Groovy for FileMaker compare using AutoIt, right? Link to comment Share on other sites More sharing options...
JamesBand Posted December 21, 2007 Author Share Posted December 21, 2007 My point is that I can use AutoITX with Filemaker, but I would have to use Scriptmaster and Groovy's ActiveXProxy to do it. If I can accomplish my objective in Scriptmaster/Groovy (no ActiveXProxy and AutoITX) without the extra step, I'm going to do that. It is also important to note that AutoITX doesn't fully implement AutoIT. I suppose that one could use Scriptmaster to call an AutoIT executable that would pass back a result through the errorlevel environment variable. I imagine that Groovy is capable of interacting with environment variables. Link to comment Share on other sites More sharing options...
_henry_ Posted December 28, 2007 Share Posted December 28, 2007 Hello James, Thank you for your respond and information. I will do some reading about it. Happy holidays! Link to comment Share on other sites More sharing options...
Genx Posted December 28, 2007 Share Posted December 28, 2007 You might want to take a look at the Scodigo PHP plugin - then you can send whatever email you want without even needing outlook... not to mention do lots of other cool stuff. Link to comment Share on other sites More sharing options...
_henry_ Posted December 28, 2007 Share Posted December 28, 2007 Thanks Alex. About the email stuff, I solved it already though. The question that I asked to James is another issue. Anyway, thank you for your comment. Happy holidays! Link to comment Share on other sites More sharing options...
JamesBand Posted January 2, 2008 Author Share Posted January 2, 2008 You might want to take a look at the Scodigo PHP plugin - then you can send whatever email you want without even needing outlook... not to mention do lots of other cool stuff. Solutions like that have merit. I wanted an Outlook solution because in my small office, we use Outlook/IMAP to track all our email. To my dismay, all our email correspondence is HTML. So, emails based on FMP information have involved Word mail merge and CSV export files. This gets pretty ridiculous when you start adding attachments, as I have found no way to do this from Word mail merge. Unlike a PHP or server-based solution (if I am not mistaken,) a solution like this one allows FMP to send HTML email through Outlook. Tracking remains in the email client where our office manages the all of the email. I could have used this on a project about a year ago, it would have saved me a good bit of time. Link to comment Share on other sites More sharing options...
Genx Posted January 2, 2008 Share Posted January 2, 2008 Well, with FM 9 anyway, you can render HTML directly from a field in a web viewer - and with PHP you can send HTML... though it wouldn't go through the email client. Link to comment Share on other sites More sharing options...
Newbies mschiff6 Posted January 3, 2008 Newbies Share Posted January 3, 2008 Hi. I am setting up an XP machine for FM Pro. The FM guy has asked me to setup SMTP for FM to be able to send notifications to the administrator in the even of a problem. Can this be done through the default outlook client or can I set up SMTP by itself? Thanks for all help. Link to comment Share on other sites More sharing options...
Genx Posted January 3, 2008 Share Posted January 3, 2008 Can this be done through the default outlook client or can I set up SMTP by itself? Thanks for all help. With the PHP solution and / or scodigo plugin you could send through SMTP, with FM by its lonesome, it will use the default mail client on your PC. Link to comment Share on other sites More sharing options...
Newbies Mike Fuller Posted October 28, 2008 Newbies Share Posted October 28, 2008 Jamie, Coming from a Java web application background, I miss having a testing framework. I looked into AutoIt and I agree it's poor integrating with Filemaker. So I'm curious how you use groovy to perform tests? I am familiar with Scriptmaster. Being a Groovy newbie, I'm having a mental block envisioning how Groovy can accomplish the same things as AutoIt. If you could provide an example that would be great! Thanks! Link to comment Share on other sites More sharing options...
Jesse Barnum Posted October 29, 2008 Share Posted October 29, 2008 ScriptMaster includes modules for sending e-mail directly through an SMTP server, without using your desktop client. Link to comment Share on other sites More sharing options...
Newbies hydromar Posted July 2, 2009 Newbies Share Posted July 2, 2009 Hi there, filemaker beginner here, i'm developing a solution for a family business, and have produced a new contact management and enquiries solution. I had it all setup but then my employer has requested being able to send html emails via outlook, immediately i paniced until i stumbled across this post via google. It seems like this is exactly what i am looking for. However i have downloaded scriptmaster and groovy, and managed to find the correct .jar files SMLoadJar ( "file://C:/Program Files/Groovy/lib/scriptom-1.2.jar" ) & SMLoadJar ( "file://C:/Program Files/Groovy/lib/jacob.jar" (this was neccesary as they weren't included in the latest release of groovy. However when running the script i get the following error in the groovy console: unexpected token: import at line: 10, column: 5 as far as i can tell this is pointing to: import org.codehaus.groovy.scriptom.ActiveXProxy; i did some research and it does appear that it has been renamed since this post to activexobject, however this shouldn't be an issue due to using the older .jar files, any help with this matter would be greatly appreciated. The final solution is that i want a button to press which opens a new message in outlook express, and allows html, as the signature on the emails requires it. Regards Alex Link to comment Share on other sites More sharing options...
JamesBand Posted August 24, 2009 Author Share Posted August 24, 2009 I am soooooooo sorry for the delay. I have been somewhat busy. Anyway, I tried the method with the latest version of scriptmaster and I am getting a similar error. To that end, I recommend that you modify an email script that comes in the SM examples db or purchase the email plugin that 360 offers. If you need to keep copies in a local client, simply BCC the email to the appropriate account. Sorry that I am not more help than this. : Link to comment Share on other sites More sharing options...
Thomas Seidler Posted December 2, 2010 Share Posted December 2, 2010 Scuse late posting, but really peeps shouldn't think Filemaker on a Mac doesn't have HTML email capacity, we've been enjoying it (with help of Applescript & XMail) since 2005ish. http://fmforums.com/forum/showtopic.php?tid/217843/ possible on Mac OS X for free, utilizes XMail osax. Very effective. Been using for years, but only now bothered to start contributing to community, and indirectly i'm hoping some of you will donate to JB LeStang, to encourage freeware/donationware developers. V reliable... + automatable attachments etc. I hope my demo is clear enough to follow! Link to comment Share on other sites More sharing options...
liltbrockie Posted August 13, 2014 Share Posted August 13, 2014 When I try and "OK" the specift calculation dialog box for this step: EvaluateGroovy ( " import org.codehaus.groovy.scriptom.ActiveXProxy; // Create the Outlook Object def oOutlook = new ActiveXProxy("Outlook.Application"); //Create the MAPI namespace object and logon def oNS = oOutlook.GetNamespace("MAPI"); oNS.Logon "Outlook"; //Create the Email Item def oEmail = oOutlook.CreateItem(0); //Apply the Properties oEmail.Recipients.Add eTO; oEmail.Recipients.ResolveAll oEmail.Subject = eSUBJ; oEmail.HTMLBody = eBODY; //Display the Email oEmail.Display ""; " ) I get an error message saying "The specified table cannot be found" for "Outlook.Application" Please help! Link to comment Share on other sites More sharing options...
Newbies Xanius Posted October 27, 2015 Newbies Share Posted October 27, 2015 Hello, the thread might be very old and obsolete for the last contributor now, I'm nevertheless posting the solution that solved the strange problems for me. use ActiveXObject instead of ActiveXProxy in the current version of scriptom (1.6) - I don't know when the change was carried out. Before running the function, you must add two jars to ScriptMaster in a startup script, e.g. Set Variable $result ; Value:SMLoadJar ( "file://C:/Program Files/Groovy/lib/scriptom-1.6.0.jar" ) & SMLoadJar ( "file://C:/Program Files/Groovy/lib/jacob.1.2.jar" )where "C:/Program Files/Groovy/lib/" is the path to the Groovy or load the jar files from a comtainer field from a filemaker table (See Assure that the jar files are loaded only once, eg. by checking SMGetLoadedJars for the jar names before loading. Regards Xanius Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 3231 days old. Please don't post here. Open a new topic instead.
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 accountSign in
Already have an account? Sign in here.
Sign In Now