Announcement

Collapse
No announcement yet.

Need Wait or Pause (command or function)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need Wait or Pause (command or function)

    Hello Friend
    I need the command Wait or Pause
    Action Application.Sleep(Ms); Cause the all program to crash
    For example :

    Code:
    SerialPort.Output(":7F10011200020400C8000090", "true");
    Wait (1000) ;
       if (SerialPort.BufferCount()==0) then
        --do nothing
       else
        serialget=SerialPort.Input();
       end
    I should be no interruption in the software. Why can not command Application.Sleep I use
    In all programming language, there is a wait command
    I'm surprised, because it without such the ability to

  • #2
    There is no sleep or pause in Lua because there is no sleep in ANSI C so you have to do something and that something on a single thread is going to make the app non responsive so the bundled Application.Sleep() function is about as good as it gets really but there is a few suggestions here along with here and also there is the WinApi Lua module that does have a sleep function but having tried that its only good for a second or two.

    Comment


    • #3
      It seems the Application.Sleep() function although it says it does not respond to mouse clicks does not stop them being sent/recieved and its the clicking of the window that causes a crash when sleeping so try this before going to sleep.

      Comment


      • #4
        This is probably better.

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