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!

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
 

PLLLLLEASE use TT TGML tags and line your data up with the correct number of leading spaces.

This is your row 6...
[tt]
xAMOUNT 49.03 CODE xxxxx CHAR E
[/tt]
is this REALLY where the data is on your emulator?

xAmount in 6, 1, 6, 7

???


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]
 
MyScreen.Area(6,17,6,22,,3)

can you explain where we are going with this?
 


Would you please answer my questions as they are stated, clearly, concisely and completely?

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 the data is at row 6.
col 17 and can be to row 6 col 22 in length
 



My question was...
is this REALLY where the data is on your emulator?

xAmount in 6, 1, 6, 7

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 am referring to the TEXT xAmount

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]
 



Follow me...
[tt]
00000000011
12345678901
xAmount
[/tt]
"the text starts at 06/02 and goes to 06/11"

REALLY???

How can I be sure of ANYTHING that you are telling me when this was such a simple question and it does not jive with reality?

Either the START position is incorrect or the END position is incorrect or BOTH are incorrect!!!

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]
 
text at 06/02 goes to 06/11 number that at some point i hope to get changed is at 06/17 - 06/22


am i not being clear?
 


I am not believing you!

The example that you posted...
[tt]
xAMOUNT 49.03 CODE xxxxx CHAR E

[/tt]
does not have visible text from 6, 2 to 6, 11. It could be from 6, 2 60 6, 8!!!

So why should I believe that your number is from 6, 17 to 6, 22, or that it is updateable, for that matter? You have lost credibility with me.

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]
 
lol what a mess

it is there because i told you it was? (it is a simple thing)
the emulator shows where it is.
you have all the code i have.
if you dont know how to do this it is fine.
 



Here's what it seems to me. Your Area is REALLY
[tt]
6, 10, 6, 18
[/tt]
That's what I deduce from your posts.

Please try these coordinates and 6, 10 for the PutString.

Then report back the results.

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]
 
same outcome, msgbox pops up which indicates math is not working or at least the if statement saying if > 85

and nothing is changed if i view the clipboard it has the number on it unchanged

also indicates the math is not working

and trust me the location is right i have written many macro's using copy and paste and put and get

just not MATH
 



Well I get this to work on my timecard screen. I can change 8.0 hours to 5.0 by subtracting 3 and doing a PutString back.

So your are definitely missing something!!!

Your positions 6, 2, 6, 11 do not add up. Thats TEN positions, while xAmount is SEVEN?????

So THAT is why I doubt that you know what you are doing!!!

You have been inconsistent.

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]
 
your missunderstanding what i am saying

the text location 06/2 - 06/11 is illrelivent it doesnt change.

the number that needs changed is at the location i have givin and the location is in the code

if you have it working can i see what code you are using they must be different in some way.
 


If I can't believe #1 that you assert, then I seriously doubt #2.

My line of questions was designed to check the veracity of your statements.

I got my answer.

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]
 
hi cheetahz,

i don't follow your logic...
are you saying the numeric values begin on Row 6,column 2 through Row 6,column 11?

and if the amount is greater than $85, then subtract $75, and place that sum on row 6, column 17 through 22?

somehow that doesn't compute correctly

6,2,6,11 has 9 characters
6,17,6,22 has 6 characters

does the literal xAMOUNT actually appear on your emulator at 6,2,6,11 ?

i'm trying to learn and follow this logic

zach
 
right, so can i see your code to see what you have differnt
if you have it working
 
I ALL has to do with grabbing the correct Area

Code:
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
        Dim DiffMyArea
      
    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[b]
        Set MyArea = MyScreen.Area(10, 47, 10, 49, , 3)[/b]
        
        

        If IsNumeric(MyArea) Then
            DiffMyArea = CLng(MyArea) - CLng(5#)
        End If

'       If DiffMyArea < 85# Then
'        MsgBox "sometext"
'  End If
'    MyScreen.Area(10, 47, 10, 49, , 3) = CStr(DiffMyArea)
[b]    MyScreen.PutString DiffMyArea, 10, 47[/b]



'    System.TimeoutValue = OldSystemTimeout
End Sub

BEFORE

[tt]
BILU2610 BIWEEKLY INDIRECT LABOR UPDATE 02/12/09 11:57:41
AUTH
CLOCK EMPLOYEE NAME DATE SCROLL? APPROVALS EWW
36250 XX XXXXXXX 021309 N SUPV: HRS
SHIFT: 1 WS: 508 DEPT: 2W REPORTS TO: EWW : 00
DLN/ COM EMPL:
TC SUNDRY BUS WO TITLE SAT SUN MON TUE WED THU FRI PAID HOURS
ASSIGNED WORKWEEK 00 00 08 08 08 08 08
OVERRIDE WORKWEEK CLK
66A 8.0 8.0 8.0 8.0 8.0







STRAIGHT TIME 8.0 8.0 8.0 8.0 8.0 40.0
EWW
UNCOMP

END OF DATA FOR EMPLOYEE
PFKEY 1:BIEX 2:WILU 11:BWIN 12:CODES 13:LOGOFF
NEXT PF24
[/tt]
AFTER

[tt]
BILU2610 BIWEEKLY INDIRECT LABOR UPDATE 02/12/09 11:57:41
AUTH
CLOCK EMPLOYEE NAME DATE SCROLL? APPROVALS EWW
36250 XX XXXXXXX 021309 N SUPV: HRS
SHIFT: 1 WS: 508 DEPT: 2W REPORTS TO: EWW : 00
DLN/ COM EMPL:
TC SUNDRY BUS WO TITLE SAT SUN MON TUE WED THU FRI PAID HOURS
ASSIGNED WORKWEEK 00 00 08 08 08 08 08
OVERRIDE WORKWEEK CLK
66A 3.0 8.0 8.0 8.0 8.0







STRAIGHT TIME 8.0 8.0 8.0 8.0 8.0 40.0
EWW
UNCOMP

END OF DATA FOR EMPLOYEE
PFKEY 1:BIEX 2:WILU 11:BWIN 12:CODES 13:LOGOFF
NEXT PF24

[/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]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top