该帮助的版本不再更新,请参见https://www.jmp.com/support/help/zh-cn/15.2 获取最新的版本.


A Schedule() function lets you set up a script to be executed some number of seconds later.
Schedule( 15, Print( "hello" ) );
图 8.6 JMP Scheduler
Show( "Hi there" );
Schedule( 15, quickieScript );
Schedule() initiates an event queue, but once it has the event queued, JMP proceeds with the next statement in the script. For example, the following has results that might surprise you:
Schedule( 3, Print( "one" ) );
Print( "two" );
If you want the script to wait until the scheduled events are finished before proceeding, one solution would be to use Wait( ) with a suitable pause. Another is to embed the subsequent actions into the schedule queue. Schedule() accepts a series of arguments to queue many events in sequence. Each event is a separate call to the schedule. Each event time is an absolute time relative to “now” (or the instant that Go is clicked). Therefore, the following sequence finishes in five seconds, not in twelve:
Schedule( 3, Print( "hello" ) );
Schedule( 4, Print( ", world" ) );
Schedule( 5, Print( "--bye" ) );
Note: It is not possible to create multiple threads using Schedule.
sc=Schedule(n, script)
Queues an event to run the script after n seconds.
sc<<Clear Schedule()