ESP32 état LED wifi pour changer couleur du text

Bonjour,
j'ai créer une aplis pour allumer une led en wifi via une commande http.
lorsque la led est allumée ou éteinte l'esp affiche l'état sur la page .
je souhaiterai maintenant changer la couleur du texte du bouton lorsque la led est allumée.
mais je n'arrive pas a récupérer l'info on ou off de la page web



(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

IVECO_Screen_checkpoint1.aia (238.8 KB)

This is how to grab the output of a WebView request:

You can use the text CONTAINS block to test for "EEon" or "EEoff" if you want to change anything in the AI2 Button properties.

If it's the buttons in the WebView HTML that you want to change, that's a HTML button style question I can't answer.

Merci, je vais essayer cette méthode, je ne souhaite pas modifier le bouton HTML, juste le bouton de l'app

As @ABG said to change the colors of the webpage is a HTML/CSS programming question. Here are some links you can look for hints, or use your friend. :slightly_smiling_face:
1
2

je cherche juste a changer la couleur du texte du bouton ECLAIRAGE EXTER. sur l'app lorsque la page HTML indique "EEon" , la methode proposé ne fonctionne pas.
peut-on détecter un mot clé affiché sur une page HTML ? le but est que quand un relais indique via une page HTML qu'il a été actionné (EEon et EMon) le texte du bouton change de couleur.

What does not work. You cant get the source of the page or you cant find the text in that source?

I typed up the magic Javascript for you, into draggable blocks:

IVECO_Screen_checkpoint1 (3).aia (239.5 KB)

(corrected thanks to @Usane)

I leave it to you to test and adjust to your taste.

I do not know if it works this way, but "I" should be capital in "AppInventor"
text
But you are right. I tested it with google and it works.
just an example:

J'ai testé, ça fonctionne très bien. Merci beaucoup

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.