Results 1 to 5 of 5

Thread: Wait function

  1. #1
    Member
    Join Date
    Jul 2010
    Location
    Phoenix, Arizona, usa
    Age
    74
    Posts
    54
    Rep Power
    19

    Wait function

    Is the keyword Wait reserved for any function or anything in thinbasic?

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Wait function

    No it is not a reseved key.
    You can use for your own variables and/or functions
    [code=thinbasic]
    Uses "console"

    Dim wait As Long
    wait = 123
    PrintL wait
    WaitKey
    [/code]

    thinBasic uses SLEEP in order to put your script in sleep for a period. In any case it is not suggested to use sleep because script execution stops for the number of milliseconds indicated.

    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #3
    Member
    Join Date
    Jul 2010
    Location
    Phoenix, Arizona, usa
    Age
    74
    Posts
    54
    Rep Power
    19

    Re: Wait function

    Thanks. As it turns out, for external instrument control, putting the script in sleep for a finite number of millisec is actually desirable. One of the few applications where it is wanted. Anyway in my system I have another background process running that works with the front end script in parallel. The whole system is actually pretty cool in it's flexibility and robustness - since the background process can save control settings and variable values that are needed when a series of front end scripts run in sequence or even in parallel if it's set up properly. Later I may prepare a short overview on how the whole system works. I have found it very valuable. Not just for instrument control put also for embedding flexibility between scripts and background processes for other purposes.

  4. #4
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Wait function

    Great. Having more info will let us better undestand and see if you need more by thinBasic.

    Regarding process, check OS module, it has some commands that can help in handling process.
    Also \SampleScripts\OS\Process.tbasic example can help to have an idea on available commands working on process.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  5. #5
    Member
    Join Date
    Jul 2010
    Location
    Phoenix, Arizona, usa
    Age
    74
    Posts
    54
    Rep Power
    19

    Re: Wait function

    Thanks. I noticed those process related commands and it's one of the reasons I picked thin basic. I will be using the process and timing commands heavily.

    - mike

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •