
Quote from farhad2008 on February 2, 2020, 2:51 pmHi
I've created a new plugin that can change the color of your favorite character.It's free.
regards,
Hi
I've created a new plugin that can change the color of your favorite character.
It's free.
regards,
Uploaded files:

Quote from rrey on February 2, 2020, 3:53 pmHola @farhad2008
Lo he probado y funciona. Es muy bueno. ¿Se podría aplicar a un TextInput también?
Muchas gracias.
Roger Rey
Hola @farhad2008
Lo he probado y funciona. Es muy bueno. ¿Se podría aplicar a un TextInput también?
Muchas gracias.
Roger Rey

Quote from luishp on February 2, 2020, 5:28 pmThank you @farhad2008!
I have added you to the plugin developers group.
Welcome :)
Thank you @farhad2008!
I have added you to the plugin developers group.
Welcome :)

Quote from farhad2008 on February 2, 2020, 6:17 pmHi, @luishp
Thanks for the honor
regards,
Hi, @luishp
Thanks for the honor
regards,

Quote from rrey on February 27, 2020, 8:47 pmHola,
Es posible que esta función pueda cambiar el color de más de un caracter. Si intento cambiar de color dos caracteres de una cadena no funciona, solo cambia de color el primero.
En este ejemplo el resultado final es que cambia de color el caracter con posición 3, el que tiene posición 2 no lo cambia.
set_char_color "Container1" 2 "red"
set_char_color "Container1" 3 "red"Por otra parte ¿Se podría aplicar a otros objetos como "textinput" o "área de texto".
Si es posible hacerlo más completo estaría dispuesto a comprarlo
Hola,
Es posible que esta función pueda cambiar el color de más de un caracter. Si intento cambiar de color dos caracteres de una cadena no funciona, solo cambia de color el primero.
En este ejemplo el resultado final es que cambia de color el caracter con posición 3, el que tiene posición 2 no lo cambia.
set_char_color "Container1" 2 "red"
set_char_color "Container1" 3 "red"
Por otra parte ¿Se podría aplicar a otros objetos como "textinput" o "área de texto".
Si es posible hacerlo más completo estaría dispuesto a comprarlo

Quote from luishp on February 27, 2020, 11:17 pmPor otra parte ¿Se podría aplicar a otros objetos como "textinput" o "área de texto".
No se puede, aunque se pueden simular haciendo que un <div> sea editable:
https://stackoverflow.com/questions/17341670/change-color-of-one-character-in-a-text-box-html-css
Por otra parte ¿Se podría aplicar a otros objetos como "textinput" o "área de texto".
No se puede, aunque se pueden simular haciendo que un <div> sea editable:
https://stackoverflow.com/questions/17341670/change-color-of-one-character-in-a-text-box-html-css

Quote from rrey on February 28, 2020, 4:56 pm@luishp
Lo que intento hacer es comparar dos cadenas de texto, una de ellas introducida por el usuario como respuesta. Lo que necesito es que en tiempo de ejecución coloree los caracteres que no coinciden con la solución.
Lo que intento hacer es comparar dos cadenas de texto, una de ellas introducida por el usuario como respuesta. Lo que necesito es que en tiempo de ejecución coloree los caracteres que no coinciden con la solución.
Quote from Gaev on February 28, 2020, 7:24 pm@rrey
What I am trying to do is compare two text strings, one of them entered by the user in response. What I need is that at runtime I color the characters that do not match the solution.
I am not clear what the display(s) should look like ...
1) Do you want to show the differences as each character is being entered or only when the user has finished entering (and presses a Push Button (which compares the two strings and displays the differences).
a) If the answer is 'at the end', do you want to display just the user entered text (with differences hilited) ?
b) As far as I know, it is not possible to have the contents of a Text Entry Box contain 'rich text'.
You could make it appear so with some 'smoke and mirror' tricks i.e. cover it with a (rich text) object and echo the characters entered by the user in it ... this is where you would hilite the differences.
2) Can you elaborate on 'differences' ? ... what gets hilited in situations where ...
a) '123456789' vs. (entered) '1234abcd56789
b) '123456789' vs. (entered) '1234789'
c) 'cats hate dogs' vs. (entered) 'dogs hate cats'
d) any other patterns not covered above
What I am trying to do is compare two text strings, one of them entered by the user in response. What I need is that at runtime I color the characters that do not match the solution.
I am not clear what the display(s) should look like ...
1) Do you want to show the differences as each character is being entered or only when the user has finished entering (and presses a Push Button (which compares the two strings and displays the differences).
a) If the answer is 'at the end', do you want to display just the user entered text (with differences hilited) ?
b) As far as I know, it is not possible to have the contents of a Text Entry Box contain 'rich text'.
You could make it appear so with some 'smoke and mirror' tricks i.e. cover it with a (rich text) object and echo the characters entered by the user in it ... this is where you would hilite the differences.
2) Can you elaborate on 'differences' ? ... what gets hilited in situations where ...
a) '123456789' vs. (entered) '1234abcd56789
b) '123456789' vs. (entered) '1234789'
c) 'cats hate dogs' vs. (entered) 'dogs hate cats'
d) any other patterns not covered above

