Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pause script and wait for user activity in session

Status
Not open for further replies.

TomRhino

Technical User
Aug 7, 2015
2
US
I'm looking for a way in Client Access VBScript macro to pause the script until the user takes actions in the session and progresses to a specific screen, at which point I want the script to continue.

Example: Script starts and populates a create customer screen, and begins to enter an order. Script Pauses, for the user to correct unanticipated details on the order screen and user progress to the Order Summary Screen, Script resumes based on summary screen displayed, and the script completes the order activity.

Any help would be appreciated.
 
If you mean iSeries Client Access Green-Screen-Makros, then you can use for example message-boxes inside of it and wait until a button is pressed, simple something like this
Code:
'show MsgBox
message = "Continue processing ?"
title = "Question"
rc = msgbox (message, vbYesNoCancel+vbQuestion, title)
'#======================================================
title = "Warning:" 
if rc=vbYes then
  message = "Now processing the AS/400 screens continues ..."
  call msgbox (message, vbExclamation, title)
else
  message = "Processing stopped by User"
  call msgbox (message, vbExclamation, title)
end if

For more complex makro examples maybe look at these threads:
 
Yes, I mean iSeries Client Access, but I'm using the vbScript instead of the macros format.

And I understand message boxes, but I want it to be paused while activity in the iSeries session occurs, with the macro continuing once a certain screen is populated by the user, without having to start a new script manually once completed.

a message box, keeps the user from doing anything in the session until the box is closed, at which time the rest of the script is processed, which I don't want to occur.
 
Then I'm not sure whether it's at all possible.
IMO, when the user needs to decide how to populate the screen then it's suitable only for interactive processing and not ready for automation with a script.
In the past I have only created makros which took all data from a CSV file, entered them into the appropriate fields on the screen and then processed them pressing som efunction keys and stepping thru the several other screens - but without user interaction.
The user only started the makro and could look how it works - but without interaction.
 
But you surely could divide the task into 2 makros:
1st makro until the specific screen on which the user needs to populate the data.
2nd makro to continue working from this screen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top