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

Math question 1

Status
Not open for further replies.

cheetahz

Technical User
Dec 4, 2008
101
US
Is it possible to take some numbers from attachmate screen and do math with them?



I will pase them back to a different location
 

MyScreen.Area(6,17,6,22,,3) = DiffMyArea
this is creating a argument type missmatch error

and the msgbox pops up saying the amount is under 85.00 even if it is not?
 



Is that an area that you can manually change on the screen?

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
yes, that is what you normally have to do, that is one of the reasons for the macro
 
it seems the equation is not working either because the msgbox pops up no matter the amount
 



In debug, observe what value is in DiffMyArea, and other significant values in your code.

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
it seems to all be nothing, i am confused on the watch
 
1. Please post your code.

2. please copy 'n' paste the text on your emulator here.

please use the TT TGML tag to post your emulator example.


Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
this is all the code and it seems varible watch is empty
but i am new at this i may be doing it incorrectly


Code:
' Global variable declarations
Global g_HostSettleTime%
Global g_szPassword$

Sub Main()
'--------------------------------------------------------------------------------
' Get the main system object
	Dim Sessions As Object
	Dim System As Object
        Dim amount As Object
        Dim total As Object
        Dim myStr As Object, Sys As Object
        Dim MyScreen As Object
        Dim MyArea As Object
      
	Set System = CreateObject("EXTRA.System")	' Gets the system object
	If (System is Nothing) Then
		Msgbox "Could not create the EXTRA System object.  Stopping macro playback."
		STOP
	End If
	Set Sessions = System.Sessions

	If (Sessions is Nothing) Then
		Msgbox "Could not create the Sessions collection object.  Stopping macro playback."
		STOP
	End If
'--------------------------------------------------------------------------------
' Set the default wait timeout value
	g_HostSettleTime = 3000		' milliseconds

	OldSystemTimeout& = System.TimeoutValue
	If (g_HostSettleTime > OldSystemTimeout) Then
		System.TimeoutValue = g_HostSettleTime
	End If

' Get the necessary Session Object
	Dim Sess0 As Object
	Set Sess0 = System.ActiveSession
	If (Sess0 is Nothing) Then
		Msgbox "Could not create the Session object.  Stopping macro playback."
		STOP
	End If
	If Not Sess0.Visible Then Sess0.Visible = TRUE
	Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
	
' This section of code contains the recorded events
	Sess0.Screen.Sendkeys("c96<Enter>")	
	Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
	Sess0.Screen.Sendkeys("u<Enter>")	
	Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
	Sess0.Screen.Sendkeys("10<Tab>p<Tab>")
        Sess0.Screen.Sendkeys("sometext")
        Set MyScreen = Sess0.Screen
        Set MyArea = MyScreen.Area(6,17,6,22,,3)
        MyArea.Select
	MyArea.Copy
        

        if isnumeric(MyArea)  then
   DiffMyArea = clng(MyArea)-clng(75.00)
end if

       If DiffMyArea  < 85.00   Then
        Msgbox "sometext"
  End If
    MyScreen.Area(6,17,6,22,,3) = DiffMyArea 



	System.TimeoutValue = OldSystemTimeout
End Sub
 



well that's HALF of my request.

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
i dont know what you mean by paste the text from my emulator?
 


Instead of the Area object, try ...
Code:
    MyScreen.PutString DiffMyArea, 6, 17

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
it dont give the error anymore but the msgbox still comes up saying the number is below 85 and the number on the screen dont change.
 



I am still waiting for the other half of my request to be posted.

Do you want my help of not?

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
what is the other half?
and as i said if it is paste emulator text i dont have a clue what you mean or how to get it if it is not the code you are wanting
 

1. COPY all the text in the emulator.

2. PASTE here, inside TT TGML tags.

It's plain vanilla!

You might have to add a few spaces at the beginnin of rows, in order to get things to line up.

For instance, here's a copy from my terminal...
[tt]
Actions Options Commands Features Help

KLSVSEL1 CL/SUPERSESSION Main Menu More:

Select sessions with a "S" or a list of options with a "/" .

Session ID Description Type Status
---------- -------------------------------- -------- ------------
TSO TSO B390 Multi
IMS IMS PRODUCTION Multi
IMS-PROD DIAL IMS PRODUCTION SYSTEM Multi
XPTR REPORT DISTRIBUTION SYS Multi
SYSTIMS USER TEST IMS FT WORTH Multi








ACF01137 II36250 LAST SYSTEM ACCESS 09.13-02/12/09 FROM XXB01472
Command ===> B390/IPB00466
Enter F1=Help F3=Exit F5=Refresh F9=Retrieve F10=Action
[/tt]

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 



I give up!!!!

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
i have sensitive data on my screen and i cant post it on a message board?

simple i thought, take a number and subtract 75.00 from it and put it back

maybe someone else might help us out here.
 


" have sensitive data on my screen and i cant post it on a message board?"

So you substitute x's or 9's depending on the type of data!!!

This is not rocket science.

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
amount is the number being changed i mean needing

02/12/09 xx - xxxxxxxxxxxxxxxxxxxx CMMV140M
xxxxxxxxxx STATUS: xxxx
xxxxxxx xxxxxxxxx

xxxxxxxxxxx xxxxxxxxxxxxxx1 PROC CODE 000000 REIM ATTR x
xAMOUNT 49.03 CODE xxxxx CHAR E
xAMOUNT 49.03 DATE FLAG _ WORK xx
DATE 02 / 06 / 09 MO/PO IND _ REQ PAY SR A
TIME 23 : 09 : 32 RIS IND _ TYPE 0
ACQ INST ID xxxxxx SYS TRACE xxxxxx ENTRY x
xxxxxxxx xxxxxx3 ACQ BUS ID xxxxxxx ADDTL DATA _
xxxxxxxxxx xxxxxxxx xxxxxxx
CODE xxx xxxx xxx
NAME STREET xxx IND _ VOL __
VER VAL __________ ZIP xxxxx xxxxxxx 0

REASON CODE xx xxxx _ xxx _
REF NUM ______ xxxxxx _ FORCE ADD N
MESSAGE TEXT __________________________________________________

ACTION: _ (M=MAIN, P=PREV, N=NEXT ACCT, U=UPDATE, V=VTJ, X=EXIT)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top