Quote from rrey on February 28, 2020, 8:04 pmPor ejemplo si la respuesta correcta es 'casa' y el usuario escribe como respuesta 'cosa', entonces el programa cambia de color la letra 'o' una vez ha pulsado el botón. Es decir, colorea las letras que no coinciden en su posición.
Por ejemplo si la respuesta correcta es 'casa' y el usuario escribe como respuesta 'cosa', entonces el programa cambia de color la letra 'o' una vez ha pulsado el botón. Es decir, colorea las letras que no coinciden en su posición.
Quote from Gaev on February 28, 2020, 9:16 pm@rrey
For example, if the correct answer is 'home' and the user writes 'thing' as an answer, then the program changes the letter 'or' color once the button has been pressed. That is, color the letters that do not match in position.
Sorry for more questions (perhaps Google translation is causing confusion) but are you saying that ...
1) you have a Text Entry Box where user enters 'thing' (e.g. in black color)
2) user then clicks/presses a Push Button ... where the script does the comparison
3) you want to show the user that the answer was incorrect by changing the color of the entire word (i.e. 'thing') ...- either by changing the color of the text in the Text Entry Box to (say) red
- or displaying the word 'thing' within a (rich) Text Box in (say) red colorPlease confirm ... if not, perhaps you can show a screen shot.
For example, if the correct answer is 'home' and the user writes 'thing' as an answer, then the program changes the letter 'or' color once the button has been pressed. That is, color the letters that do not match in position.
Sorry for more questions (perhaps Google translation is causing confusion) but are you saying that ...
1) you have a Text Entry Box where user enters 'thing' (e.g. in black color)
2) user then clicks/presses a Push Button ... where the script does the comparison
3) you want to show the user that the answer was incorrect by changing the color of the entire word (i.e. 'thing') ...
- either by changing the color of the text in the Text Entry Box to (say) red
- or displaying the word 'thing' within a (rich) Text Box in (say) red color
Please confirm ... if not, perhaps you can show a screen shot.

Quote from rrey on February 28, 2020, 10:43 pmTe dejo un ejemplo
https://docs.google.com/presentation/d/1s-pi5g-nKxwHfPO5Gy0wAkuCIwjtaTxDE68i4A2PPRc/edit?usp=sharing
Te dejo un ejemplo
https://docs.google.com/presentation/d/1s-pi5g-nKxwHfPO5Gy0wAkuCIwjtaTxDE68i4A2PPRc/edit?usp=sharing
Quote from Gaev on February 28, 2020, 11:32 pm@rrey
Thank you for the slide
1) The purpose of a Text Entry Box is to echo characters entered by a user; so there is no facility to make different characters of a different colour.
So the OUTPUT (in your slide) has to be a (rich) Text object.
2) So, it is possible to use script to compose the entered Text that shows erroneous characters in a different color.
The question is 'what qualifies as an erroneous character' ... your slide example (Elefante vs. Elofanta) is just one erroneous pattern i.e. same number of characters in INPUT as expected ... but how do you want to show ...
- ABCD vs. DCBA ... show all characters are erroneous ?
- ABCD vs. - ZZZABCD ... show all characters as erroneous ?
- ABCD vs. - ABD ... show D as erroneous ?... if you like, you can show these examples in the same slide show.
Thank you for the slide
1) The purpose of a Text Entry Box is to echo characters entered by a user; so there is no facility to make different characters of a different colour.
So the OUTPUT (in your slide) has to be a (rich) Text object.
2) So, it is possible to use script to compose the entered Text that shows erroneous characters in a different color.
The question is 'what qualifies as an erroneous character' ... your slide example (Elefante vs. Elofanta) is just one erroneous pattern i.e. same number of characters in INPUT as expected ... but how do you want to show ...
- ABCD vs. DCBA ... show all characters are erroneous ?
- ABCD vs. - ZZZABCD ... show all characters as erroneous ?
- ABCD vs. - ABD ... show D as erroneous ?
... if you like, you can show these examples in the same slide show.


