May 6, 20188 yr Hello, This seems to be a quite odd question but I can' get anything to display in a Lua window. My lua file contains only one line ipc.display("This is my text") but it doesn't display anything. I tried this ipc.display("") ipc.display("This is my text") ipc.sleep(5000) It works, The window stays 5 seconds. But this doesn't work ipc.display("") ipc.display("This is my text", 5) Who can help me to figure this out? Stefan
May 6, 20188 yr Hello, this is more a general question for the FSUIPC Forum, not especially LINDA I think? However, how do you execute this script? Is it part of a LINDA module and therefore inside a function? As you can let show the display for 5 seconds using the ipc.sleep, I assume you have somewhere in your code in an other part also an ipc.display("") which closes your window immediately. Guenter Steiner -------------------------------------------------------------------------------------- Betatester for: A2A, LORBY, FSR-Pillow Tester --------------------------------------------------------------------------------------
May 6, 20188 yr Author I was just working in a Linda Editor window to learn how to manage scripts. The line is in a lua file triggered by an entry in the user.lua file of the plane I was working on. 6 minutes ago, guenseli said: As you can let show the display for 5 seconds using the ipc.sleep, I assume you have somewhere in your code in an other part also an ipc.display("") which closes your window immediately My understanding of the syntax is: ipc.display("string", delay) where I can set the delay for the time the message would be displayed. This doesn't work. It doesn't work either without the preceding ipc.display("") line
May 6, 20188 yr Difficult ... But if you use it in LINDA then you have to use it inside a function, e.g. function test () ipc.display("test") end and then execute this function. As you say, ipc.display is just working, when you add ipc.sleep(5000), then my assumption is, that in the whoöe wide LINDA code something is terminating you display immediately. With ipc.sleep, you pause the whole code for 5 seconds. I think, inside a function it should work then ... Edited May 6, 20188 yr by guenseli Guenter Steiner -------------------------------------------------------------------------------------- Betatester for: A2A, LORBY, FSR-Pillow Tester --------------------------------------------------------------------------------------
May 6, 20188 yr Author Yes. The function is MyTrials in the user.lua file of my plane. It says: runlua('MyTrials'). MyTrials.lua is a file in my modules folder. Ok, I got it! My way is a too complicated way. It is far more convenient to write directly in the user.lua file. I created a function 'MyTrials', assigned it to a button, and now the line ipc.display("I got it!", 5) is displayed as wanted. Thanks for the hint, Stefan
May 7, 20188 yr 7 hours ago, stefwei said: MyTrials.lua is a file in my modules folder. Ok, I got it! My way is a too complicated way. It is far more convenient to write directly in the user.lua file. Ah, ok, now I understand. ok, that was much too complicated … glad you sorted it now. Guenter Steiner -------------------------------------------------------------------------------------- Betatester for: A2A, LORBY, FSR-Pillow Tester --------------------------------------------------------------------------------------
Archived
This topic is now archived and is closed to further replies.