![]() |
|
|||||||
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sap gui 7.20 | macropus | SAP Manuals | 0 | 12-16-2010 03:42 AM |
| Windows SAP Gui 7.20 - configure logon pad | Zumba | SAP BASIS | 1 | 08-20-2010 02:02 PM |
| Sniffing SAP GUI Passwords? | Rima | SAP BASIS | 2 | 07-08-2010 05:37 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 |
| Aprenda SAP! |
|
|
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hello Gurus,
I'm trying to automate certain changes in RZ20 configuration. The idea is to parse the monitoring tree area (a GuiUserArea consiting of an array of labels and two scrollbars) and perform a series of actions wen some text is found. The problem is that we have to scroll to access the whole area and I do not know any references to stop the scrolling. GuiScrollbar Object refers only to the movible part of the scrollbar: Maximum refers to the limit of the mobile part and PageSize refers to the amount of lines scrolled. I would need some property such as "MaxPosition" but, according to the API documentation, there is no such property: Code:
For $i = 0 To $session.findById("wnd[0]/usr" ).VerticalScrollbar.MaxPosition Step $step_v
For $j = 0 To $session.findById("wnd[0]/usr" ).HorizontalScrollbar.MaxPosition Step $step_h
$session.findById("wnd[0]/usr" ).VerticalScrollbar.Position = $i
$session.findById("wnd[0]/usr" ).HorizontalScrollbar.Position = $j
For $k = 0 To $session.findById("wnd[0]/usr" ).Children.Count - 1
If StringInStr($session.findById("wnd[0]/usr" ).Children.ElementAt($k).Text, $search, 1) > 0 Then
$session.findById($session.findById("wnd[0]/usr" ).Children.ElementAt($k).Id).SetFocus
_Processing()
$session.findById("wnd[0]/tbar[1]/btn[5]" ).press
EndIf
Next
Next
Next
Has anyone faced this issue? My SAPGUI version is 7200.3.7.1066 (7.20 SP7) and the SAP system is a Solution Manager 7.0 Thanks in advance. Best regards, SAPMM |
| Sponsors |
|
#2
|
|||
|
|||
|
Hi SAPMM,
Sorry I cannot offer a simple idea with this but if I read your note right you are looking to know when you have reached the maximum position of the scrollbar. If there were not a simple property as you have explored then these are the 2 approaches I would take. 1) replace the For loops with do loops Increment the scrollbars and perform your checks use a try catch clause or on error goto to catch when the scroll has been exceded Perform a check to see if the solution has finished if not reset and move on. 2) uses the same approach but performs it upfront recording the position integer until it reaches the end Then use these integers to control your For loops. Hope this gives you some avenues to explore. Regards, Portal |
|
#3
|
|||
|
|||
|
Hi Portal,
Thank you. Although your approach cannot be used because the setting of the scrollbar positiion beyond its limits does not trigger any exception, it does set the position in the limit, so the code will be: Code:
$session.findById("wnd[0]/usr" ).VerticalScrollbar.Position=10000 ; value beyond scrollbar position limit
$v_limit=$session.findById("wnd[0]/usr" ).VerticalScrollbar.Position
$session.findById("wnd[0]/usr" ).HorizontalScrollbar.Position=10000 ; value beyond scrollbar position limit
$h_limit=$session.findById("wnd[0]/usr" ).HorizontalScrollbar.Position
For $i = 0 To $v_limit Step $step_v
For $j = 0 To $h_limit Step $step_h
$session.findById("wnd[0]/usr" ).VerticalScrollbar.Position = $i
$session.findById("wnd[0]/usr" ).HorizontalScrollbar.Position = $j
For $k = 0 To $session.findById("wnd[0]/usr" ).Children.Count - 1
If StringInStr($session.findById("wnd[0]/usr" ).Children.ElementAt($k).Text, $busqueda, 1) > 0 Then
$session.findById($session.findById("wnd[0]/usr" ).Children.ElementAt($k).Id).SetFocus
_Process()
$session.findById("wnd[0]/tbar[1]/btn[5]" ).press
EndIf
Next
Next
Next
Code:
Dim $v_stops = StringSplit("0,41,82", ",")
Dim $h_stops = StringSplit("0,35", ",")
For $i = 1 To $v_stops[0]
For $j = 1 To $h_stops[0]
$session.findById("wnd[0]/usr" ).VerticalScrollbar.Position = $v_stops[$i]
$session.findById("wnd[0]/usr" ).HorizontalScrollbar.Position = $h_stops[$j]
For $k = 0 To $session.findById("wnd[0]/usr" ).Children.Count - 1
If StringInStr($session.findById("wnd[0]/usr" ).Children.ElementAt($k).Text, $busqueda, 1) > 0 Then
$session.findById($session.findById("wnd[0]/usr" ).Children.ElementAt($k).Id).SetFocus
_Process()
$session.findById("wnd[0]/tbar[1]/btn[5]" ).press
EndIf
Next
Next
Next
SAPMM |
| Entre a los Links relacionados |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|