[en] Add delays in VBscript or Python coding

Die offizielle Übersetzung liegt noch nicht vor.

[en] Problem

[en] You want a short delay between executing actions or scripts in Automation or Designer PowerForms, but there is no direct command to execute the delay in VBscript or Python.

[en] Solution

[en] Use the following code:

  • [en] In VBscript:

    Dim dteWait 
    dteWait = DateAdd("s", 5.0, Now()) ' change the middle value for different number of seconds 
    Do Until (Now() > dteWait) 
  • [en] In Python:

    import time 
    time.sleep(5) # delay = 5 seconds