LearningAsIGo
Technical User
I think that GetString is not the best way to get data for math opperations, but i don't know the other way to do it. Thanks in advance.
Code:
'Get Totals from QTRI
MyScreen.Sendkeys("<Home><BackTab>QTRI<Enter>")
MyScreen.WaitHostQuiet(g_HostSettleTime)
MyScreen.MoveTo 3,6
MyScreen.Sendkeys(AccountNum1 + AccountNum2 + AccountNum3)
Qtr$ = InputBox$("Enter Quarter")
MyScreen.MoveTo 4,11
MyScreen.Sendkeys(Qtr)
MyScreen.Sendkeys("<Enter>")
MyScreen.WaitHostQuiet(g_HostSettleTime)
TotalSubject = MyScreen.GetString(14,62,19)
TotalSubject = Trim(TotalSubject)
TotalPit = MyScreen.GetString(18,62,19)
TotalPit = Trim(TotalPit)
TotalPitwhld = MyScreen.GetString(19,62,19)
TotalPitwhld = Trim(TotalPitwhld)
'Switch to BWS
MyScreen.Sendkeys("<Pf24>")
MyScreen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Home>WIEMP<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
MyScreen.Sendkeys(AccountNum1 + AccountNum2 + Qtr)
MyScreen.Sendkeys("<Enter>")
MyScreen.WaitHostQuiet(g_HostSettleTime)
'Get Wages From BWS
BWSTotalSubject = MyScreen.GetString(05,57,22)
BWSTotalSubject = Trim(BWSTotalSubject)
BWSTotalPit = MyScreen.GetString(06,57,22)
BWSTotalPit = Trim(BWSTotalPit)
BWSTotalPitwhld = MyScreen.GetString(07,57,22)
BWSTotalPitwhld = Trim(BWSTotalPitwhld)
'Return To TAS
MyScreen.Sendkeys("<Pf24>")
MyScreen.WaitHostQuiet(g_HostSettleTime)
'Get Differences
DiffTotalSubject = TotalSubject-BWSTotalSubject
DiffTotalPit = TotalPit-BWSTotalPit
DiffTotalPitwhld = TotalPitwhld-BWSTotalPitwhld