use of different keys to trigger scripts

7 messages Options
Embed this post
Permalink
Colm Osiris-3

use of different keys to trigger scripts

Reply Threaded More More options
Print post
Permalink
Hi Experts

I'm currently implementing an iCal - FMP solution, using  
FMiCalConnector. What I'm trying to do is mimic the iCal interface as  
much as possible in FileMaker.

In the edit event window, if you click on one of the portions of a  
date or time, you can use the up and down arrow keys to increase or  
decrease it.

Is it possible to use these keys to trigger a script in FileMaker?

Thanks in advance.

Colm
_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Mark Rubenstein

Re: use of different keys to trigger scripts

Reply Threaded More More options
Print post
Permalink

On Oct 30, 2009, at 10:53 AM, Colm Osiris wrote:

> Is it possible to use these keys to trigger a script in FileMaker?

Yes, but only in FileMaker 10, using script triggers.


Mark Rubenstein
[hidden email]
www.easyaspi.com

_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
VanBuskirk, Patricia

RE: use of different keys to trigger scripts

Reply Threaded More More options
Print post
Permalink
We do it in FM9 using the ZippScript plugin.


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Mark
Rubenstein
Sent: Friday, October 30, 2009 11:59 AM
To: [hidden email]
Subject: Re: use of different keys to trigger scripts


On Oct 30, 2009, at 10:53 AM, Colm Osiris wrote:

> Is it possible to use these keys to trigger a script in FileMaker?

Yes, but only in FileMaker 10, using script triggers.


Mark Rubenstein
[hidden email]
www.easyaspi.com

_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Lorne & Joan Walton

Re: use of different keys to trigger scripts

Reply Threaded More More options
Print post
Permalink
In reply to this post by Colm Osiris-3
Colm, here's my script, which was optimized by the FMP-Experts:

Set Variable ( $plusmin ; Value: 30 - Code ( Get  
( TriggerKeystroke ) ) // code for up-arrow is 29, down-arrow is 31
If Abs ( $plusmin = 1 )
   Set Field ( Get ( ActiveFieldContents ) + $plusmin
End If

On Oct 30, 2009, at 8:53 AM, Colm Osiris wrote:

> I'm currently implementing an iCal - FMP solution, using  
> FMiCalConnector. What I'm trying to do is mimic the iCal interface  
> as much as possible in FileMaker.

--
Give me golf clubs, fresh air and a beautiful partner, and you can  
keep the clubs and the fresh air. [Jack Benny]
Lorne Walton, Maple Ridge, BC, Canada

_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Colm Osiris-3

Re: use of different keys to trigger scripts

Reply Threaded More More options
Print post
Permalink
Thanks to Mark, Trish and Lorne.

That's brilliant. I somehow hadn't come across 'Get  
( TriggerKeystroke )'.

> Set Variable ( $plusmin ; Value: 30 - Code ( Get  
> ( TriggerKeystroke ) ) // code for up-arrow is 29, down-arrow is 31
> If Abs ( $plusmin = 1 )

// it took a while to realise that the bracket on the last line should  
be before the equals :-) Before that, the up arrow would work, but not  
the down arrow.

>  Set Field ( Get ( ActiveFieldContents ) + $plusmin
> End If

That's exactly what I needed, and potentially more, as well. In a list  
of records, or a portal, I can use these keys to go up and down the  
list, too. I think. Probably involving an invisible field or something.

Colm
_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Tom Elliott-8

Re: use of different keys to trigger scripts

Reply Threaded More More options
Print post
Permalink
Colm

No need for invisible fields for portal/list navigation if you use  
OnLayoutKeystroke rather than OnObjectKeystoke- change the If step to

If (IsEmpty ( Get ( ActiveFieldName ) ) and Abs ( $plusmin ) = 1

then do a Goto Portal Row or Goto Record by calculation step

(or something like that)

[When you start combining different triggers on the same layout and/or  
object you need to be aware of the order in which they get fired]

cheers

Tom

On 31 Oct 2009, at 19:28, Colm Osiris wrote:

> Thanks to Mark, Trish and Lorne.
>
> That's brilliant. I somehow hadn't come across 'Get  
> ( TriggerKeystroke )'.
>
>> Set Variable ( $plusmin ; Value: 30 - Code ( Get  
>> ( TriggerKeystroke ) ) // code for up-arrow is 29, down-arrow is 31
>> If Abs ( $plusmin = 1 )
>
> // it took a while to realise that the bracket on the last line  
> should be before the equals :-) Before that, the up arrow would  
> work, but not the down arrow.
>
>> Set Field ( Get ( ActiveFieldContents ) + $plusmin
>> End If
>
> That's exactly what I needed, and potentially more, as well. In a  
> list of records, or a portal, I can use these keys to go up and down  
> the list, too. I think. Probably involving an invisible field or  
> something.
>
> Colm
> _______________________________________________
> FMPexperts mailing list
> [hidden email]
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>

_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Colm Osiris-3

Re: use of different keys to trigger scripts

Reply Threaded More More options
Print post
Permalink
Thank you very much Tom.

> No need for invisible fields for portal/list navigation if you use  
> OnLayoutKeystroke rather than OnObjectKeystoke- change the If step to
>
> If (IsEmpty ( Get ( ActiveFieldName ) ) and Abs ( $plusmin ) = 1
>
> then do a Goto Portal Row or Goto Record by calculation step
>
> (or something like that)

I'll give it a go.

> [When you start combining different triggers on the same layout and/
> or object you need to be aware of the order in which they get fired]

I will!

Cheers

Colm
_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au