Jump to content
Server Maintenance This Week. ×

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

Recommended Posts

Nice, I could see this being useful with a map.

Once you upload an image of a map, you could calculate the distance between two user selected places.

Or give an estimate of a route clicked out by the user.

Thanks for sharing.

Jerry

Link to comment
Share on other sites

  • 1 month later...

The trick is based upon some things:

1) the function Get ( ActiveSelectionStart ) returns a number, IF we click into a NOT EMPTY(*) field

2) that number is the position of the clicked char

So an OnObjectEnter trigger can use that position to evaluate wich is the char ( a space or a "X" ) with the function Middle ( ) and replace that char ( with a "X" or a space )

(*) The "Inizialize" button essentially puts many spaces into the field and some "returns" ( because ONLY spaces not allowed by FileMaker )

Link to comment
Share on other sites

  • 4 weeks later...

Thank you for this file; it is very nice. I tried to modify it but was only semi-successful. Instead of placing an "x" on a picture, I would like to have a number. However, I couldn't find a way to have only numbers and I needed to count the "x"s, so I settled for something like this: "x-1", "x-2", "x-3", etc. This works fine.

However, when I click on a location that already has a string (e.g. "x-5"), instead of deleting just that string (which works well in the original file), all of my strings are deleted.

The crux, I believe, lies in the calculation result for the set field:

Original:


Case(

Middle ( Points::Points ; $point ; 1 ) = ¶ ; Replace ( Points::Points ; $point ; 1 ; ¶ ) ;

Middle ( Points::Points ; $point ; 1 ) = " " ; Replace ( Points::Points ; $point ; 1 ; "x" ) ;

Middle ( Points::Points ; $point ; 1 ) = "x"; Replace ( Points::Points ; $point ; 1 ; " " )

)





My adaptation:



Let ( [

_n = PatternCount ( Points::Points ; "x" ) + 1 ;  // _n for number

_s = "x" & "-" & _n ] ;      // _s for string



  Case(

    Middle ( Points::Points ; $point ; 1 ) = ¶ ; Replace ( Points::Points ; $point ; 1 ; ¶ ) ;

    Middle ( Points::Points ; $point ; 1 ) = " " ; Replace ( Points::Points ; $point ; 1 ; _s ) ;

    PatternCount ( Middle ( Points::Points ; $point ; 1 ) ; _s ) ; Replace ( Points::Points ; $point ; 1 ; " " )  // unsuccessful attempt

    //Middle ( Points::Points ; $point ; 1 ) = _s ; Replace ( Points::Points ; $point ; 1 ; " " )                      // unsuccessful attempt

  )

)

The reason for the number, by the way, is that in another field or possibly a related table, I want to reference that number: "x-1: the photo is too light here"; "x-2: photo needs cropping here", etc.

Can anyone help me figure out how to keep the strings already on the photo and ONLY remove the string if I click on the exact location (as in the original)?

Thanks.

PointsOnImage_copy.fp7.zip

Link to comment
Share on other sites

BTW:

1) if "x-1: the photo is too light here", what if the photo is too lite in 10 points ?

2) how many references do you think to need ?

3) numbers alone can be inserted at the clicked point.

Link to comment
Share on other sites

Thank you, raybaudi. This is exactly what I was trying to do. Regarding your questions, they are very good and I do not have the answers. I will ask the end user.

I really appreciate your reply - Grazie Mille!

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

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