Está en la página 1de 22

C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.

1 VERSION 5.00
2 Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
3 Object = "{6FBA474E-43AC-11CE-9A0E-00AA0062BB4C}#1.0#0"; "SYSINFO.OCX"
4 Begin VB.Form Form1
5 BackColor = &H00E0E0E0&
6 BorderStyle = 1 'Fixed Single
7 Caption = "Lectura manual de paquetes"
8 ClientHeight = 8400
9 ClientLeft = 45
10 ClientTop = 330
11 ClientWidth = 11490
12 LinkTopic = "Form1"
13 LockControls = -1 'True
14 ScaleHeight = 8400
15 ScaleWidth = 11490
16 StartUpPosition = 2 'CenterScreen
17 Begin VB.TextBox txtCodigo
18 Alignment = 2 'Center
19 Appearance = 0 'Flat
20 BackColor = &H00E0E0E0&
21 BeginProperty Font
22 Name = "MS Sans Serif"
23 Size = 9.75
24 Charset = 0
25 Weight = 700
26 Underline = 0 'False
27 Italic = 0 'False
28 Strikethrough = 0 'False
29 EndProperty
30 ForeColor = &H00FF0000&
31 Height = 495
32 Left = 2280
33 Locked = -1 'True
34 TabIndex = 44
35 Top = 5520
36 Width = 8895
37 End
38 Begin SysInfoLib.SysInfo SysInfo1
39 Left = 0
40 Top = 960
41 _ExtentX = 1005
42 _ExtentY = 1005
43 _Version = 393216
44 End
45 Begin VB.OptionButton Option2
46 Caption = " PAP2"
47 BeginProperty Font
48 Name = "MS Sans Serif"
49 Size = 9.75
50 Charset = 0
51 Weight = 700
52 Underline = 0 'False
53 Italic = 0 'False
54 Strikethrough = 0 'False
55 EndProperty
56 ForeColor = &H000000FF&
57 Height = 375
58 Left = 4680
59 TabIndex = 43
60 Top = 6960
61 Width = 2175
62 End
63 Begin VB.OptionButton Option1
64 Caption = " PAP1"
65 BeginProperty Font
66 Name = "MS Sans Serif"
67 Size = 9.75
68 Charset = 0

-1-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
69 Weight = 700
70 Underline = 0 'False
71 Italic = 0 'False
72 Strikethrough = 0 'False
73 EndProperty
74 ForeColor = &H000000FF&
75 Height = 375
76 Left = 2280
77 TabIndex = 42
78 Top = 6960
79 Width = 2175
80 End
81 Begin VB.TextBox Text8
82 Alignment = 2 'Center
83 BackColor = &H00C0FFFF&
84 BeginProperty Font
85 Name = "MS Sans Serif"
86 Size = 24
87 Charset = 0
88 Weight = 400
89 Underline = 0 'False
90 Italic = 0 'False
91 Strikethrough = 0 'False
92 EndProperty
93 ForeColor = &H000000FF&
94 Height = 1875
95 Left = 1560
96 MultiLine = -1 'True
97 TabIndex = 41
98 Top = 3360
99 Visible = 0 'False
100 Width = 8175
101 End
102 Begin VB.TextBox Text7
103 Alignment = 1 'Right Justify
104 Appearance = 0 'Flat
105 BorderStyle = 0 'None
106 BeginProperty Font
107 Name = "MS Sans Serif"
108 Size = 8.25
109 Charset = 0
110 Weight = 700
111 Underline = 0 'False
112 Italic = -1 'True
113 Strikethrough = 0 'False
114 EndProperty
115 Height = 255
116 Left = 8400
117 TabIndex = 40
118 Text = "Area Informtica Concordia "
119 Top = 360
120 Width = 3015
121 End
122 Begin VB.PictureBox Picture2
123 Appearance = 0 'Flat
124 AutoSize = -1 'True
125 BackColor = &H80000005&
126 BorderStyle = 0 'None
127 ForeColor = &H80000008&
128 Height = 480
129 Left = 50
130 Picture = "FormLeeComm.frx":0000
131 ScaleHeight = 480
132 ScaleWidth = 480
133 TabIndex = 39
134 Top = 390
135 Width = 480
136 End

-2-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
137 Begin VB.PictureBox Picture1
138 Appearance = 0 'Flat
139 AutoSize = -1 'True
140 BackColor = &H80000005&
141 BorderStyle = 0 'None
142 ForeColor = &H80000008&
143 Height = 480
144 Left = 280
145 Picture = "FormLeeComm.frx":030A
146 ScaleHeight = 480
147 ScaleWidth = 480
148 TabIndex = 38
149 Top = 30
150 Width = 480
151 End
152 Begin VB.CommandButton Command2
153 Caption = "Ingresar lecturas nuevamente"
154 Height = 375
155 Left = 7080
156 Picture = "FormLeeComm.frx":074C
157 TabIndex = 37
158 Top = 6960
159 Width = 4335
160 End
161 Begin VB.ComboBox Combo1
162 Height = 315
163 ItemData = "FormLeeComm.frx":0B8E
164 Left = 9360
165 List = "FormLeeComm.frx":0B98
166 TabIndex = 36
167 Text = "Combo1"
168 Top = 6270
169 Width = 1935
170 End
171 Begin VB.TextBox Text6
172 Alignment = 1 'Right Justify
173 Appearance = 0 'Flat
174 BorderStyle = 0 'None
175 BeginProperty Font
176 Name = "MS Sans Serif"
177 Size = 12
178 Charset = 0
179 Weight = 700
180 Underline = 0 'False
181 Italic = 0 'False
182 Strikethrough = 0 'False
183 EndProperty
184 ForeColor = &H00008000&
185 Height = 300
186 Left = 8520
187 TabIndex = 35
188 Top = 50
189 Width = 2895
190 End
191 Begin VB.TextBox Text5
192 Alignment = 1 'Right Justify
193 Appearance = 0 'Flat
194 BorderStyle = 0 'None
195 BeginProperty Font
196 Name = "MS Sans Serif"
197 Size = 9.75
198 Charset = 0
199 Weight = 700
200 Underline = 0 'False
201 Italic = 0 'False
202 Strikethrough = 0 'False
203 EndProperty
204 Height = 255

