|
|
 |  |
Re: Events ErrorFrom: Franklin Marmon Date: Friday, July 18, 2003
Time: 12:03:55 pm
sorry, this is a syntax I'm not familiar with. The FileMaker help says
the hierarchy for container objects should be in the applescript
dictionary. It doesn't appear to be. I'm getting the error: "Can't
get "<Login>" in database "ApacheConf.fp5". Access is not allowed.". I
assume this has something to do with the field,record,database
realtaionsip, but as of yet haven't found a map of those contains.
Currently i'm working on it in logical formation. Database contains
Record contains Field. Using this, I've tried this syntax:
set data field "Login" to "<Login>" in record newrecord in database
"ApacheConf.fp5"
Is this the correct syntax for something like this?
frm
On Friday, July 18, 2003, at 12:25 PM, Shawn Hogan wrote:
> Franklin Marmon wrote:
>
>> After significant debugging what I've found is that the script works
>> fine if the 'ApacheConf.fp5' db is in the foreground (executed from
>> ScriptEditor) but fails if MainMenu.fp5 is in the foreground.
>> FileMaker seems to be requiring db in the foreground to execute
>> 'create
>> new record'. This script, when executed from within the OG GUI
>> creates
>> a new, empty, 'Event' record in OG, rather than a new record in
>> 'ApacheConf.fp5'. I get the same behavior if I change 'tell window'
>> to
>> 'tell database' within FileMaker (note: tell database doesn't seem to
>> work from ScriptEditor).
>>
>> the 'Object not found.' error is appearing when filemaker tries to 'go
>> to record newrecord' because 'newrecord' doesn't exist since 'create
>> new record' created a record in the wrong file.
>>
>> I've tried entering various gross hacks like 'open file apacheConf'
>> where apacheConf is the path to the ApacheConf.fp5 file. This didn't
>> work. I also tried doing this, which didn't work with an odd error
>> ('A
>> number can't got after this property')
>>
>> tell window "ApacheConf.fp5" of application "FileMaker Pro"
>> set index 1
>> end tell
>>
>> As I understand the FileMaker Pro AppleScript dictionary, you use 'set
>> index #' to reposition a window within the program. I could be wrong
>> there, but it looks that way to me.
>>
>> Ideas?
>
> Use the "in database" clause... for example:
>
> tell application "FileMaker Pro"
> set maxrecords to count records in database "ApacheConf.fp5"
> create new record in database "ApacheConf.fp5"
> set newrecord to maxrecords + 1
> go to record newrecord in database "ApacheConf.fp5"
> set data field "Login" to "<Login>" in database "ApacheConf.fp5"
> set data field "Product_ID" to "<BProdID>" in database
> "ApacheConf.fp5"
> do script "select_first_domain" in database "ApacheConf.fp5"
> do script "do_recalc" in database "ApacheConf.fp5"
> do script "do_ssh" in database "ApacheConf.fp5"
> delete record newrecord in database "ApacheConf.fp5"
> end tell
>
> Of course I have not tested it, but it should work I think.
>
> - Shawn
>
> ----------------------------------
> Shawn D. Hogan
> President, Digital Point Solutions
> http://www.digitalpoint.com
> (858) 452-3696
>
>
> ---------------------------------------------------
> To subscribe, unsubscribe or to search list archive
> please visit http://www.optigold.com/lists/isp.html
> ---------------------------------------------------
---------------------------------------------------
To subscribe, unsubscribe or to search list archive
please visit http://www.optigold.com/lists/isp.html
---------------------------------------------------
|
Messages In This Thread:- Events Error by Franklin Marmon on Jul 17, 2003 at 3:32:26 pm
|

Return to Digital Point Solutions' Home Page |