Foro de elhacker.net

Programación => Programación Visual Basic => Mensaje iniciado por: XP. en 11 Abril 2006, 18:42 pm



Título: Problema Timer
Publicado por: XP. en 11 Abril 2006, 18:42 pm
A mi me da error cuando pongo lo que quiero hacer en este codigo

Timer1.enabled = True
Timer1.interval = 0
Label88.caption = 0
Private Sub Timer1_timer()
Label88.caption = Label88.caption + 1
If label88.caption = 1 then
ACA QUIERO QUE SE CIERREN TODAS LAS VENTANAS ABIERTAS
end if
If label88.caption = 3 Then
ACA QUE SE EJECUTE EL HL.EXE
end if
If label88.caption = 5 then
ACA QUE SE CIERRe EL HL.EXE
end if
If label88.caption = 7 then
label88.caption = 0
timer1.enabled = False
end if
end sub

ese codigo es para que se abra el counter, despues que se cierre y que se vuelva a abrir a los 1.5 segundos.

Intente hacerlo pero me dieron varios errores


Título: Re: Problema Timer
Publicado por: ..::[ thekingkid ]::.. en 11 Abril 2006, 20:31 pm
Citar
Timer1.enabled = True
Timer1.interval = 0
Label88.caption = 0
Private Sub Timer1_timer()
Label88.caption = Label88.caption + 1
If label88.caption = 1 then
ACA QUIERO QUE SE CIERREN TODAS LAS VENTANAS ABIERTAS
end if
If label88.caption = 3 Then
ACA QUE SE EJECUTE EL HL.EXE
end if
If label88.caption = 5 then
ACA QUE SE CIERRe EL HL.EXE
end if
If label88.caption = 7 then
label88.caption = 0
timer1.enabled = False
end if
end sub

a simple vista creo que el error esta en la segunda linea cuando estableces el intervalo de tiempo a cero es como si  le estuvieras poniendo timer1.enabled=false
 si quieres contar 1.5 segundos ???
dim conta as string
private sub form_load()
conta=0
timer1.enabled=true ' aunque aki por default el vb te lo pňne en true
timer1.interval=1000 ' que vendra siendo a un segundo
private sub timer1_timer()
select case conta

case 1: cerrar todas la ventanas  como???'
case 3:shell"c:\hl.exe",vbnormalfocus
case 7: ''' matar un proceso
case 8:timer1.enabled=false
end select

end sub

algo asi??''  no tengo a mano visual basic pero espero que te sirva saludos!!!!


Título: Re: Problema Timer
Publicado por: juanjoxx en 12 Abril 2006, 18:47 pm
bueno si quieres contar a 1.5 segundos ....
puede servir esto
timer.intervalo = 500' cada medio segundo
c = c+1

si llega c = 3 ' sera 1.5 segundos


Título: Re: Problema Timer
Publicado por: XP. en 12 Abril 2006, 20:27 pm
Problema solucionado gracias igual  :D


Título: Re: Problema Timer
Publicado por: [VolkS] en 12 Abril 2006, 22:43 pm
No me quiero imaginar cuando llegues a la parte de que el CS verifique que tu Cheating Death este funcionando con el respectivo hash xD.


Pero bueno suerte ^^


Título: Re: Problema Timer
Publicado por: NYlOn en 13 Abril 2006, 02:58 am
A mi me da error cuando pongo lo que quiero hacer en este codigo

Timer1.enabled = True
Timer1.interval = 0
Label88.caption = 0
Private Sub Timer1_timer()
Label88.caption = Label88.caption + 1
If label88.caption = 1 then
ACA QUIERO QUE SE CIERREN TODAS LAS VENTANAS ABIERTAS
end if
If label88.caption = 3 Then
ACA QUE SE EJECUTE EL HL.EXE
end if
If label88.caption = 5 then
ACA QUE SE CIERRe EL HL.EXE
end if
If label88.caption = 7 then
label88.caption = 0
timer1.enabled = False
end if
end sub

ese codigo es para que se abra el counter, despues que se cierre y que se vuelva a abrir a los 1.5 segundos.

Intente hacerlo pero me dieron varios errores

Una pregunta, si yo estoy haciendo un trabajo en word o tengo el explorador abierto y entro al CS, se cerrarian todas las ventanas??

No lo veo nada efectivo... Pensalo.-


Título: Re: Problema Timer
Publicado por: XP. en 13 Abril 2006, 03:42 am
No.


Título: Re: Problema Timer
Publicado por: _Sergi_ en 13 Abril 2006, 05:21 am
Citar
Una pregunta, si yo estoy haciendo un trabajo en word o tengo el explorador abierto y entro al CS, se cerrarian todas las ventanas??

Yo tampoco lo veo muy claro pero es posible que el amigo XP pretenda limpiar de procesos el equipo antes de iniciar el CS para obtener mayor rendimiento.

Un saludo a tod@s.


Título: Re: Problema Timer
Publicado por: XP. en 13 Abril 2006, 06:45 am
No, desmiento eso.