Arnie Posted May 9, 2005 Share Posted May 9, 2005 The following vb script:Set objFM = WScript.CreateObject ("FMPRO.Application") 'open FileMakerSet objFMfiles = objFM.Documents.Open("c:\VBS_fm.fp5","") ' open test FileMaker file, no pw.objFMfiles.DoFMScript ("ShowMessage") ' call the ShowMessage script in the test file.objFM.Quit ' quit FileMakerI want to do the same with AutoIt.My code up till now is:Run("C:\Program Files\FileMaker\FileMaker Developer 7\filemaker developer.exe c:\testfmp.fp7")WinActivate("filemaker developer", "") WinWaitActive("filemaker developer")How do I call the ''ShowMessage'' script in FMP?Or can I use the VBS in AutoIt.TIA Link to comment Share on other sites More sharing options...
Arnie Posted May 9, 2005 Author Share Posted May 9, 2005 IS it possible to run a filemaker script by AutoIt, like VBScript can? Link to comment Share on other sites More sharing options...
w0uter Posted May 9, 2005 Share Posted May 9, 2005 (edited) for the following code you need autoit++ (3.1.1.xx) look for it in the dev section.$objFM = ObjCreate ("FMPRO.Application"); open FileMaker $objFMfiles = $objFM.Documents.Open("c:\VBS_fm.fp5",""); open test FileMaker file, no pw. $objFMfiles.DoFMScript ("ShowMessage");call the ShowMessage script in the test file. $objFM.Quit;quit FileMakerthis should work. but since i dont have the program i cannot test it for you. Edited May 9, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Arnie Posted May 9, 2005 Author Share Posted May 9, 2005 (edited) Sorry it does'nt work I get an error (exitcode: 0). I hope you or someone else can get this code to work because it is rather important for me to get some kind of interaction after FMP triggers an AutoIt script. I start with a (first) FMP script which fires an AutoIt script and when finished AutoIt will ''tell" FMP it can continue with the (second) FMP script. TIA Edited May 10, 2005 by Arnie Link to comment Share on other sites More sharing options...
giogio Posted May 10, 2005 Share Posted May 10, 2005 i also develop using filemaker pro, to interact to filemaker i actualy use to recall just one of the script in the script menu of filemaker, is not very elegant but it work ;this control if filemaker is open on win 2000 or xp $procex="" if ProcessExists ( "FileMaker Developer.exe" )then $procex="FileMaker" if ProcessExists ( "FileMaker.exe" )then $procex="FileMaker" if ProcessExists ( "FileMaker devel")then $procex="FileMaker" ;this control the focus if yes send the key combination to select the right script If Not WinActive($procex,"") then WinActivate($procex,"") WinWaitActive($procex,"") endif sleep(200) Send("{CTRLDOWN}1{CTRLUP}") Link to comment Share on other sites More sharing options...
Arnie Posted May 10, 2005 Author Share Posted May 10, 2005 i also develop using filemaker pro, to interact to filemaker i actualy use to recall just one of the script in the script menu of filemaker, is not very elegant but it workWhy not elegant, it is just what I want.The way you recall (ctrl-#) limits the number of scripts to 9.I use the Zipscript (freeware) plugin instead.This plugin fires a script asa the field is left (and the contents has changed).In my filemaker script I have to give focus to the field before I trigger AutoIt.The last two lines of my AutoIt script enters a number in the FMP field and tabsto the next field. The FMP script will be triggered accordingly.What we realy need is a piece of code here like the VBS code that opens the FMP script.Thx.Arnie Link to comment Share on other sites More sharing options...
kjreha Posted January 25, 2007 Share Posted January 25, 2007 (edited) Why not elegant, it is just what I want.The way you recall (ctrl-#) limits the number of scripts to 9.I use the Zipscript (freeware) plugin instead.This plugin fires a script asa the field is left (and the contents has changed).In my filemaker script I have to give focus to the field before I trigger AutoIt.The last two lines of my AutoIt script enters a number in the FMP field and tabsto the next field. The FMP script will be triggered accordingly.What we realy need is a piece of code here like the VBS code that opens the FMP script.Thx.ArnieI am having trouble getting focus back to Filemaker. The script doesn't work for me. Any ideas???Update: set focus by Winactivate ("FileMaker") make sure to uuse upper case M!!! Edited January 25, 2007 by kjreha Link to comment Share on other sites More sharing options...
Recommended Posts
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