SAP-Forum.ORG
   
This web site isn't affiliated with, sponsored by, or approved by SAP AG. Is only a SAP users community.

Go Back   SAP-Forum.ORG > SAP Forums > SAPScript - Smartforms

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sap gui 7.20 macropus SAP Manuals 0 12-16-2010 03:42 AM
Cannot refresh test box Pepa SAP BASIS 2 07-20-2010 11:44 PM
How to find information for SAP GUI Pepa SAP BASIS 2 06-21-2010 05:29 PM
SAP Gui hangs Golfi SAP BASIS 4 06-06-2010 03:59 PM
Can't refresh test box Micro SAP BASIS 2 05-09-2010 04:46 PM

Aprenda SAP!
Reply
 
Thread Tools Display Modes
  #1  
Old 08-26-2011, 12:57 AM
ERP ERP is offline
Senior Member
 
Join Date: May 2010
Location: Rhode Island
Posts: 231
Default Dialog box, vbApplicationModal, VBScript GUI SAP R / 3

Dear experts, I have a question if it is possible to solve?

I need the script to recognize that there is a dialog box and perform the actions at the time: if, see below:

If IsObject(vbApplicationModal) Then
session.findById("wnd[1]/tbar[0]/btn[0]").press
session.findById("wnd[0]/usr/cntlTREE_CONTAINER_0200/shellcont/shell").pressToolbarButton "SAVE"
session.findById("wnd[1]/usr/btn[0]").press
Else
session.findById("wnd[0]/usr/cntlTREE_CONTAINER_0200/shellcont/shell").pressToolbarButton "SAVE"
session.findById("wnd[1]/usr/btn[0]").press
End If

I tried the following types, but without success:

If DialogBox = vbApplicationModal Then
If vbApplicationModal Then
If vbApplicationModal = show Then
If vbApplicationModal = appear Then
If dlgAnswer = vbApplicationModal Then
If dlgAnswer Then
If dlgAnswer = DialogBox Then
If 0 Then
If 1 Then
If DialogBox Then
If showMessageBox Then
If box Then

I await your help. Thank you very much.

ERP
Reply With Quote
Sponsors
  #2  
Old 08-26-2011, 01:00 AM
Lala Lala is offline
Senior Member
 
Join Date: May 2010
Location: Chicago
Posts: 394
Default Re: Dialog box, vbApplicationModal, VBScript GUI SAP R / 3

Hi ERP,

That is possible:
Code:
if session.findbyid("wnd[1]").text = "Information / Error" Then ' <- here goes the text of the Dialogbox !
      session.findbyid("wnd[1]").sendvKey 0
      session.findById("wnd[0]/usr/cntlTREE_CONTAINER_0200/shellcont/shell").pressToolbarButton "SAVE"
      session.findById("wnd[1]/usr/btn[0]").press
else
      session.findById("wnd[0]/usr/cntlTREE_CONTAINER_0200/shellcont/shell").pressToolbarButton "SAVE"
      session.findById("wnd[1]/usr/btn[0]").press
end if
In other words, you only can check if there is a Dialogbox (weither it's modal or unmodal). But you can check for it's caption.
Perhaps you have to check for an Error on runtime via on error resume next
and then to close the Dialog...

Regards,
Lala
Reply With Quote
  #3  
Old 08-26-2011, 01:04 AM
ERP ERP is offline
Senior Member
 
Join Date: May 2010
Location: Rhode Island
Posts: 231
Default Re: Dialog box, vbApplicationModal, VBScript GUI SAP R / 3

Thanks Lala! I'll test the code on the system and keep you informed.

Regards,
ERP
Reply With Quote
Entre a los Links relacionados
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 10:13 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Forum Design By inferno