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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hanging Screen Scrap

Status
Not open for further replies.

VAPharmR

Technical User
Aug 16, 2013
7
US
I’m new to the posting if the form communities and hesitant to insult the talent I have seen posted here and interested in learning to help others in the process.

Attachmate Reflection Suite for X 14.0.6029
Reflection for UNIX and OpenVMS
Version 14.0.6 build 687 32-bit

Have Date range calculator within Reflections- with following result.
30 Day As follows: [11/04-12/3/2014 Inclusive]

Objective- Calculate Narcotic Date Range within Reflections – Using String variable from screen.

Refills and Number of Refiilsfrom from the screen
Dim numRefills As String
Dim daySupply As String

CurDat ‘Current Date by Default or users own.
numRefills ’ Number of Refills Defaults to 30 Day; for Class II Narcotics or User Defined.
daySupply ‘ Default to 30 ‘for Class II Narcotics or User Defined.

This side of having a dynamic screen scrapping table this is my attempt to find my answer.

Code is looking for:
of Refills:

[code='************************* Number of Refills **********************************************
' .WaitForString "Select Action" 'so that the boxes don't appear before the screen is showing
.Wait "00:00:01"
.StatusBar = "searching list for Number of Refills" ' searches the list for rosuvastatin
.Transmit "SL" & CR 'search list
.Transmit "of Refills: " & CR
Select Case .Parent.Application.WaitForStrings(arraySrchNumRefill)
Case (1)
.Transmit "+" & CR 'b/c says press return to continue
Case (2)
.Transmit "N" & CR 'says no to continuing search
‘>>> Code Hangs

‘>>> 'PROBLEM HERE DOES NOT 'Transmit N - "Screen continues to display

‘>>> ‘ON SCREEN LEFT RESPONSE LEFT AS FOLLOWS
‘Find Next ‘of Refills: ‘ ? Yes//
End Select

'********* Screenscraping for Number of Refills *********
.Wait "00:00:01"
Found = .FindText("of Refills: ", 0, 0)
‘>>> jumps to this line
snumRefills = Session.GetText(5, 22, 5, 23) 'x,y Cordinates for txt A ext
MsgBox snumRefills 'Verify txt numRefills is valid
If Not Found Then '# of Refills

MsgBox "Number of Refills Not Found, exiting macro."
Exit Sub

Else 'found # of Refills

MsgBox numRefills 'Verify txt valid and will now convert to integer
numRefills = snumRefills * 1

End If

‘++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++][/code]

Code is hanging on the on code above >>>>>
Any Suggestions
 
????

What code?

BTW this question would be better addressed in one of the Attachmate forums like forum99.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top