can w simulate a right click in FM?
in fact i want to give the user the ability to do a right click on a word in a text field, display a contextual menu in order to go to thesaurus layout.
Can't be done in FileMaker (unless there's a plug in that offers this added functionality).
A button's script can be set to check to see if a modifier key such as shift or ctrl is being held down and then respond accordingly. The script could then use New Window to pop up a small floating window with your "contextual" menu in the form of a list of data where you can select one by clicking it. Closest, non plugin approach that I can think of for this...
ok, here is my problem.
in one of my layout i manage my thesaurus.
from another layout i want to provide the user the ability to check a word in my thesaurus. so i thought that a right clik, go to thesaurus would be fine. but i'm open for another solution.
Is this a word inside a text field with many other words?
I came up with a clicked word demo that might be modifiable for this purpose. You can could modify it's script, for example so that the script only searches the thesaurus table for matching entries when the shift or other modifier key is held down at the same time that the word is clicked. The demo changes layouts, but this can be changed to work with the New Window step to use it to display your find results. Your find results can be a clickable list of matching entries.
Here's the download link (Click the Blue download button and ignore the green): http://www.4shared.com/file/v5xFb7_R/ClickedWordDemo.html
thanks for the example.
how can i highlight the word i clicked .
is there a way for example the use highlight the word and then click on a small button next to the field and the system wil ltake him to the definition layout ?
You could use the mouse to highlight the word by double click or click drag and then initiate a script by clicking a button. The Get functions:
Get(ActiveSelectionSize) and Get(ActiveSelectionStart) will give you the needed figures to use with Middle to extract the highlighted text into a variable so that you can use it to perform a search of your thesaurus table.
ok i will try it, thanks
it works fine but still one issue:
when i extract my word i specify explicitely the field in my database.
(Middle ( Object::Description; Get ( ActiveSelectionStart ); Get(ActiveSelectionSize)))
how can i make this generic for every field in my layout?
it works, thanks
Retrieving data ...