markreynard Posted September 23, 2015 Posted September 23, 2015 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
ryan360Works Posted September 23, 2015 Posted September 23, 2015 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.
Jesse Barnum Posted October 10, 2015 Posted October 10, 2015 There is a function for that built into RemoteScripter called RemoteScripterBringFileMakerToFront Documentation is here: http://static.360works.com/plugins/REMOTESCRIPTPLUG/documentation.html#RemoteScripterBringFilemakerToFront
OlgerDiekstra Posted October 11, 2015 Posted October 11, 2015 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.
Wim Decorte Posted October 11, 2015 Posted October 11, 2015 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
OlgerDiekstra Posted October 11, 2015 Posted October 11, 2015 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.
Recommended Posts
This topic is 3669 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