Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Just started to create my first own custom function.

Functionname: Hexcode

Parameter: farg

The problem is that the function returns the 6 letter code but without the "#"

"#" &

Case(

farg="aqua";"00FFFF";

farg="beige";"F5F5DC";

farg="blå";"0000FF";

farg="blåviolett";"8A2BE2";

farg="brun";"A52A2A";

farg="chocklad";"D2691E";

farg="cyan";"00FFFF";

farg="svart";"F5F5DC";

farg="korall";"FF7F50";

farg="Mörkblå";"00008B";

farg="Mörkcyan";"008B8B"

)

Something I missed?

Posted

Works for me.

Are you using a different language version of FMP, where the # character has a special meaning? If so, it may need to be escaped.

Posted (edited)

Using the swedish version but as far as I know # has no special meaning....

EDIT

Now it's working, wasn't a problem with the function itself but with a "middlewords" further down in the script using the function, it just grabbed the numbers and not the "#", my fault!

Thanks for your help

ps. changed "middlewords" to "middlevalues" -> now it works just fine ds.

Edited by Guest
Posted (edited)

And it has nothing to do with TextColor( requirering an integer as argument??

Perhaps you would need a CF like this one in between:

http://www.briandunning.com/cf/115

--sd

Holmberg.zip

Edited by Guest

This topic is 6781 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.