Hello all,
Can someone help with this I am trying to prompt user to enter to number example 901- 910 and then print screen area to file enter next number (2. 46) and print again.
Here is the code so far.
Thanks for any help.
-------------------------------------
'Declare our global variables for Aircraft
Global g_StartAC as String
Global g_StopAC as String
Global g_bSuccess as Integer
'Declare the Dialog Box function
Declare Function AircraftDialog()
' Define constants
Const TRUE = -1
Const FALSE = 0
Function findAC()
Dim StartAC As Double
Dim StopAC As Double
StartAC = InputBox("Enter Start A/C", "Enter a Number")
StopAC = InputBox("Enter Stop A/C", "Enter a Number")
End Function
Sub main
' Get the necessary Session Object
Dim System As Object, Sess As Object, MyScreen As Object
Set System = CreateObject("EXTRA.System")
Set Sess = System.ActiveSession
Set MyScreen = Sess.Screen
Do
Sess.Screen.MoveTo 2, 46
Sess.Screen.SendKeys g_StartAC + "<Enter>"
MyFile = "C:\print.txt"
Open MyFile For Append As #1
For i = 6 To 18
MyArea = MyScreen.GetString(i, 1, 80)
Print #1, MyArea
Close #1
Do: Loop Until StartAC = StopAC
MsgBox "Your done"
End sub
Can someone help with this I am trying to prompt user to enter to number example 901- 910 and then print screen area to file enter next number (2. 46) and print again.
Here is the code so far.
Thanks for any help.
-------------------------------------
'Declare our global variables for Aircraft
Global g_StartAC as String
Global g_StopAC as String
Global g_bSuccess as Integer
'Declare the Dialog Box function
Declare Function AircraftDialog()
' Define constants
Const TRUE = -1
Const FALSE = 0
Function findAC()
Dim StartAC As Double
Dim StopAC As Double
StartAC = InputBox("Enter Start A/C", "Enter a Number")
StopAC = InputBox("Enter Stop A/C", "Enter a Number")
End Function
Sub main
' Get the necessary Session Object
Dim System As Object, Sess As Object, MyScreen As Object
Set System = CreateObject("EXTRA.System")
Set Sess = System.ActiveSession
Set MyScreen = Sess.Screen
Do
Sess.Screen.MoveTo 2, 46
Sess.Screen.SendKeys g_StartAC + "<Enter>"
MyFile = "C:\print.txt"
Open MyFile For Append As #1
For i = 6 To 18
MyArea = MyScreen.GetString(i, 1, 80)
Print #1, MyArea
Close #1
Do: Loop Until StartAC = StopAC
MsgBox "Your done"
End sub