|
| FM AppleScript task, seems so simple... |
 |
Wed, 12 Mar 2008 09:45:39 -100 |
Hi Group -
Thanks for all help in the past and future. Even with little experience
in AppleScript, I thought I could make a packaged script that would open
a FMSvr9 LAN hosted FM database from my Mac Leopard workstation. The
FileMaker AppleScript help database that ships with FMAdv9 says "Use
GetURL to open a remote database..." and the examples seem
straightforward. My script goes:
Tell application "FileMaker Pro"
Activate
GetURL "fmnet:/###.###.###.###/mydatabase.fp7"
End tell
I'm sure of the path, the script compiles with no problem, I can open
this database interactively any time I want. I should actually be able
to leave out the "Activate" step if I want to, I've tried it both
ways.
The script runs, FMPro launches, and then... nothing. No database, no
error message, no hanging process.
I know that the examples in the help database use "FMP7:/" instead of
"fmnet:/" but I'm confident that that prefix is obsolete. Just to be
sure, I've tried it both ways, of course.
Any enlightenment deeply appreciated.
|
| Post Reply
|
| Re: FM AppleScript task, seems so simple... |
 |
Wed, 12 Mar 2008 18:35:14 -070 |
On Mar 12, 12:45 pm, James <jbu...@pixi.com> wrote:
> Hi Group -
>
> Thanks for all help in the past and future. Even with little experience
> in AppleScript, I thought I could make a packaged script that would open
> a FMSvr9 LAN hosted FM database from my Mac Leopard workstation. The
> FileMaker AppleScript help database that ships with FMAdv9 says "Use
> GetURL to open a remote database..." and the examples seem
> straightforward. My script goes:
>
> Tell application "FileMaker Pro"
> Activate
> GetURL "fmnet:/###.###.###.###/mydatabase.fp7"
> End tell
>
> I'm sure of the path, the script compiles with no problem, I can open
> this database interactively any time I want. I should actually be able
> to leave out the "Activate" step if I want to, I've tried it both
ways.
> The script runs, FMPro launches, and then... nothing. No database, no
> error message, no hanging process.
>
> I know that the examples in the help database use "FMP7:/"
instead of
> "fmnet:/" but I'm confident that that prefix is obsolete. Just
to be
> sure, I've tried it both ways, of course.
>
> Any enlightenment deeply appreciated.
>
> James
I'm not sure why your applescript is having problems, but I can say
the most common solution to the problem you are having is to use a
'stub database' that has a script that opens the remote database.
so you create a database, it has nothing but a script that says "open
file (fmnet...), then close this file" and that script is set to run
when the database opens. So double clicking on this 'stub' causes
filemaker to open, the remote database to open, and then the stub to
close.
You can also easily enhance it to verify that tcp/ip network is
enabled in filemaker, and open the remote database with predefined
credentials if you like. As a bonus its cross platform and works on
windows equally well.
-cheers,
|
| Post Reply
|
| Re: FM AppleScript task, seems so simple... |
 |
Fri, 14 Mar 2008 02:17:54 -100 |
Hi Dave -
Thanks very much for your reply. In the past, I have often used local
FM databases as you suggest to open network-hosted databases. Another
trick is to have your auto-running script create a new record and
auto-enter the Date, Time and Username before closing. This provides
you with a handy log of database use.
Now, though, I am focused on using AppleScript to open databases by my
client's request. Can't imagine why this doesn't work, and I hope
someone else in the group will have some insight.
Thanks again -
James
d-42 wrote:
> On Mar 12, 12:45 pm, James <jbu...@pixi.com> wrote:
>> Hi Group -
>>
>> Thanks for all help in the past and future. Even with little
experience
>> in AppleScript, I thought I could make a packaged script that would
open
>> a FMSvr9 LAN hosted FM database from my Mac Leopard workstation. The
>> FileMaker AppleScript help database that ships with FMAdv9 says
"Use
>> GetURL to open a remote database..." and the examples seem
>> straightforward. My script goes:
>>
>> Tell application "FileMaker Pro"
>> Activate
>> GetURL "fmnet:/###.###.###.###/mydatabase.fp7"
>> End tell
>>
>> I'm sure of the path, the script compiles with no problem, I can open
>> this database interactively any time I want. I should actually be
able
>> to leave out the "Activate" step if I want to, I've tried it
both ways.
>> The script runs, FMPro launches, and then... nothing. No database,
no
>> error message, no hanging process.
>>
>> I know that the examples in the help database use "FMP7:/"
instead of
>> "fmnet:/" but I'm confident that that prefix is obsolete.
Just to be
>> sure, I've tried it both ways, of course.
>>
>> Any enlightenment deeply appreciated.
>>
>> James
>
> I'm not sure why your applescript is having problems, but I can say
> the most common solution to the problem you are having is to use a
> 'stub database' that has a script that opens the remote database.
>
> so you create a database, it has nothing but a script that says "open
> file (fmnet...), then close this file" and that script is set to run
> when the database opens. So double clicking on this 'stub' causes
> filemaker to open, the remote database to open, and then the stub to
> close.
>
> You can also easily enhance it to verify that tcp/ip network is
> enabled in filemaker, and open the remote database with predefined
> credentials if you like. As a bonus its cross platform and works on
> windows equally well.
>
> -cheers,
|
| Post Reply
|
| Re: FM AppleScript task, seems so simple... |
 |
