PlayMaker Help & Tips > PlayMaker Help

Need help creating custom keyboard [SOLVED]

<< < (3/3)

cablebob1:
Thanks Alio. I understand how to limit the max characters.

Get String Length
If String Length is less than 10 allow button to be pressed
If String Length is equal to or greater than 10 do not allow button to be pressed


The problem I'm having is I need to say:

Get String Length
String Length is 10 (var1)
var1 - 1 = 9
Set String length to 9

So I need to take a string that is 10 characters and change it to 9. Then change the 9 characters to 8.....etc

Is there an action that allows you to Set String Length to an Int?

Alio:
you'll have to use convert int to string/ string to int and create a variable that is a string and one that is an int name it the same and just add suffix _i or _s so you can identify the two quickly by looking at them. Then you jsut need to set your GUI text to that sting and your prob already idenitified your ints so it should solve your prob.

sorry adding something as i might of misread.  once you get the length you want you have to set it and then get it again. otherwise it would loop back over and never replace.  you will have to do this for both the int and the string as they work off of eachother remember, int is your value, string is only displaying that value via gui text

Vallar:
Hello,

That isn't stupid question at all, it took me a while to find.it. to be honest.
Much like what Alio said However to set the variable you use Add Int and that will set the length of the string so it the actions should be like this:

Get String Length (The get action has a parameter for the string to check its length and at the same time storing the length in an int variable of your choice so it works as both getter and setter)
Add Int (stringLength as variable and the Int to add is -1)
Note:the step above will set the string length for you.
Get String Left (feed the stringLength to it and your original string variable)

The above means you will need two different variables one as an int and one as string.

cablebob1:
THANKS GUYS!!! I finally had time to get back to figuring out the keyboard this morning. I did exactly what y'all said and it works great! I very much appreciate the help.

Vallar:
Awesome, glad you managed to do it! Congratulations! :D

Navigation

[0] Message Index

[*] Previous page

Go to full version