Register to post in forums, or Log in to your existing account
 

 Related 
Contents
Common Properties:
  Name *
  Language *
Non-Visual Objects
  Action
  Collection
  Connection
  DataSource
  Head
  HTTP
  IniFile
  Message
  Query
  Queue
  Registry
  Store
  Stream
  Template
  Thread
    Stop
    Go
    Restart
    Reset
    Wait
    Interval
    Count
    Notify
    OnInit
    OnFree
    OnNotify
  Var
  XML
  XSL
Thread [[zThread]] 
NOTE: This Design document is subject to change at any time.
Thread

Syntax: <THREAD property-list>Script</THREAD>

Allows you to define a background thread that executes a script.

Keep in mind that Microsoft scripting engines can only exist in a single thread. Thus, you cannot access any variables, procedures, or functions that you might have defined in your main script. However, any zApp objects, including <VAR> can be accessed from the other thread, and all of the zApp function libraries are available in the thread.

Be sure to keep your thread code short and fast to avoid slowing down your application.

A thread can contain a script the executes at a given Interval, and you can set the number of times the thread is executed.

Here is an example of a thread the displays a background counter onto the status bar of the application:
Code:
<THREAD name='MainThread' interval='1000' count='5' enabled='true'>
  <SCRIPT event='OnInit'>
    dim a
    a = 0
  </SCRIPT>
  <SCRIPT>
    a = a + 1
    Status.Text = "Thread " &amp; a
  </SCRIPT>
</THREAD>
Viewer Comments [0 - Post your comments]

Jump to:  

© 2009 Zugg Software. Hosted by Wolfpaw.net