Open exe files from nextion

Is there a way to code a nextion display so when it is connected via USB and you tap a button on the screen, it opens a file?

If you want to start some .exe file on the computer when you tap on the Nextion display connected to the computer, then this is possible, but you need to write or take somewhere a program for the computer that will track messages from Nextion and, depending on from these messages, perform the necessary actions on the computer - for example, run the .exe file :slight_smile:

Thank you for the he information, I don’t really know how to do this though. Is there anyone who has did this already?

From the Nextion, send a command over serial to the computer. You’ll need to write a program on the computer to read the command, then execute an open file command. What part don’t you know how to do, send a command from the Nextion or writing a program to run on the computer? What programming languages do you know? What will you do with the file once it is open? In which program will it be open?

  1. Both
  2. Python
  3. Guessing you mean the file I wanted open, use it normally
  4. I’m not sure what you mean

There are lots of sites which tell you how to open a file using Python. Here’s one: Python File I/O: Read and Write Files in Python. And many which tell how to do serial communication: Short introduction — pySerial 3.4 documentation

The Nextion Instruction Set, Instruction Set - Nextion , will tell you how to create a button and send a command over serial.

1 Like

Ok, thank you for your help!