checkbox has 18 options it looks fine but runs the code checked or un-checked i need some kind of if then else statement but i an a newbie and cant figure it out?
this is not visual basic i am sure you know but this is EXTRA basic marco editor from a mainframe
but since the coding is simular and i cant seem to find help i came here?
i hope you can help me out here, thanks
' Global variable declarations
Global g_HostSettleTime%
Global g_szPassword$
Sub Main()
'--------------------------------------------------------------------------------
' Get the main system object
Dim Sessions As Object
Dim System 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 = 400 ' milliseconds
OldSystemTimeout& = System.TimeoutValue
If (g_HostSettleTime > OldSystemTimeout) Then
System.TimeoutValue = g_HostSettleTime
End If
'Dim CheckBox1() as Integer
'ReDim CheckBox1(0)
'Dim CheckBox2() as Integer
'ReDim CheckBox2(0)
'Dim CheckBox3() as Integer
'ReDim CheckBox3(0)
'Dim CheckBox4() as Integer
'ReDim CheckBox4(0)
'Dim CheckBox5() as Integer
'ReDim CheckBox5(0)
'Dim CheckBox6() as Integer
'ReDim CheckBox6(0)
'Dim CheckBox7() as Integer
'ReDim CheckBox7(0)
'Dim CheckBox8() as Integer
'ReDim CheckBox8(0)
'Dim CheckBox9() as Integer
'ReDim CheckBox9(0)
'Dim CheckBox10() as Integer
'ReDim CheckBox10(0)
'Dim CheckBox11() as Integer
'ReDim CheckBox11(0)
'Dim CheckBox12() as Integer
'ReDim CheckBox12(0)
'Dim CheckBox13() as Integer
'ReDim CheckBox13(0)
'Dim CheckBox14() as Integer
'ReDim CheckBox14(0)
'Dim CheckBox15() as Integer
'ReDim CheckBox15(0)
'Dim CheckBox16() as Integer
'ReDim CheckBox16(0)
'Dim CheckBox17() as Integer
'ReDim CheckBox17(0)
'Dim CheckBox18() as Integer
'ReDim CheckBox18(0)
Begin Dialog cbdlg 228, 150, 221, 287, "Mastercard Chargebacks and fraud reporting"
ButtonGroup .bg
OkButton 141, 67, 50, 14
CancelButton 141, 109, 50, 14
CheckBox 0, 0, 40, 10, "LINE1", .CheckBox1
CheckBox 0, 14, 40, 10, "LINE2", .CheckBox2
CheckBox 0, 30, 40, 10, "LINE3", .CheckBox3
CheckBox 0, 47, 40, 10, "LINE4", .CheckBox4
CheckBox 0, 61, 40, 10, "LINE5", .CheckBox5
CheckBox 0, 78, 40, 10, "LINE6", .CheckBox6
CheckBox 0, 95, 40, 10, "LINE7", .CheckBox7
CheckBox 0, 113, 40, 10, "LINE8", .CheckBox8
CheckBox 0, 132, 40, 10, "LINE9", .CheckBox9
CheckBox 0, 150, 40, 10, "LINE10", .CheckBox10
CheckBox 0, 166, 40, 10, "LINE11", .CheckBox11
CheckBox 0, 181, 40, 10, "LINE12", .CheckBox12
CheckBox 0, 196, 40, 10, "LINE13", .CheckBox13
CheckBox 0, 211, 40, 10, "LINE14", .CheckBox14
CheckBox 0, 227, 40, 10, "LINE15", .CheckBox15
CheckBox 0, 241, 40, 10, "LINE16", .CheckBox16
CheckBox 0, 257, 40, 10, "LINE17", .CheckBox17
CheckBox 0, 269, 40, 10, "LINE18", .CheckBox18
Text 48, 6, 143, 8, "Please check the checkboxes"
Text 48, 16, 153, 8, "to the left to report fraud and do the "
Text 48, 27, 152, 9, "Chargeback for the selected row or rows. "
End Dialog
Dim mydialog as cbdlg
On Error Resume Next
Dialog mydialog
If Err=102 then
MsgBox "Chargebacks canceled."
End If
'DlgEnable "CheckBox1",1
' Set the default wait timeout value
g_HostSettleTime = 400 ' 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
If DlgValue("CheckBox1")=1 then
' This section of code contains the recorded events
Sess0.Screen.Sendkeys("<Home>CCM 01 4837 999<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Tab><Tab><Tab><Tab>DS<Tab><Tab><Tab>02<Tab><Tab><Tab><Tab><Tab>UNAUTH TRANS<Tab>02100<Enter>")
Sess0.Screen.Sendkeys("<Clear>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
'Sess0.Screen.Sendkeys("CDS<Enter>")
'Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
'This section of code contains the recorded events
Sess0.Screen.Sendkeys("<Home>CSD4 01<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab>01<Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab>1<Enter>")
Sess0.Screen.Sendkeys("<Clear>")
'Sess0.Screen.Sendkeys("cds<Enter>")
System.TimeoutValue = OldSystemTimeout
ElseIf DlgValue("CheckBox1")=0 then
End If
End Sub
***edited code tags***
-jjsaw5
This post has been edited by cheetahz: 05 December 2008 - 07:57 AM

New Topic/Question
Reply




MultiQuote




|