September 23, 201510 yr I am using remotescripter to run a script in filemaker. Which works no problem there. What i want to do is bring Filemaker to the foreground also, So for instance say if im looking at emails, and the script is remotely triggered then I want windows to switch to Filemaker and not just run the script in the background and wait for me to click on filemaker. Filemaker will always be open. Any ideas Thanks
September 23, 201510 yr I have not tested this so I do not know if it will work but you may be able to use the "Send Event" script step. Set it to do a script that just shows a custom dialog or whatever you want and then check the box that says "bring target application to the front" and select FileMaker as the target app.
October 10, 201510 yr There is a function for that built into RemoteScripter called RemoteScripterBringFileMakerToFront Documentation is here: http://static.360works.com/plugins/REMOTESCRIPTPLUG/documentation.html#RemoteScripterBringFilemakerToFront
October 11, 201510 yr You can use vbscript to do this: set s = CreateObject("WScript.Shell") s.AppActivate "FileMaker Pro Advanced" wscript.sleep(100) s.SendKeys("% r") "% r" restores a window, "% x" maximizes, "% n" minimizes. This only works for already open applications, it won't start the application if it's not running. It also may not work on non-English Windows as the Min/Max/Restore commands are localized and will have different shortcuts.
October 11, 201510 yr If you want to go down the VBscript way you can use FM's ActiveX interface to test if it is open and open it if it is not. http://www.filemaker.com/help/13/fmp/en/html/create_script.13.10.html
October 11, 201510 yr I think a word of caution is in warranted here. I've never been a fan of applications that steal focus. More often than not, I'll be working on something and if an app steals focus, whatever I'm typing isn't going where I intended it to go. This could easily happen in your case too. In fact, your script stealing focus to FileMaker, could have all sorts of unintended results. You might be typing away in your email client, not looking closely at your monitor (or you might have dual screens and FM is on the other screen), and you're typing and hitting enter for new lines. However, because FM just took away focus, you could be entering data in records and committing it without realising it. Or you might be pressing key combinations in your mail client that have different meanings in your FM app. You'd have to protect your FM app from that. If you want to go down the VBscript way you can use FM's ActiveX interface to test if it is open and open it if it is not. http://www.filemaker.com/help/13/fmp/en/html/create_script.13.10.html Thanks Wim, didn't know that. Might come in handy.
Create an account or sign in to comment