Results 1 to 5 of 5

Thread: Wait function

Share/Bookmark
  1. #1
    Member
    Join Date
    Jul 2010
    Location
    Phoenix, Arizona, usa
    Age
    67
    Posts
    54
    Rep Power
    13

    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
    50
    Posts
    8,106
    Blog Entries
    2
    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/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

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

    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
    50
    Posts
    8,106
    Blog Entries
    2
    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/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

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

    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

Posting Permissions

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