cancel
Showing results for 
Search instead for 
Did you mean: 

Script Running Too Fast Between Transactions

Former Member
0 Kudos

I am running a VB script that goes between multiple transactions. Memory carries the created object beween the screens. I have to rely on the system to have performed the update or subsequent steps will fail with object not found...

Is there any way to sleep between transactions to allow the data base to update or is there a way to grab the object ID from memory or from the message line.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks

I also found the Sleep command to make the script slows down after the udpate.

Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

It is used as follows

Call Sleep(Int(seconds * 1000#))

Former Member
0 Kudos

If you want to read the message in the system line you can use the command:

session.findById("wnd[0]/sbar/pane[0]").text

You can set this equal to a variable, and then parse the variable accordingly with Left, Mid, etc. commands to extract the order number, document number, etc.

Hope this helps.