Pause en VBS

Solved
quent -  
 quent -
Hello,
I would like in a program a VBS to wait for a certain time during which the program does not use 100% CPU. Basically, I am looking for an equivalent of application.ontime in VBA under Excel but in VBS.

Thank you in advance.

2 answers

  1. cs_Le Pivert Posted messages 8437 Status Contributor 731
     
    Hello,

    Like this

    MsgBox "test" Pause(10) 'To sleep for 10 seconds MsgBox "test" Sub Pause(NSeconds) Wscript.Sleep(NSeconds*1000) End Sub


    --
    @+ The Woodpecker
    2
    1. quent
       
      It works perfectly!
      Thank you very much!
      1
  2. f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717
     
    Hello,

    see with the Windows Task Scheduler
    0