Fri, 14 Mar 2008 18:11:00 -100 |
Hi Harry -
And thanks very much for your thoughts. I have tried a bunch of
different strings for the URL, including doubling the forward slash as
you suggest. Varying results, but no joy. FM says in my V9
documentation that "get remote URL" does not open a remote database,
but
displays the "Open Remote File..." dialog box and selects the server
mentioned as a parameter, and so it seems to be.
I will continue to work on this and if I discover the secret, I'll post.
Thanks again to all for your suggestions.
James
Helpful Harry wrote:
> In article <47da6cf4$0$6117$4c368faf@roadrunner.com>, James
> <jbusch@pixi.com> wrote:
>
>> Hi Dave -
>>
>> Thanks very much for your reply. In the past, I have often used local
>> FM databases as you suggest to open network-hosted databases. Another
>> trick is to have your auto-running script create a new record and
>> auto-enter the Date, Time and Username before closing. This provides
>> you with a handy log of database use.
>>
>> Now, though, I am focused on using AppleScript to open databases by my
>> client's request. Can't imagine why this doesn't work, and I hope
>> someone else in the group will have some insight.
>>
>> Thanks again -
>> James
>
> Why not use a "stub" database and use AppleScript to open that
instead?
> It should solve the problem and sticks to the "letter of the law"
for
> the client's strange request. ;o)
>
> I know next to nothing about AppleScript, so these ideas may be
> completely off track, but for what it's worth ...
>
>
>> Tell application "FileMaker Pro"
>> Activate
>> GetURL "fmnet:/###.###.###.###/mydatabase.fp7"
>> End tell
>>
>> I'm sure of the path, the script compiles with no problem,
>
> Compiling means nothing for this problem. It probably doesn't bother
> checking the actual URL address is correct, but simply that something
> has been typed in there as the required parameter. Since the script
> commands are proper ones and have the needed parameters, it compiles
> with no error. It's only later when actually running and trying to open
> that URL address that it hits a failure point.
>
> Are you sure the address string is correctly formatted? I've only got
> FileMaker 5.5, but according to its AppleSript dictionary the address
> should have a double "//" after the ":" (just like any
normal http or
> FTP address in a browser).
> eg.
> GetURL "fmnet://###.###.###.###/mydatabase.fp7"
>
> or perhaps
> GetURL "FMP7://###.###.###.###/mydatabase.fp7"
>
> Although if you're using FileMaker 9 it may actually be:
> GetURL "FMP9://###.###.###.###/mydatabase.fp7"
>
> FileMaker 5.5 also has a second command in its dictionary for opening a
> remote database, but it may be the same thing or may no longer exist in
> newer versions:
>
> Get Remote URL "FMP5://[host]/filename"
>
>
> Helpful Harry
|
| Post Reply
|
| Re: FM AppleScript task, seems so simple... |
 |
Sat, 15 Mar 2008 12:09:49 +130 |
In article <47da6cf4$0$6117$4c368faf@roadrunner.com>, James
<jbusch@pixi.com> wrote:
> Hi Dave -
>
> Thanks very much for your reply. In the past, I have often used local
> FM databases as you suggest to open network-hosted databases. Another
> trick is to have your auto-running script create a new record and
> auto-enter the Date, Time and Username before closing. This provides
> you with a handy log of database use.
>
> Now, though, I am focused on using AppleScript to open databases by my
> client's request. Can't imagine why this doesn't work, and I hope
> someone else in the group will have some insight.
>
> Thanks again -
> James
Why not use a "stub" database and use AppleScript to open that
instead?
It should solve the problem and sticks to the "letter of the law" for
the client's strange request. ;o)
I know next to nothing about AppleScript, so these ideas may be
completely off track, but for what it's worth ...
> Tell application "FileMaker Pro"
> Activate
> GetURL "fmnet:/###.###.###.###/mydatabase.fp7"
> End tell
>
> I'm sure of the path, the script compiles with no problem,
Compiling means nothing for this problem. It probably doesn't bother
checking the actual URL address is correct, but simply that something
has been typed in there as the required parameter. Since the script
commands are proper ones and have the needed parameters, it compiles
with no error. It's only later when actually running and trying to open
that URL address that it hits a failure point.
Are you sure the address string is correctly formatted? I've only got
FileMaker 5.5, but according to its AppleSript dictionary the address
should have a double "//" after the ":" (just like any
normal http or
FTP address in a browser).
eg.
GetURL "fmnet://###.###.###.###/mydatabase.fp7"
or perhaps
GetURL "FMP7://###.###.###.###/mydatabase.fp7"
Although if you're using FileMaker 9 it may actually be:
GetURL "FMP9://###.###.###.###/mydatabase.fp7"
FileMaker 5.5 also has a second command in its dictionary for opening a
remote database, but it may be the same thing or may no longer exist in
newer versions:
Get Remote URL "FMP5://[host]/filename"
Helpful Harry
|
| Post Reply
|
|
|