Jump to content
Sign in to follow this  
Craig Sanders

Control of keyboard

Recommended Posts

I want to use single keys on the keyboard (probably the "z" to "?" row) to tally data points in various categories: "z", for example, might increase the numerical value of fieldone by 1, "x" might increase the value of fieldtwo, and so forth. Pressing the key has to do the whole job--pressing "return", for example, would make the process too inefficient. Is it possible for me to seize control of the keyboard in this way?


Share this post

Link to post
Share on other sites

Rather than use applescript or any other script that executes whenever you type a single key, why not just go into a global text field (called keyboardInput) and start hitting keys. When you are done, you can run a filemaker script Does the tallying like this:


# CharCount is a global number field

Set Field [CharCount, Calculation:1]


Exit Loop If [CharCount>Length(keyboardInput)]

If [Middle(KeyboardInput,CharCount,1)="z"

#tally the z field

End If

If [Middle(KeyboardInput,CharCount,1)="x"

#tally the x field

End If

If [Middle(KeyboardInput,CharCount,1)="c"

#tally the c field

End If

If [Middle(KeyboardInput,CharCount,1)="v"

#tally the v field

End If

# and so on for each possible key

#Go to the next character

Set Field [CharCount, Calculation: CharCount+1]

End Loop

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.