Send Message to filemaker 5.5 from windows form application
Send Message to filemaker 5.5 from windows form application
am 02.10.2007 02:06:35 von Blast
I need to send filemaker 5.5 a message through a windows forms app.
Basically I want it to search and find records based on paramters
collected through a windows forms app.
Is this possible - any help appreciated!
Kyle Watson
Re: Send Message to filemaker 5.5 from windows form application
am 02.10.2007 10:54:10 von ursus.kirk
"Blast" schreef in bericht
news:1191283595.454718.205070@y42g2000hsy.googlegroups.com.. .
>I need to send filemaker 5.5 a message through a windows forms app.
> Basically I want it to search and find records based on paramters
> collected through a windows forms app.
>
> Is this possible - any help appreciated!
>
> Kyle Watson
>
Possible with applescript
very limited with windows vbs script.
But on both occasions you have to parse the data, which is a nightmare in
windows, and in OS only works when the source app also supports applescript
Possibly the best way to go is getting the data into a text export then
going back to filemaker and importing the data you need.
Keep well, ursus
Re: Send Message to filemaker 5.5 from windows form application
am 02.10.2007 20:11:42 von Blast
Um,
What I want to do is this: I click a button the windows forms app and
it tells filemaker to Find a record based on a parameter I pass to it
from a textbox on the windows forms app. Is this possible?
Re: Send Message to filemaker 5.5 from windows form application
am 02.10.2007 20:37:42 von Blast
I guess my thoughts were ODBC worked fine, I was wondering if there
was a way to use filemakers own scripting language through a command
object of some sort?
What I want to accomplish seems really simple, basically just telling
fire maker to run a simple Find command.
Re: Send Message to filemaker 5.5 from windows form application
am 02.10.2007 20:45:45 von Christoph Bouthillier
--
Met vriendelijke groet / Mit freundlichen Gruessen / With kind regards
Christoph Bouthillier
p o s t <> oh-no-spam t e k s t o t a a l << d o t >> c o m
Forget the oh-no-spam
"Blast" schreef in bericht
news:1191283595.454718.205070@y42g2000hsy.googlegroups.com.. .
>I need to send filemaker 5.5 a message through a windows forms app.
> Basically I want it to search and find records based on paramters
> collected through a windows forms app.
>
> Is this possible - any help appreciated!
>
> Kyle Watson
>
Hello Kyle,
Mayba http://www.autoitscript.com/autoit3/ can be a help?
Re: Send Message to filemaker 5.5 from windows form application
am 02.10.2007 20:52:35 von Blast
On Oct 2, 11:45 am, "Christoph Bouthillier"
wrote:
> --
> Met vriendelijke groet / Mit freundlichen Gruessen / With kind regards
> Christoph Bouthillier
> p o s t <> oh-no-spam t e k s t o t a a l << d o t >> c o m
> Forget the oh-no-spam
> "Blast" schreef in berichtnews:1191283595.454718.205070@y42g2000hsy.googlegroup s.com...
>
> >I need to send filemaker 5.5 a message through a windows forms app.
> > Basically I want it to search and find records based on paramters
> > collected through a windows forms app.
>
> > Is this possible - any help appreciated!
>
> > Kyle Watson
>
> Hello Kyle,
>
> Maybahttp://www.autoitscript.com/autoit3/can be a help?
I'll take a look at that.
Re: Send Message to filemaker 5.5 from windows form application
am 02.10.2007 23:01:30 von ursus.kirk
"Blast" schreef in bericht
news:1191350262.808955.216300@w3g2000hsg.googlegroups.com...
>I guess my thoughts were ODBC worked fine, I was wondering if there
> was a way to use filemakers own scripting language through a command
> object of some sort?
>
> What I want to accomplish seems really simple, basically just telling
> fire maker to run a simple Find command.
>
>
Here's just an example
The vbs script s called by a filemaker script in this case to parse the
variables, but any application able to call cmd and to parse the variables
may do.
it is called by a Send Event aevt;odoc;cmd /c wscript "C:\Program
Files\FileMaker\FileMaker Pro 8.5 Advanced\theVBS.vbs" "runScriptExternal"
"script3"
And here's the actual script, it will fire the runExternal script in the
top-most filemaker table. It then passes script3 as script parameter tot
this script. The script shoould reside at the path given in the Send Event
commandline.
' Description: Calls a FM script. The name of the file and the name of the
script are passed as command line arguments when executing this VBscript
'
'
Option Explicit
Dim fmApp, fmDocs, fmDoc
Dim theFile, theScript
' check that there were 2 arguments
If WScript.Arguments.Count <> 2 Then
' do nothing at all, fail silently
Else
theFile = WScript.Arguments.Unnamed.Item(0)
theScript = WScript.Arguments.Unnamed.Item(1)
' hook into FileMaker
Set fmApp = CreateObject("FMPro.Application")
fmApp.Visible = True
' get the collection of open files
Set fmDocs = fmApp.Documents
' go find our target file
For Each fmDoc In fmDocs
If InStr(LCase(fmDoc.fullname), LCase(thefile)) > 0 Then
' this is our file, run the script
fmDoc.dofmscript (thescript)
End If
Next
End If
' clean up
Set fmDoc = Nothing
Set fmDocs = Nothing
Set fmApp = Nothing
Re: Send Message to filemaker 5.5 from windows form application
am 03.10.2007 00:16:36 von Blast
On Oct 2, 2:01 pm, "Ursus" wrote:
> "Blast" schreef in berichtnews:1191350262.808955.216300@w3g2000hsg.googlegroups .com...
>
> >I guess my thoughts were ODBC worked fine, I was wondering if there
> > was a way to use filemakers own scripting language through a command
> > object of some sort?
>
> > What I want to accomplish seems really simple, basically just telling
> > fire maker to run a simple Find command.
>
> Here's just an example
>
> The vbs script s called by a filemaker script in this case to parse the
> variables, but any application able to call cmd and to parse the variables
> may do.
>
> it is called by a Send Event aevt;odoc;cmd /c wscript "C:\Program
> Files\FileMaker\FileMaker Pro 8.5 Advanced\theVBS.vbs" "runScriptExternal"
> "script3"
>
> And here's the actual script, it will fire the runExternal script in the
> top-most filemaker table. It then passes script3 as script parameter tot
> this script. The script shoould reside at the path given in the Send Event
> commandline.
>
> ' Description: Calls a FM script. The name of the file and the name of the
> script are passed as command line arguments when executing this VBscript
> '
> '
> Option Explicit
>
> Dim fmApp, fmDocs, fmDoc
> Dim theFile, theScript
>
> ' check that there were 2 arguments
> If WScript.Arguments.Count <> 2 Then
> ' do nothing at all, fail silently
> Else
> theFile = WScript.Arguments.Unnamed.Item(0)
> theScript = WScript.Arguments.Unnamed.Item(1)
>
> ' hook into FileMaker
> Set fmApp = CreateObject("FMPro.Application")
> fmApp.Visible = True
>
> ' get the collection of open files
> Set fmDocs = fmApp.Documents
>
> ' go find our target file
> For Each fmDoc In fmDocs
> If InStr(LCase(fmDoc.fullname), LCase(thefile)) > 0 Then
> ' this is our file, run the script
> fmDoc.dofmscript (thescript)
> End If
> Next
>
> End If
>
> ' clean up
> Set fmDoc = Nothing
> Set fmDocs = Nothing
> Set fmApp = Nothing
Now we might be getting somewhere.
This is what I'm looking for...though I'm not used to VB syntax since
I'm use C#.
So it seems that this is possible to do...now I need to know how to
use the .Net base class libraries to achieve the same effect. I will
look into this but in the meanwhile if anyone knows how to do this in
vb.net or c#.net please chime in.
Re: Send Message to filemaker 5.5 from windows form application
am 03.10.2007 01:33:59 von Howard Schlossberg
Sorry -- I haven't been following this thread, so I apologize if someone
has already pointed this out.
Wim Decorte has a number of .NET and vbs script samples at
. The very last item on
the page is: "Trigger FileMaker scripts from outside FileMaker Pro
[Windows only]".
Blast wrote:
> On Oct 2, 2:01 pm, "Ursus" wrote:
>> "Blast" schreef in berichtnews:1191350262.808955.216300@w3g2000hsg.googlegroups .com...
>>
>>> I guess my thoughts were ODBC worked fine, I was wondering if there
>>> was a way to use filemakers own scripting language through a command
>>> object of some sort?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg
FM Professional Solutions, Inc. Los Angeles
FileMaker 8 Certified Developer
Associate Member, FileMaker Solutions Alliance
Re: Send Message to filemaker 5.5 from windows form application
am 03.10.2007 02:11:30 von Blast
On Oct 2, 4:33 pm, Howard Schlossberg
wrote:
> Sorry -- I haven't been following this thread, so I apologize if someone
> has already pointed this out.
>
> Wim Decorte has a number of .NET and vbs script samples at
> . The very last item on
> the page is: "Trigger FileMaker scripts from outside FileMaker Pro
> [Windows only]".
>
> Blast wrote:
> > On Oct 2, 2:01 pm, "Ursus" wrote:
> >> "Blast" schreef in berichtnews:1191350262.808955.216300@w3g2000hsg.googlegroups .com...
>
> >>> I guess my thoughts were ODBC worked fine, I was wondering if there
> >>> was a way to use filemakers own scripting language through a command
> >>> object of some sort?
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Howard Schlossberg
> FM Professional Solutions, Inc. Los Angeles
>
> FileMaker 8 Certified Developer
> Associate Member, FileMaker Solutions Alliance
I will take a look at this as well. Filemaker 7 and 8 have activex
objects that you can program against? Cool... wish I was using that
version...
Re: Send Message to filemaker 5.5 from windows form application
am 03.10.2007 09:19:12 von ursus.kirk
>>
>> FileMaker 8 Certified Developer
>> Associate Member, FileMaker Solutions Alliance
>
> I will take a look at this as well. Filemaker 7 and 8 have activex
> objects that you can program against? Cool... wish I was using that
> version...
>
The reason I said it is a pain to do is because the activeX class sucks. The
example I showed gives the complete class. So you'll see it is very, very
limited to do anything constructive with it. You can activate filemaker and
start a script and that's it. I have been asking for a full set for a while
now, but my gues is that it complicates things to much for the guys at
filemaker to bother. Which also is understandable, since they want filemaker
to be a fairly simple program to use. The sample I used is coming from Wim
Decorte, Howard just showed you the link.
Keep well, Ursus
Re: Send Message to filemaker 5.5 from windows form application
am 02.11.2007 14:46:37 von amonizm
Sorry my English
Perhaps this information not interest for this debate.
But here it is an example of a linking between an application and
access database.
It will be possible to make the same with filemaker?
With some alterations I can open the Filemaker DB but can not obtain
record.
I appreciate any help.
This script will hyperlink from a feature in ArcMap Esri to a filtered
form in Microsoft Access.
Script created by Steve Carson and it was modified by Kristina
Callahan.
'The following modifications were made:
' (1) the original script required that the Access form be open. I
added code
' that will launch the database and form from a hard-coded
location.
' (2) the original script passed a number variable from ArcMap to
Access. I
' modified the SQL statement to accomodate strings which required
using Chr(34)
' to represent ASCII character for double quotes. SQL requires
strings
' to be in quotation marks.
' (3) comments were added to (hopefully) make using the script a
little easier.
'Replace "E:\bird.mdb" with the location and name of the database you
want to use
'Replace "e:\" with the drive letter so it is the same drive as
'Replace "frmLocation" with the name of the form you want to filter
'Modify ("[LocationID]=" & Chr(34) & thestring & Chr(34)) - replace
[LocationID] with
' with the name of the field you want to filter on. Note that you
must use
' Chr(34) to represent double quotes if you are passing a string.
You do not
' need it if you are passing a number.
Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation _
As String, ByVal lpFile As String, ByVal lpParameters _
As String, ByVal lpDirectory As String, ByVal nShowCmd _
As Long) As Long
Declare Function apiFindWindow Lib "User32" Alias "FindWindowA" _
(ByVal lpclassname As Any, ByVal lpCaption As Any) As Long
Global Const SW_SHOWNORMAL = 1
Sub Hyperlink(pLink, pLayer)
On Error GoTo eh:
Dim pHyperlink As IHyperlink
Set pHyperlink = pLink
Dim pFLayer As IFeatureLayer
Set pFLayer = pLayer
Dim thestring As String
thestring = pHyperlink.Link
Dim hwnd
Dim StartDoc
hwnd = apiFindWindow("OPUSAPP", "0")
'opens Microsoft Access database
StartDoc = ShellExecute(hwnd, "open", "E:\bird.mdb", "", "e:\",
SW_SHOWNORMAL)
Dim Accapp As Access.Application
Set Accapp = GetObject("E:\bird.mdb")
Accapp.DoCmd.OpenForm "frmLocation", acNormal, , ("[LocationID]="
& Chr(34) & thestring & Chr(34))
Exit Sub
eh:
MsgBox "Something isn't working!"
End Sub