-3-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
205 Left = 8400
206 TabIndex = 34
207 Top = 600
208 Width = 3015
209 End
210 Begin VB.Frame Frame3
211 Height = 135
212 Left = 120
213 TabIndex = 32
214 Top = 6720
215 Width = 11295
216 End
217 Begin VB.FileListBox File1
218 Height = 870
219 Left = 2280
220 Pattern = "*.tx*"
221 TabIndex = 31
222 ToolTipText = "Haga doble clic aqu para editar el archivo"
223 Top = 7440
224 Width = 4575
225 End
226 Begin VB.TextBox Text4
227 Appearance = 0 'Flat
228 BeginProperty Font
229 Name = "MS Sans Serif"
230 Size = 24
231 Charset = 0
232 Weight = 700
233 Underline = 0 'False
234 Italic = 0 'False
235 Strikethrough = 0 'False
236 EndProperty
237 ForeColor = &H00000000&
238 Height = 615
239 Index = 6
240 Left = 10320
241 TabIndex = 24
242 Top = 1200
243 Width = 855
244 End
245 Begin VB.TextBox Text4
246 Appearance = 0 'Flat
247 BeginProperty Font
248 Name = "MS Sans Serif"
249 Size = 24
250 Charset = 0
251 Weight = 700
252 Underline = 0 'False
253 Italic = 0 'False
254 Strikethrough = 0 'False
255 EndProperty
256 Height = 615
257 Index = 5
258 Left = 10320
259 TabIndex = 23
260 Top = 1920
261 Width = 855
262 End
263 Begin VB.TextBox Text4
264 Appearance = 0 'Flat
265 BeginProperty Font
266 Name = "MS Sans Serif"
267 Size = 24
268 Charset = 0
269 Weight = 700
270 Underline = 0 'False
271 Italic = 0 'False
272 Strikethrough = 0 'False

-4-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
273 EndProperty
274 Height = 615
275 Index = 4
276 Left = 10320
277 TabIndex = 22
278 Top = 2640
279 Width = 855
280 End
281 Begin VB.TextBox Text4
282 Appearance = 0 'Flat
283 BeginProperty Font
284 Name = "MS Sans Serif"
285 Size = 24
286 Charset = 0
287 Weight = 700
288 Underline = 0 'False
289 Italic = 0 'False
290 Strikethrough = 0 'False
291 EndProperty
292 ForeColor = &H00FF0000&
293 Height = 615
294 Index = 3
295 Left = 10320
296 TabIndex = 21
297 Top = 3360
298 Width = 855
299 End
300 Begin VB.TextBox Text4
301 Appearance = 0 'Flat
302 BeginProperty Font
303 Name = "MS Sans Serif"
304 Size = 24
305 Charset = 0
306 Weight = 700
307 Underline = 0 'False
308 Italic = 0 'False
309 Strikethrough = 0 'False
310 EndProperty
311 Height = 615
312 Index = 2
313 Left = 10320
314 TabIndex = 20
315 Top = 4080
316 Width = 855
317 End
318 Begin VB.TextBox Text4
319 Appearance = 0 'Flat
320 BeginProperty Font
321 Name = "MS Sans Serif"
322 Size = 24
323 Charset = 0
324 Weight = 700
325 Underline = 0 'False
326 Italic = 0 'False
327 Strikethrough = 0 'False
328 EndProperty
329 ForeColor = &H00FF0000&
330 Height = 615
331 Index = 1
332 Left = 10320
333 TabIndex = 19
334 Top = 4800
335 Width = 855
336 End
337 Begin VB.Frame Frame2
338 Height = 135
339 Left = 120
340 TabIndex = 18

-5-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
341 Top = 900
342 Width = 11295
343 End
344 Begin VB.CommandButton Command1
345 Caption = "Salir"
346 Height = 855
347 Left = 9360
348 Picture = "FormLeeComm.frx":0BA8
349 Style = 1 'Graphical
350 TabIndex = 16
351 Top = 7440
352 Width = 2055
353 End
354 Begin VB.Frame Frame1
355 Height = 135
356 Left = 120
357 TabIndex = 15
358 Top = 6060
359 Width = 11295
360 End
361 Begin VB.TextBox Text2
362 Enabled = 0 'False
363 Height = 375
364 Left = 2280
365 TabIndex = 14
366 Top = 6270
367 Width = 6855
368 End
369 Begin VB.TextBox Text1
370 Alignment = 2 'Center
371 Appearance = 0 'Flat
372 Enabled = 0 'False
373 BeginProperty Font
374 Name = "MS Sans Serif"
375 Size = 18
376 Charset = 0
377 Weight = 700
378 Underline = 0 'False
379 Italic = 0 'False
380 Strikethrough = 0 'False
381 EndProperty
382 Height = 555
383 Index = 1
384 Left = 2280
385 TabIndex = 6
386 Top = 4800
387 Width = 6855
388 End
389 Begin VB.TextBox Text1
390 Alignment = 2 'Center
391 Appearance = 0 'Flat
392 Enabled = 0 'False
393 BeginProperty Font
394 Name = "MS Sans Serif"
395 Size = 18
396 Charset = 0
397 Weight = 700
398 Underline = 0 'False
399 Italic = 0 'False
400 Strikethrough = 0 'False
401 EndProperty
402 Height = 555
403 Index = 2
404 Left = 2280
405 TabIndex = 5
406 Top = 4080
407 Width = 6855
408 End

-6-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
409 Begin VB.TextBox Text1
410 Alignment = 2 'Center
411 Appearance = 0 'Flat
412 Enabled = 0 'False
413 BeginProperty Font
414 Name = "MS Sans Serif"
415 Size = 18
416 Charset = 0
417 Weight = 700
418 Underline = 0 'False
419 Italic = 0 'False
420 Strikethrough = 0 'False
421 EndProperty
422 Height = 555
423 Index = 3
424 Left = 2280
425 TabIndex = 4
426 Top = 3360
427 Width = 6855
428 End
429 Begin VB.TextBox Text1
430 Alignment = 2 'Center
431 Appearance = 0 'Flat
432 Enabled = 0 'False
433 BeginProperty Font
434 Name = "MS Sans Serif"
435 Size = 18
436 Charset = 0
437 Weight = 700
438 Underline = 0 'False
439 Italic = 0 'False
440 Strikethrough = 0 'False
441 EndProperty
442 Height = 555
443 Index = 4
444 Left = 2280
445 TabIndex = 3
446 Top = 2640
447 Width = 6855
448 End
449 Begin VB.TextBox Text1
450 Alignment = 2 'Center
451 Appearance = 0 'Flat
452 Enabled = 0 'False
453 BeginProperty Font
454 Name = "MS Sans Serif"
455 Size = 18
456 Charset = 0
457 Weight = 700
458 Underline = 0 'False
459 Italic = 0 'False
460 Strikethrough = 0 'False
461 EndProperty
462 Height = 555
463 Index = 5
464 Left = 2280
465 TabIndex = 2
466 Top = 1920
467 Width = 6855
468 End
469 Begin VB.CommandButton Command3
470 Caption = "Guardado manual a TXT"
471 Height = 855
472 Left = 7080
473 Picture = "FormLeeComm.frx":0FEA
474 Style = 1 'Graphical
475 TabIndex = 1
476 Top = 7440

