Feb-26-2018, 10:03 PM
Hi,
I need your help with my current code. I am working on the if statements to check on the CurrentRowX value and the CurrentWidth value to see if I can get pass on one of these statement so I can add the program_id value or use to call the
I would like to reduce the code to make it much shorter, easy and simple, but I have no idea how I could reduce it.
Here is what I am using right now:
If you could show me how I could reduce it to make it easy and simple, that would be great.
Thanks in advance
I need your help with my current code. I am working on the if statements to check on the CurrentRowX value and the CurrentWidth value to see if I can get pass on one of these statement so I can add the program_id value or use to call the
EPG_Right
function to move the buttons object.I would like to reduce the code to make it much shorter, easy and simple, but I have no idea how I could reduce it.
Here is what I am using right now:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
if int (CurrentRowX) = = 375 and int (CurrentWidth) < = 864 : program_id = int (program_id) + 1 elif int (CurrentRowX) = = 375 and int (CurrentWidth) > 864 : self .move_right_flag = True self .time_flag = True EPG_Right.GoRight( self ) elif int (CurrentRowX) = = 441 and int (CurrentWidth) < = 568 : program_id = int (program_id) + 1 elif int (CurrentRowX) = = 441 and int (CurrentWidth) > = 626 : self .move_right_flag = True self .time_flag = True EPG_Right.GoRight( self ) elif int (CurrentRowX) = = 507 and int (CurrentWidth) < = 456 : program_id = int (program_id) + 1 elif int (CurrentRowX) = = 507 and int (CurrentWidth) > = 515 : self .move_right_flag = True self .time_flag = True EPG_Right.GoRight( self ) elif int (CurrentRowX) = = 559 and int (CurrentWidth) > = 515 : self .move_right_flag = True self .time_flag = True EPG_Right.GoRight( self ) elif int (CurrentRowX) = = 610 and int (CurrentWidth) < 691 : program_id = int (program_id) + 1 elif int (CurrentRowX) = = 610 and int (CurrentWidth) > = 691 : self .move_right_flag = True self .time_flag = True EPG_Right.GoRight( self ) elif int (CurrentRowX) = = 669 and int (CurrentWidth) < 691 : program_id = int (program_id) + 1 elif int (CurrentRowX) = = 669 and int (CurrentWidth) > = 691 : self .move_right_flag = True self .time_flag = True EPG_Right.GoRight( self ) elif int (CurrentRowX) = = 724 and int (CurrentWidth) < = 515 : program_id = int (program_id) + 1 elif int (CurrentRowX) = = 724 and int (CurrentWidth) > = 567 : self .move_right_flag = True self .time_flag = True EPG_Right.GoRight( self ) elif int (CurrentRowX) = = 790 and int (CurrentWidth) < = 344 : program_id = int (program_id) + 1 elif int (CurrentRowX) = = 790 and int (CurrentWidth) > = 456 : self .move_right_flag = True self .time_flag = True EPG_Right.GoRight( self ) elif int (CurrentRowX) = = 838 and int (CurrentWidth) > = 456 : self .move_right_flag = True self .time_flag = True EPG_Right.GoRight( self ) elif int (CurrentRowX) = = 897 and int (CurrentWidth) < 396 : program_id = int (program_id) + 1 elif int (CurrentRowX) = = 897 and int (CurrentWidth) > = 396 : self .move_right_flag = True self .time_flag = True EPG_Right.GoRight( self ) elif int (CurrentRowX) = = 959 and int (CurrentWidth) < 342 : program_id = int (program_id) + 1 elif int (CurrentRowX) = = 959 and int (CurrentWidth) > = 342 : self .move_right_flag = True self .time_flag = True EPG_Right.GoRight( self ) elif int (CurrentRowX) = = 1009 and int (CurrentWidth) > = 227 : self .move_right_flag = True self .time_flag = True EPG_Right.GoRight( self ) elif int (CurrentRowX) = = 1072 and int (CurrentWidth) < 227 : program_id = int (program_id) + 1 elif int (CurrentRowX) = = 1072 and int (CurrentWidth) > = 227 : self .move_right_flag = True self .time_flag = True EPG_Right.GoRight( self ) elif int (CurrentRowX) = = 1138 and int (CurrentWidth) < 165 : program_id = int (program_id) + 1 elif int (CurrentRowX) = = 1138 and int (CurrentWidth) > = 165 : self .move_right_flag = True self .time_flag = True EPG_Right.GoRight( self ) elif int (CurrentRowX) = = 1184 and int (CurrentWidth) < 167 : program_id = int (program_id) + 1 elif int (CurrentRowX) = = 1184 and int (CurrentWidth) > = 167 : self .move_right_flag = True self .time_flag = True EPG_Right.GoRight( self ) elif int (CurrentRowX) = = 1246 and int (CurrentWidth) > = 59 : self .move_right_flag = True self .time_flag = True EPG_Right.GoRight( self ) |
Thanks in advance