Jump to content
Server Maintenance This Week. ×

Control of keyboard


This topic is 8493 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

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?

Thanks.

Link to comment
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:

code:


# CharCount is a global number field

Set Field [CharCount, Calculation:1]

Loop

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


Link to comment
Share on other sites

This topic is 8493 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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