-7-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
477 Width = 2055
478 End
479 Begin VB.TextBox Text1
480 Alignment = 2 'Center
481 Appearance = 0 'Flat
482 Enabled = 0 'False
483 BeginProperty Font
484 Name = "MS Sans Serif"
485 Size = 18
486 Charset = 0
487 Weight = 700
488 Underline = 0 'False
489 Italic = 0 'False
490 Strikethrough = 0 'False
491 EndProperty
492 Height = 555
493 Index = 6
494 Left = 2280
495 TabIndex = 0
496 Top = 1200
497 Width = 6855
498 End
499 Begin VB.TextBox Text3
500 BackColor = &H00FFFFFF&
501 Enabled = 0 'False
502 BeginProperty Font
503 Name = "Arial"
504 Size = 27.75
505 Charset = 0
506 Weight = 700
507 Underline = -1 'True
508 Italic = 0 'False
509 Strikethrough = 0 'False
510 EndProperty
511 ForeColor = &H0000C0C0&
512 Height = 930
513 Left = 0
514 TabIndex = 17
515 Text = " Lectura Manual de Paquetes"
516 Top = 0
517 Width = 11535
518 End
519 Begin MSCommLib.MSComm MSComm1
520 Left = 10200
521 Top = 0
522 _ExtentX = 1005
523 _ExtentY = 1005
524 _Version = 393216
525 CommPort = 2
526 DTREnable = -1 'True
527 End
528 Begin VB.Timer Timer1
529 Interval = 400
530 Left = 10920
531 Top = 0
532 End
533 Begin VB.Timer Timer2
534 Interval = 10000
535 Left = 8400
536 Top = 120
537 End
538 Begin VB.Label Label10
539 Alignment = 2 'Center
540 Caption = "Cdigo anexar:"
541 BeginProperty Font
542 Name = "MS Sans Serif"
543 Size = 12
544 Charset = 0

-8-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
545 Weight = 700
546 Underline = 0 'False
547 Italic = 0 'False
548 Strikethrough = 0 'False
549 EndProperty
550 ForeColor = &H00FF0000&
551 Height = 375
552 Left = 240
553 TabIndex = 45
554 Top = 5520
555 Width = 1935
556 End
557 Begin VB.Label Label9
558 Alignment = 2 'Center
559 Caption = "Archivos generados para exportar a SAP en C:\ASCII"
560 BeginProperty Font
561 Name = "MS Sans Serif"
562 Size = 12
563 Charset = 0
564 Weight = 700
565 Underline = 0 'False
566 Italic = 0 'False
567 Strikethrough = 0 'False
568 EndProperty
569 Height = 1335
570 Left = 240
571 TabIndex = 33
572 Top = 6960
573 Width = 1935
574 End
575 Begin VB.Label Label8
576 Alignment = 2 'Center
577 Caption = "Se ley"
578 BeginProperty Font
579 Name = "MS Sans Serif"
580 Size = 12
581 Charset = 0
582 Weight = 700
583 Underline = 0 'False
584 Italic = 0 'False
585 Strikethrough = 0 'False
586 EndProperty
587 Height = 495
588 Left = 9240
589 TabIndex = 30
590 Top = 1200
591 Width = 975
592 End
593 Begin VB.Label Label7
594 Alignment = 2 'Center
595 Caption = "Se ley"
596 BeginProperty Font
597 Name = "MS Sans Serif"
598 Size = 12
599 Charset = 0
600 Weight = 700
601 Underline = 0 'False
602 Italic = 0 'False
603 Strikethrough = 0 'False
604 EndProperty
605 Height = 495
606 Left = 9240
607 TabIndex = 29
608 Top = 1920
609 Width = 975
610 End
611 Begin VB.Label Label6
612 Alignment = 2 'Center

-9-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
613 Caption = "Se ley"
614 BeginProperty Font
615 Name = "MS Sans Serif"
616 Size = 12
617 Charset = 0
618 Weight = 700
619 Underline = 0 'False
620 Italic = 0 'False
621 Strikethrough = 0 'False
622 EndProperty
623 Height = 495
624 Left = 9240
625 TabIndex = 28
626 Top = 2640
627 Width = 975
628 End
629 Begin VB.Label Label5
630 Alignment = 2 'Center
631 Caption = "Se ley"
632 BeginProperty Font
633 Name = "MS Sans Serif"
634 Size = 12
635 Charset = 0
636 Weight = 700
637 Underline = 0 'False
638 Italic = 0 'False
639 Strikethrough = 0 'False
640 EndProperty
641 Height = 495
642 Left = 9240
643 TabIndex = 27
644 Top = 3360
645 Width = 975
646 End
647 Begin VB.Label Label4
648 Alignment = 2 'Center
649 Caption = "Se ley"
650 BeginProperty Font
651 Name = "MS Sans Serif"
652 Size = 12
653 Charset = 0
654 Weight = 700
655 Underline = 0 'False
656 Italic = 0 'False
657 Strikethrough = 0 'False
658 EndProperty
659 Height = 495
660 Left = 9240
661 TabIndex = 26
662 Top = 4080
663 Width = 975
664 End
665 Begin VB.Label Label3
666 Alignment = 2 'Center
667 Caption = "Se ley"
668 BeginProperty Font
669 Name = "MS Sans Serif"
670 Size = 12
671 Charset = 0
672 Weight = 700
673 Underline = 0 'False
674 Italic = 0 'False
675 Strikethrough = 0 'False
676 EndProperty
677 Height = 495
678 Left = 9240
679 TabIndex = 25
680 Top = 4800

