Nextion - triggering a click event FROM ANOTHER PAGE

Hello friends,

I have a Nextion NX8048T050_011 screen.
I have 11 pages inside this screen.
The definition of these screens in Arduino Mega (their IDs in Nextion are the same):

uint8_t pEpromParams = 0;
uint8_t pModeSelection = 1;
uint8_t pDispenseMode = 2;
uint8_t pContinuousMod = 3;
uint8_t pUserManual = 4;
uint8_t pParameters = 5;
uint8_t keybdB = 6;
uint8_t pNavigation = 7;
uint8_t pComboRate = 8;
uint8_t pComboDiameter = 9;
uint8_t pComboVolume = 10;
uint8_t pComboLanguage = 11;

(Since this model does not support combobox, I made my own combobox: with pCombo* pages)

I'm coding a multilingual application. Since the screen I use is not an advanced model, there is no eeprom on the screen. so I'm going to use the eeprom on the Mega chip. I take the user's language selection from eeprom at Mega and send it to Nextion. I collect all of the variables on the pEpromParameters page. and I want to send a click code to the bSetLanguage button on the pParameters page when this splash screen finishes, but it doesn't happen!??

My code in the pEpromParams page:
click pParameters.bSetLanguage,0

I've also tried:
click pParameters.bSetLanguage,1

and

click pParameters.bSetLanguage,1
click pParameters.bSetLanguage,0

but the compiler (i'm using nextion editor v0.58) fails on these lines.
"Error:Invalid Component ID:pParameters.bSetLanguage( Double click to jump to code)"

note: The vscope property of all related objects is set global.
"click pParameters.bSetLanguage.id, 0" as compiled, but the code does not work.

ITEAD says in this link: Instruction Set - Nextion
click b0,1 // Trigger Touch Press Event of component with .objname b0
click 4,0 // Trigger Touch Release Event of component with .id 4

Thanks for your helps.

Ersin Kecis.

1 Like

Hello Ersin,
Welcome to the forum.

I suggest you create a simple 2 page Nextion configuration with one object on each and see if you can get that to work. I am surprised you have got as far as 11 pages before you noticed the problem.

If this were my project I would not store any text at all on the Nextion, I would store all of it on the Arduino and send the appropriate text to text boxes when needed. The text could then be in any language as required with the Arduino making the selection.

Hello,

Firstly thank you for your interest.
I did the test you suggested. But the result has not changed.
You can download my test project (for v0.58) from this link:
https://we.tl/t-MMmFlKCfss

This project is being updated for a device that previously worked with a Windows tablet. So we want to make a minimum change on the arduino side.

Another reason is the bad feature which is te te nextion screens. On the other hand, if you write arduino codes while designing the screen, you have to update the arduino triggers continuously until the project is finished. Because the changes you make on the Nextion screen can change the IDs of all objects. Nextion changes it by itself. In this case, our Nextion triggers on the arduino side become inoperable. This is a very bad situation.

There are thousands of ways to get a job done. When I realized it wasn't like this, I divided the code into eleven pieces. And I've updated each page's input load to set that page's own language. That's how I handled it, but it would be better to have the code at a central point.

Thanks.

I did the test you suggested. But the result has not changed.
You can download my test project (for v0.58) from this link:
https://we.tl/t-MMmFlKCfss

Please can you put your HMI file into a zip file and upload to this website? Two reasons for this; 1. I try to avoid going to web sites I don't know in order to avoid malware, 2. That way it will be here for ever more to help other people reading this in future.

I'd prefer to look at your simplified test Nextion configuration rather then the whole project, that makes my life easier, rather than wading through pages and pages of stuff that are not relevant to your question.

I will then have a look over the weekend.

It might be the case that you have bumped up against one of the limits of the Nextion and there is nothing you can do about it, other than change your approach to work around it and maybe ask ITEAD to change it in a future release.

I see. :slight_smile:

there is an easy way to understand it. virustotal is a worldwide known online virus / url testing site. test the files or links you send with 71 different antivirus and tell you the result. I recommend.

here you can see the test results of the first link I gave you:

The link I send is a short link service which belongs to wetransfer site which gives free file transfer service which is famous all over the world.

test.zip (test.hmi file inside it):
http://we.tl/t-i65ZMtFqJp

Anyway...

Thanks again for your interest. As you said, ITEAD will have to correct this error in the new version.

Best regards.

I've tried it every way I can think of and I can't find a way that works. I agree it should work, but I am not ITEAD! ITEAD probably think it's just fine the way it is :confused:

I can only suggest asking them for help and accepting that you probably need to find a different solution.

If you do find a way to do it please post the solution here both for my benefit and for anyone else reading this.

you are right.

PerryBebbington:
If you do find a way to do it please post the solution here both for my benefit and for anyone else reading this.

of course.