Quote from rrey on February 29, 2020, 10:33 amTe dejo también la diapositiva
https://docs.google.com/presentation/d/1s-pi5g-nKxwHfPO5Gy0wAkuCIwjtaTxDE68i4A2PPRc/edit?usp=sharing
Te dejo también la diapositiva
https://docs.google.com/presentation/d/1s-pi5g-nKxwHfPO5Gy0wAkuCIwjtaTxDE68i4A2PPRc/edit?usp=sharing
Quote from Gaev on February 29, 2020, 5:55 pm@rrey
Thank you for the visual descriptions.
This can be achieved fairly simply using script commands ... would you like me to provide a sample App ?
@rrey
Thank you for the visual descriptions.
This can be achieved fairly simply using script commands ... would you like me to provide a sample App ?

Quote from Gaev on March 1, 2020, 12:56 am@rrey
Take a look at attached project file and advise of any errors, omissions or misunderstandings ... I only understand Google-Spanish :-))
Note:
1) the first page is only for testing ... in a real exam, the student would get this text from some exam file contents.
2) all the work is done within the subroutine called ShowTextDifferences (so you can deploy it from several places within your Project) ... it accepts 4 parameters ...
- variable containing first string (e.g. teacher's test)
- variable containing second string (e.g. student's answer text)
- whether the comparison cares about uppercase/lowercase differences (i.e. is b same as B ?)
- variable in which to return the composed HTML result3) the subroutine uses CSS classes .goodCompare and .badCompare when composing the comparison results ... take a look at Project >>> Properties >>> Styles ... this where you can add/remove (rich text) attributes
Take a look at attached project file and advise of any errors, omissions or misunderstandings ... I only understand Google-Spanish :-))
Note:
1) the first page is only for testing ... in a real exam, the student would get this text from some exam file contents.
2) all the work is done within the subroutine called ShowTextDifferences (so you can deploy it from several places within your Project) ... it accepts 4 parameters ...
- variable containing first string (e.g. teacher's test)
- variable containing second string (e.g. student's answer text)
- whether the comparison cares about uppercase/lowercase differences (i.e. is b same as B ?)
- variable in which to return the composed HTML result
3) the subroutine uses CSS classes .goodCompare and .badCompare when composing the comparison results ... take a look at Project >>> Properties >>> Styles ... this where you can add/remove (rich text) attributes
Uploaded files:
Quote from rrey on March 1, 2020, 12:10 pm@gaev
Gracias primero de todo por tu tiempo y trabajo. Es un gran avance.
Hay alguna cosa que no coincide. Te lo explico aquí:
https://docs.google.com/presentation/d/1s-pi5g-nKxwHfPO5Gy0wAkuCIwjtaTxDE68i4A2PPRc/edit?usp=sharing
Gracias primero de todo por tu tiempo y trabajo. Es un gran avance.
Hay alguna cosa que no coincide. Te lo explico aquí:
https://docs.google.com/presentation/d/1s-pi5g-nKxwHfPO5Gy0wAkuCIwjtaTxDE68i4A2PPRc/edit?usp=sharing
Quote from Gaev on March 1, 2020, 3:59 pm@rrey
Sorry, I messeed up ... did not retest everything after I added the CaseMatters feature :-(
New Version attached ... please download and test again.
Sorry, I messeed up ... did not retest everything after I added the CaseMatters feature :-(
New Version attached ... please download and test again.
Uploaded files:
Quote from rrey on March 1, 2020, 7:41 pm@gaev
Thank you.
Now it works perfectly. I am very happy.
For me it is a great help function for the educational applications that I create.
How can I pay you? It could be a very interesting pluguin
Roger Rey
Thank you.
Now it works perfectly. I am very happy.
For me it is a great help function for the educational applications that I create.
How can I pay you? It could be a very interesting pluguin
Roger Rey