-10-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
681 Width = 975
682 End
683 Begin VB.Label Label2
684 Alignment = 2 'Center
685 Caption = "Estado puerto:"
686 BeginProperty Font
687 Name = "MS Sans Serif"
688 Size = 12
689 Charset = 0
690 Weight = 700
691 Underline = 0 'False
692 Italic = 0 'False
693 Strikethrough = 0 'False
694 EndProperty
695 Height = 375
696 Left = 240
697 TabIndex = 13
698 Top = 6270
699 Width = 1935
700 End
701 Begin VB.Label Label1
702 Alignment = 2 'Center
703 Caption = "Paquete 6"
704 BeginProperty Font
705 Name = "MS Sans Serif"
706 Size = 13.5
707 Charset = 0
708 Weight = 700
709 Underline = 0 'False
710 Italic = 0 'False
711 Strikethrough = 0 'False
712 EndProperty
713 Height = 495
714 Index = 5
715 Left = 240
716 TabIndex = 12
717 Top = 1200
718 Width = 1935
719 End
720 Begin VB.Label Label1
721 Alignment = 2 'Center
722 Caption = "Paquete 5"
723 BeginProperty Font
724 Name = "MS Sans Serif"
725 Size = 13.5
726 Charset = 0
727 Weight = 700
728 Underline = 0 'False
729 Italic = 0 'False
730 Strikethrough = 0 'False
731 EndProperty
732 Height = 495
733 Index = 4
734 Left = 240
735 TabIndex = 11
736 Top = 1920
737 Width = 1935
738 End
739 Begin VB.Label Label1
740 Alignment = 2 'Center
741 Caption = "Paquete 4"
742 BeginProperty Font
743 Name = "MS Sans Serif"
744 Size = 13.5
745 Charset = 0
746 Weight = 700
747 Underline = 0 'False
748 Italic = 0 'False

-11-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
749 Strikethrough = 0 'False
750 EndProperty
751 Height = 495
752 Index = 3
753 Left = 240
754 TabIndex = 10
755 Top = 2640
756 Width = 1935
757 End
758 Begin VB.Label Label1
759 Alignment = 2 'Center
760 Caption = "Paquete 3"
761 BeginProperty Font
762 Name = "MS Sans Serif"
763 Size = 13.5
764 Charset = 0
765 Weight = 700
766 Underline = 0 'False
767 Italic = 0 'False
768 Strikethrough = 0 'False
769 EndProperty
770 Height = 495
771 Index = 2
772 Left = 240
773 TabIndex = 9
774 Top = 3360
775 Width = 1935
776 End
777 Begin VB.Label Label1
778 Alignment = 2 'Center
779 Caption = "Paquete 2"
780 BeginProperty Font
781 Name = "MS Sans Serif"
782 Size = 13.5
783 Charset = 0
784 Weight = 700
785 Underline = 0 'False
786 Italic = 0 'False
787 Strikethrough = 0 'False
788 EndProperty
789 Height = 495
790 Index = 1
791 Left = 240
792 TabIndex = 8
793 Top = 4080
794 Width = 1935
795 End
796 Begin VB.Label Label1
797 Alignment = 2 'Center
798 Caption = "Paquete 1"
799 BeginProperty Font
800 Name = "MS Sans Serif"
801 Size = 13.5
802 Charset = 0
803 Weight = 700
804 Underline = 0 'False
805 Italic = 0 'False
806 Strikethrough = 0 'False
807 EndProperty
808 Height = 495
809 Index = 0
810 Left = 240
811 TabIndex = 7
812 Top = 4800
813 Width = 1935
814 End
815 End
816 Attribute VB_Name = "Form1"

