Jump to content

Recommended Posts

Posted

The following vb script:

Set objFM = WScript.CreateObject ("FMPRO.Application")  'open FileMaker

Set 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 FileMaker

I 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

Posted (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 FileMaker

this should work. but since i dont have the program i cannot test it for you.

Edited 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

Posted (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 by Arnie
Posted

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}")

Posted

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

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 tabs

to 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

  • 1 year later...
Posted (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 tabs

to 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

I 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 by kjreha

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...