-12-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
817 Attribute VB_GlobalNameSpace = False
818 Attribute VB_Creatable = False
819 Attribute VB_PredeclaredId = True
820 Attribute VB_Exposed = False
821 Option Explicit
822 Dim InString As String
823 Dim blnEntra As Boolean
824 Dim blnNuevoIngr As Boolean
825 Const INT_CANT_CARACTERES = 23
826
827 Private Sub Combo1_Click()
828 MSComm1.PortOpen = False
829 Select Case Combo1.Text
830 Case Is = "COM1"
831 MSComm1.CommPort = 1
832 subGuardaLogsEnTXT Now & " --- " & "Se cambi a COM1"
833 Case Else
834 MSComm1.CommPort = 2
835 subGuardaLogsEnTXT Now & " --- " & "Se cambi a COM2"
836 End Select
837 MSComm1.PortOpen = True
838 End Sub
839
840 Private Sub Command1_Click()
841 Unload Me
842 End Sub
843
844 Private Sub Command2_Click()
845 ''''
846 subLimpiaTextBox
847 Form_Unload 0
848 Form_Load
849 End Sub
850
851 Private Sub Command3_Click()
852 subGuardaEnTXT
853 txtCodigo.Text = ""
854 End Sub
855
856 Private Sub File1_DblClick()
857 ''''
858 subGuardaLogsEnTXT Now & " --- " & "Se edito el archivo: " & " C:\ASCII\" &
File1.FileName
859 Dim RetVal
860 RetVal = Shell("C:\WINDOWS\NOTEPAD.EXE" & " C:\ASCII\" & File1.FileName, 1) '
Ejecuta
861 End Sub
862
863 Private Sub Form_Load()
864 If Dir("c:\laminado.txt", vbArchive + vbHidden + vbReadOnly) <> "" Then
865 'PARA BARRERA DE LAMINADO: PAP2
866 Option2.Value = True
867 Else
868 'PARA BARRERAS DE MDF Y AGLOMERADO: PAP1
869 Option1.Value = True
870 End If
871
872
873 If GetSetting(appname:="SistemaBarreraManual", section:="Inicio", _
874 Key:="PAP2Setting") = "frontlam" Then
875 'PARA BARRERA DE LAMINADO: PAP2
876 Option2.Value = True
877 Else
878 'PARA BARRERAS DE MDF Y AGLOMERADO: PAP1
879 Option1.Value = True
880 End If
881
882

-13-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
883 'compruebo la fecha del sistema
884 If Len(Format(Now)) <> 17 Then '''Len(Trim(Now)) <> 17 Then
885 If Len(Format(Now)) <> 22 Then '''Len(Trim(Now)) <> 17 Then
886 MsgBox "El formato de fecha requerido es: " & " dd/MM/aa HH:mm:ss o
dd/MM/aa HH:mm:ss tt " & _
887 ". Verifique su configuracin regional desde el Panel de
Control.", _
888 vbCritical + vbOKOnly, "Formato de fecha erroneo"
889 MSComm1.PortOpen = True
890 subGuardaLogsEnTXT Now & " --- " & "Formato de fecha no
compatible.....se debe cambiar desde conf. regional"
891 Unload Me
892 Exit Sub
893 End If
894 End If
895
896 Combo1.Text = Combo1.List(1)
897
898 Select Case Combo1.Text
899 Case Is = "COM1"
900 MSComm1.CommPort = 1
901 Case Else
902 MSComm1.CommPort = 2
903 End Select
904
905 Text2.Text = "Abriendo puerto...."
906 MSComm1.PortOpen = True
907 'Text1(1).SetFocus
908 Text2.Text = "Puerto abierto...."
909
910 File1.Path = "C:\ASCII"
911 File1.Refresh
912
913 Text5.ZOrder 0
914 Text5.Text = "Versin " & App.Major & "." & App.Revision & "." & App.Minor
915
916 Text6.ZOrder 0
917 Text6.Text = App.CompanyName
918
919 InString = ""
920 blnEntra = True
921 blnNuevoIngr = True
922
923 ''''Text1(1).Text = "32051NH&0350356D00200811" 'PARA MIS PRUEBAS
924 ''''Text1(2).Text = "320&1NH0350356D01200811" 'PARA MIS PRUEBAS
925 ''''Text1(3).Text = "32051NH0350356D02200811" 'PARA MIS PRUEBAS
926 ''''Text1(4).Text = "32051NH0350356D03200811" 'PARA MIS PRUEBAS
927
928 subGuardaLogsEnTXT Now & " --- " & "Inicio/Reinicio del sistema..."
929 End Sub
930
931 Private Sub Form_Unload(Cancel As Integer)
932 subGuardaLogsEnTXT Now & " --- " & "Cierre del sistema..."
933 Text2.Text = "Cerrando puerto...."
934 MSComm1.PortOpen = False
935
936 End Sub
937
938 Private Sub subGuardaEnTXT()
939 On Error GoTo Error
940 Timer1.Enabled = False 'desactivo el control Timer para que no continue hasta
grabar .txt
941
942 Dim strArchivoTexto As String
943 Dim strSiNo As String
944 Dim i As Long
945 '''Dim f As Integer
946 Dim strNombreASCII As String

-14-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
947 Dim ArchOrigen As String
948 Dim ArchDestino As String
949
950 'compruebo que haya cdigos para guardar
951 For i = 1 To 6
952 If Len(Text1(i).Text) = 0 Then
953 If i = 6 Then
954 MsgBox "No hay texto para guardar.", vbCritical + vbOKOnly, "Atencin"
955 Timer1.Enabled = True 'activo el control Timer para que continue
hasta grabar .txt
956 Exit Sub
957 End If
958 Else
959 'si hay al menos un cdigo sale
960 Exit For
961 End If
962 Next i
963
964 For i = 1 To 6
965 If Text1(i).Text = "9999999" Then Text1(i).Text = ""
966 Next i
967
968 'si hay cdigos repetidos NO guarda los TXT.
969 subControlaRepeticin
970
971 'genero el nombre del .TXT para exportar a SAP
972 '''strArchivoTexto = "c:\ascii\barrera" & Mid(Date, 7, 2) & Mid(Date, 4, 2) &
Mid(Date, 1, 2) & _
973 Mid(Time, 1, 2) & Mid(Time, 4, 2) & Mid(Time, 7, 2) & ".txt"
'InputBox("Guardar archivo como...", , "c:\ascii\prueba.txt")
974
975 Command1.Enabled = False
976 Command2.Enabled = False
977 Command3.Enabled = False
978 Text8.Visible = True
979 blnNuevoIngr = False 'por ahora no se puede realizar nuevos ingresos
980 Text8.Text = "NO INGRESAR PARTES POR FAVOR .... SE ESTA BUSCANDO NOMBRE PARA
GUARDAR"
981
982 'intenta varias veces hasta obtener un nombre diferente
983 strNombreASCII = gstrObtengo_Nombre_ASCII
984 'nombre para c:\ascii
985 strArchivoTexto = "c:\ascii\" & strNombreASCII
986 '''f = 6
987 For i = 1 To 60000
988 Text2.Text = "BUSCANDO NOMBRE ARCHIVO DE TEXTO DIFERENTE....ESPERE.... " &
Time
989 'guardo el nombre generado para esta lectura para guardarlo en ascii y en
back3
990 strNombreASCII = gstrObtengo_Nombre_ASCII
991 'nombre para c:\ascii
992 strArchivoTexto = "c:\ascii\" & strNombreASCII
993
994 'si el archivo no existe salgo del loop
995 If Dir(strArchivoTexto) = "" Then
996 Debug.Print "." & Dir(strArchivoTexto) & "."
997 Exit For
998 End If
999
1000 '''If i Mod 60 = 0 Then
1001 ''' If f <= 24 Then
1002 ''' Text8.Font.Size = f
1003 ''' f = f + 1
1004 ''' Else
1005 ''' f = 6
1006 ''' End If
1007 '''End If
1008 Next i

-15-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
1009
1010 'si todavia existe el archivo o existe en back3 salgo y espero que el control
timer llame nuevamente a esta rutina
1011 If (Dir(strArchivoTexto) <> "" Or Dir("c:\ascii\back3\" & strNombreASCII) <> "")
Then
1012 MsgBox "No se han podido guardar los ingresos actuales. Intente nuevamente" _
1013 , vbCritical + vbOKOnly, "Atencin"
1014 Command2_Click
1015 Timer1.Enabled = True 'activo el control Timer para que continue hasta
grabar .tx_
1016 Command1.Enabled = True
1017 Command2.Enabled = True
1018 Command3.Enabled = True
1019 Text8.Visible = False
1020 blnNuevoIngr = True 'habilitado para nuevos ingresos
1021 Text8.Text = ""
1022 Exit Sub
1023 End If
1024 Command1.Enabled = True
1025 Command2.Enabled = True
1026 Command3.Enabled = True
1027 Text8.Visible = False
1028 blnNuevoIngr = True 'habilitado para nuevos ingresos
1029 Text8.Text = ""
1030
1031 'asigno el archivo origen y destino para copiarlo a back3
1032 ArchOrigen = strArchivoTexto ' defino el nombre del archivo de origen.
1033
1034 'creo los directorios si no existen
1035 If Dir("c:\ascii", vbDirectory) = "" Then MkDir "c:\ascii"
1036 If Dir("c:\ascii\back3", vbDirectory) = "" Then MkDir "c:\ascii\back3"
1037
1038 ArchDestino = "c:\ascii\back3\" & strNombreASCII ' defino el nombre del
archivo de destino.
1039
1040 Dim fso As Object 'Variant
1041 Dim t As Object 'Variant
1042 'Devuelvo FileSystemObject (fso).
1043 Set fso = CreateObject("Scripting.FileSystemObject")
1044 'Creo el archivo como un objeto TextStream (t)
1045 Set t = fso.CreateTextFile(strArchivoTexto, True)
1046
1047 'Escribo una lnea de texto en el archivo de texto creado.
1048 For i = 1 To 6
1049 'guardo todas los codigos mientras existan en cada text box
1050 If Len(Text1(i).Text) > 0 And Len(Text1(i).Text) = INT_CANT_CARACTERES Then
1051 t.WriteLine (concatenaLecturaString(Text1(i).Text))
1052 subGuardaLogsEnTXT Now & " --- " & "Se anex el cdigo: " &
concatenaLecturaString(Text1(i).Text)
1053 End If
1054 Next i
1055
1056 'Vaco el bfer y cierro el archivo.
1057 t.Close
1058
1059 'para que tome nuevamente los cdigos
1060 blnEntra = True
1061
1062 subLimpiaTextBox
1063 Text2.Text = ""
1064 txtCodigo.Text = ""
1065 File1.Refresh
1066
1067 Command2_Click
1068
1069 FileCopy ArchOrigen, ArchDestino ' copio el archivo de origen en el archivo de
destino.
1070 subGuardaLogsEnTXT Now & " --- " & "Se realiz backup al archivo: " & ArchDestino

-16-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
1071
1072 Timer1.Enabled = True 'activo el control Timer para que continue hasta grabar .txt
1073 Exit Sub
1074 Error:
1075 Timer1.Enabled = True 'activo el control Timer para que continue hasta grabar .txt
1076 MsgBox Err.Description, vbCritical + vbOKOnly, "Atencin"
1077 End Sub
1078
1079 Private Sub subLimpiaTextBox()
1080 Dim i As Integer
1081 'limpio todos los text box
1082 For i = 1 To 6
1083 Text1(i).Text = ""
1084 Text4(i).Text = ""
1085 Next i
1086 End Sub
1087
1088 Private Function concatenaLecturaString(strCodigo As String) As String
1089 Dim strPAP As String
1090 If Option1.Value = True Then
1091 strPAP = "PAP1"
1092 Else
1093 strPAP = "PAP2"
1094 End If
1095
1096 concatenaLecturaString = Mid(strCodigo, 1, 10) & Space(8) & String(6, "0") & _
1097 Mid(strCodigo, 11, 3) & "UN " & Mid(strCodigo, 14, 10) & _
1098 "20" & Mid(Date, 7, 2) & Mid(Date, 4, 2) & Mid(Date, 1, 2) & _
1099 Mid(Time, 1, 2) & Mid(Time, 4, 2) & Mid(Time, 7, 2) & "00311CP60" & strPAP &
Space(4)
1100
1101 End Function
1102
1103 Private Sub Label1_Click(Index As Integer)
1104 If Len(Text1(Index + 1).Text) <> 0 Then
1105 txtCodigo.Text = concatenaLecturaString(Text1(Index + 1).Text)
1106 Else
1107 txtCodigo.Text = ""
1108 End If
1109 End Sub
1110
1111 Private Sub MSComm1_OnComm()
1112 Debug.Print "Entra"
1113
1114 Text2.Text = "Estado del puerto " & MSComm1.CommEvent
1115
1116 Select Case MSComm1.CommEvent
1117 ' Controlar cada evento o error escribiendo
1118 ' cdigo en cada instruccin Case
1119
1120
1121 ' Errores
1122 Case comBreak ' Se ha recibido una interrupcin.
1123 MsgBox "Se ha recibido una interrupcin. Intente nuevamente", _
1124 vbCritical + vbOKOnly, "Atencin"
1125 Case comEventFrame ' Error de trama
1126 MsgBox "Ha ocurrido un error en el marco de trama. Intente nuevamente", _
1127 vbCritical + vbOKOnly, "Atencin"
1128 Case comEventOverrun ' Datos perdidos.
1129 MsgBox "Ha ocurrido una prdida de informacin en puerto. Intente
nuevamente", _
1130 vbCritical + vbOKOnly, "Atencin"
1131 Case comEventRxOver ' Desbordamiento del bfer
1132 ' de recepcin.
1133 MsgBox "Ha ocurrido un desbordamiento del bfer de recepcin. Intente
nuevamente", _
1134 vbCritical + vbOKOnly, "Atencin"
1135 Case comEventRxParity ' Error de paridad.

-17-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
1136 MsgBox "Ha ocurrido un error de paridad. Intente nuevamente", _
1137 vbCritical + vbOKOnly, "Atencin"
1138 Case comEventTxFull ' Bfer de transmisin lleno.
1139 MsgBox "Se ha llenado el buffer de transmisin. Intente nuevamente", _
1140 vbCritical + vbOKOnly, "Atencin"
1141 Case comEventDCB ' Error inesperado al recuperar DCB.
1142 MsgBox "Error inesperado al recuperar Bloque de control de dispositivos
(DCB) para el puerto. Intente nuevamente", _
1143 vbCritical + vbOKOnly, "Atencin"
1144
1145 ' Eventos
1146 Case comEvCD ' Cambio en la lnea CD.
1147 Case comEvCTS ' Cambio en la lnea CTS.
1148 Case comEvDSR ' Cambio en la lnea DSR.
1149 Case comEvRing ' Cambio en el indicador de llamadas.
1150 Case comEvReceive ' Recibido n SThreshold de caracteres.
1151
1152 Case comEvSend ' Hay un SThreshold caracteres en el bfer de transmisin.
1153 Case comEvEOF ' Se ha encontrado un carcter EOF en la entrada.
1154 End Select
1155
1156
1157 'If Len(Text1(Index).Text) > 0 Then
1158 'cargo el siguiente text box
1159 subCargaLecturaEnTextBox 1 'Index + 1
1160 'End If
1161
1162 End Sub
1163
1164 Private Sub subCargaLecturaEnTextBox(Index As Integer)
1165
1166 ' Recuperar todos los datos disponibles.
1167 MSComm1.InputLen = 0
1168
1169 ' Comprobar los datos.
1170 If MSComm1.InBufferCount Then
1171 ' Leer los datos.
1172 Text2.Text = "Leyendo datos del puerto ...."
1173 InString = MSComm1.Input
1174
1175 If Len(InString) = INT_CANT_CARACTERES Then _
1176 subGuardaLogsEnTXT Now & " --- " & "Intento de ESCANEO del cdigo: " &
InString & " ----> (PARA REGISTRAR EL ESCANEO ANTES DEL GUARDADO A .TX_)"
1177
1178 If Text1(Index).Text <> "9999999" Then
1179 Text1(Index).Text = Trim(Text1(Index).Text & InString)
1180 txtCodigo.Text = concatenaLecturaString(Text1(Index).Text)
1181 'si es el TextBox 6 guardo automticamente
1182 If Index = 6 Then
1183 Timer1.Enabled = False
1184 subGuardaEnTXT
1185 subGuardaLogsEnTXT Now & " --- " & "SE HAN GUARDADO LOS CODIGOS
CORRESPONDIENTES..."
1186 Command2_Click
1187 Timer1.Enabled = True
1188 Exit Sub
1189 End If
1190
1191 End If
1192
1193 'si finaliz la busqueda del nuevo nombre para guardar
1194 If blnNuevoIngr = True Then
1195 'si encuentra la llave 9999999 guarda el .TXT
1196 If (InString = "9999999") Then
1197 Timer1.Enabled = False
1198 subGuardaEnTXT
1199 Text2.Text = "SE HAN GUARDADO LOS CODIGOS CORRESPONDIENTES..."
1200 subGuardaLogsEnTXT Now & " --- " & "SE HAN GUARDADO LOS CODIGOS

-18-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
CORRESPONDIENTES..."
1201 ''blnEntra = False
1202 Timer1.Enabled = True
1203 Exit Sub
1204 End If
1205 Else
1206 Exit Sub
1207 End If
1208
1209 'si encuentra la llave 0000000 prepara para reingresar los datos
1210 If (InString = "0000000") Then
1211 Text2.Text = "SE HA PREPARADO PARA UN NUEVO INGRESO..."
1212 subGuardaLogsEnTXT Now & " --- " & "SE HA PREPARADO PARA UN NUEVO
INGRESO..."
1213 ''blnEntra = False
1214 Command2_Click
1215 Exit Sub
1216 End If
1217
1218
1219 'compruebo si existen caracteres no compatibles en el string
1220 Dim i As Integer
1221 Dim boolBandera As Boolean
1222 boolBandera = True
1223 Index = Index - 1
1224 For i = 1 To Len(Trim(Text1(Index).Text)) 'INT_CANT_CARACTERES
1225 If i = Len(Trim(Text1(Index).Text)) Then Exit For
1226
1227 If ((UCase(Mid(Trim(Text1(Index).Text), i, 1)) >= "A" And
UCase(Mid(Trim(Text1(Index).Text), i, 1)) <= "Z") Or _
1228 (Mid(Trim(Text1(Index).Text), i, 1) >= 0 And
Mid(Trim(Text1(Index).Text), i, 1) <= 9) Or _
1229 (Mid(Trim(Text1(Index).Text), i, 1) = " ")) Then
1230
1231 boolBandera = True
1232 Else
1233 boolBandera = False
1234 Exit For
1235
1236 End If
1237 Next i
1238 If boolBandera = False Then
1239 Text4(Index).ForeColor = &HFF&
1240 Text4(Index).Text = "XX"
1241 txtCodigo.Text = "** CARACTERES NO VALIDOS **"
1242 subGuardaLogsEnTXT Now & " --- " & "Lectura de cdigo errnea...**
CARACTERES NO VALIDOS **"
1243 End If
1244 Index = Index + 1
1245
1246
1247 If Len(Text1(Index).Text) <> INT_CANT_CARACTERES And Len(Text1(Index).Text) >
0 Then
1248 '&H000000FF&
1249 Text4(Index).ForeColor = &HFF&
1250 Text4(Index).Text = "XX"
1251 subGuardaLogsEnTXT Now & " --- " & "Lectura de cdigo
errnea...diferencia de tamao"
1252 Else
1253 '&H00FF0000&
1254 If Len(Text1(Index).Text) > 0 Then
1255 Text4(Index).ForeColor = &HFF0000
1256 Text4(Index).Text = "OK"
1257 subGuardaLogsEnTXT Now & " --- " & "Lectura de cdigo completada...OK"
1258 End If
1259 End If
1260
1261 Else

-19-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
1262
1263 'MsgBox "No hay datos en el puerto", vbCritical + vbOKOnly, "Atencin"
1264 End If
1265
1266 End Sub
1267
1268 Private Sub Option1_Click()
1269 SaveSetting "SistemaBarreraManual", "Inicio", "PAP2Setting", "front_Aglo_MDF"
1270 subGuardaLogsEnTXT Now & " --- " & "Se seleccion PAP1"
1271 End Sub
1272
1273 Private Sub Option2_Click()
1274 SaveSetting "SistemaBarreraManual", "Inicio", "PAP2Setting", "frontlam"
1275 subGuardaLogsEnTXT Now & " --- " & "Se seleccion PAP2"
1276 End Sub
1277
1278 Private Sub Timer1_Timer()
1279 If blnEntra = False Then Exit Sub
1280
1281 'va cargando los cdigos de abajo hacia arriba mientras esten vacios
1282 If Len(Text1(1).Text) = 0 Then
1283 subCargaLecturaEnTextBox 1
1284 ElseIf Len(Text1(2).Text) = 0 Then
1285 subCargaLecturaEnTextBox 2
1286 ElseIf Len(Text1(3).Text) = 0 Then
1287 subCargaLecturaEnTextBox 3
1288 ElseIf Len(Text1(4).Text) = 0 Then
1289 subCargaLecturaEnTextBox 4
1290 ElseIf Len(Text1(5).Text) = 0 Then
1291 subCargaLecturaEnTextBox 5
1292 ElseIf Len(Text1(6).Text) = 0 Then
1293 subCargaLecturaEnTextBox 6
1294 Else
1295 '''MsgBox "No es posible cargar mas cdigos. Capacidad excedida.",
vbCritical + vbOKOnly, "Atencin"
1296 blnEntra = False
1297 End If
1298 End Sub
1299
1300 Private Sub subControlaRepeticin()
1301 Dim i As Integer
1302 Dim ii As Integer
1303 Dim strCodAnt As String
1304
1305 For i = 1 To 6
1306 For ii = 1 To 6
1307 If i <> ii Then
1308 If (Text1(i).Text = Text1(ii).Text) And Text1(ii).Text <> "" Then
1309 Text1(ii).Text = ""
1310 Text2.Text = "CODIGO YA INGRESADO, INTENTE NUEVAMENTE ..."
1311 subGuardaLogsEnTXT Now & " --- " & "CODIGO REPETIDO EN UN MISMO
INGRESO ..."
1312 End If
1313 End If
1314 Next ii
1315 Next i
1316 End Sub
1317
1318 Private Function gstrObtengo_Nombre_ASCII() As String
1319 'Obtengo el nombre del archivo de texto a crear. El Formato:
1320 'D1122334.TX_, donde:
1321 '11=mes en curso
1322 '22=da
1323 '33=hora
1324 '4=rango de minutos segn los if de ms adelante.
1325
1326 On Error Resume Next
1327

-20-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
1328 Dim vrTexto_Final As String
1329 Dim Segs_TMP As Byte
1330 Dim TXT_Mins As String * 1
1331 Segs_TMP = Trim$(Minute(Time))
1332 TXT_Mins = "0"
1333 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1334 'Consulto en valores a cul corresponde Segs_Tmp:
1335 If Segs_TMP >= 0 And Segs_TMP < 3 Then
1336 TXT_Mins = "1"
1337 End If
1338 If Segs_TMP >= 3 And Segs_TMP < 6 Then
1339 TXT_Mins = "2"
1340 End If
1341 If Segs_TMP >= 6 And Segs_TMP < 9 Then
1342 TXT_Mins = "3"
1343 End If
1344 If Segs_TMP >= 9 And Segs_TMP < 12 Then
1345 TXT_Mins = "4"
1346 End If
1347 If Segs_TMP >= 12 And Segs_TMP < 15 Then
1348 TXT_Mins = "5"
1349 End If
1350 If Segs_TMP >= 15 And Segs_TMP < 18 Then
1351 TXT_Mins = "6"
1352 End If
1353 If Segs_TMP >= 18 And Segs_TMP < 21 Then
1354 TXT_Mins = "7"
1355 End If
1356 If Segs_TMP >= 21 And Segs_TMP < 24 Then
1357 TXT_Mins = "8"
1358 End If
1359 If Segs_TMP >= 24 And Segs_TMP < 27 Then
1360 TXT_Mins = "9"
1361 End If
1362 If Segs_TMP >= 27 And Segs_TMP < 30 Then
1363 TXT_Mins = "A"
1364 End If
1365 If Segs_TMP >= 30 And Segs_TMP < 33 Then
1366 TXT_Mins = "B"
1367 End If
1368 If Segs_TMP >= 33 And Segs_TMP < 36 Then
1369 TXT_Mins = "C"
1370 End If
1371 If Segs_TMP >= 36 And Segs_TMP < 39 Then
1372 TXT_Mins = "D"
1373 End If
1374 If Segs_TMP >= 39 And Segs_TMP < 42 Then
1375 TXT_Mins = "E"
1376 End If
1377 If Segs_TMP >= 42 And Segs_TMP < 45 Then
1378 TXT_Mins = "F"
1379 End If
1380 If Segs_TMP >= 45 And Segs_TMP < 48 Then
1381 TXT_Mins = "G"
1382 End If
1383 If Segs_TMP >= 48 And Segs_TMP < 51 Then
1384 TXT_Mins = "H"
1385 End If
1386 If Segs_TMP >= 51 And Segs_TMP < 54 Then
1387 TXT_Mins = "I"
1388 End If
1389 If Segs_TMP >= 54 And Segs_TMP < 57 Then
1390 TXT_Mins = "J"
1391 End If
1392 If Segs_TMP >= 57 Then
1393 TXT_Mins = "K"
1394 End If
1395 DoEvents

-21-
C:\SISTEMAS\Barreras_MDF_LAM_AGL\Barreras_MDF_LAM_AGL\FormLeeComm.frm mircoles, 21 de junio de 2017 06:54 p.m.
1396 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1397 vrTexto_Final = "D" & Right$("00" & Trim$(Month(Date)), 2) & Right$("00" &
Trim$(Day(Date)), 2) _
1398 & Right$("00" & Trim$(Hour(Time)), 2) & TXT_Mins & ".TX_"
1399 gstrObtengo_Nombre_ASCII = UCase(vrTexto_Final)
1400
1401
1402 Exit Function
1403 End Function
1404
1405 Private Sub Timer2_Timer()
1406 'el fileBox se refresca cada 10 segundos si hay mas de un archivo
1407 If File1.ListCount > 1 Then File1.Refresh ' > 1 ya que el minimo es LS.TXT
1408 End Sub
1409
1410 Private Sub subGuardaLogsEnTXT(strDescripLog As String)
1411 On Error GoTo Error
1412 Timer1.Enabled = False 'desactivo el control Timer para que no continue hasta
grabar .txt
1413
1414 Dim strArchivoTexto As String
1415 Dim strSiNo As String
1416 Dim i As Integer
1417 Dim strNombreASCII As String
1418 Dim fso As Object 'Variant
1419 Dim t As Object 'Variant
1420
1421 'guardo el nombre del log
1422 strNombreASCII = "LogLecturas.txt"
1423 strArchivoTexto = App.Path & "\" & strNombreASCII
1424
1425 'si existe el archivo...solo le agrego texto .... si no existe lo creo y le
agrego texto
1426 If Dir(strArchivoTexto) = "" Then
1427 'Devuelvo FileSystemObject (fso) para crear el archivo.
1428 Set fso = CreateObject("Scripting.FileSystemObject")
1429 'Creo el archivo como un objeto TextStream (t)
1430 Set t = fso.CreateTextFile(strArchivoTexto, True)
1431 Else
1432 'Devuelvo FileSystemObject (fso) para modificar el archivo.
1433 Set fso = CreateObject("Scripting.FileSystemObject")
1434 'abro el archivo de texto para anexar y devuelve como ASCII
1435 Set t = fso.OpenTextFile(strArchivoTexto, 8, False, 0)
1436 End If
1437
1438 t.WriteLine (strDescripLog)
1439
1440 'Vaco el bfer y cierro el archivo.
1441 t.Close
1442
1443 Timer1.Enabled = True 'activo el control Timer para que continue hasta grabar .txt
1444 Exit Sub
1445 Error:
1446 Timer1.Enabled = True 'activo el control Timer para que continue hasta grabar .txt
1447 MsgBox Err.Description, vbCritical + vbOKOnly, "Atencin"
1448 End Sub
1449

-22-