Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Mensajes - MCKSys Argentina

#4231
Cita de: r7pyrred en 14 Enero 2013, 22:11 PM
y en carrera aprendes como programar para mp4¿?

¿ Te refieres al FORMATO mp4 ? Si es asi, no tienes idea de lo que estas preguntando. Un formato no es un lenguaje de programacion.

Te recomiendo pasar un tiempo evacuando dudas en wikipedia.
#4232
Foro Libre / Re: ¿Cuantos años teneis?
13 Enero 2013, 07:38 AM
Efectivamente, 36...  :)
#4233
Foro Libre / Re: ¿Cuantos años teneis?
13 Enero 2013, 03:29 AM
Cita de: dimitrix en 13 Enero 2013, 03:22 AM
A ojo digo 27?

Mmmmm nop...

Vas a tener que pasar por el oftalmólogo  :xD
#4234
Foro Libre / Re: ¿Cuantos años teneis?
13 Enero 2013, 03:09 AM
Hace 72 meses tuve la tercera parte del doble de la edad que tenía Nikola Tesla en 1901 (después del 10 de julio, por supuesto)

:P
#4235
Parece que te falta el + entre las referencias a los textboxes.
#4237
Y los orígenes de datos para VB los haz instalado?

MDAC: http://msdn.microsoft.com/en-us/data/aa937729.aspx

Saludos!
#4238
En qué lenguaje está hecho? Está empacado? Con qué packer?

El curso de ricnar te da lo básico. Una vez que lo termines, ya tienes una base desde la cual partir. No pienses que porque el curso no "te ha servido" hasta el momento, el resto del curso tampoco lo hará.

Mi mejor consejo es que lo termines. Después hay muchos tutoriales para seguir aprendiendo...  :P

Saludos!
#4239
Cita de: Elemental Code en 12 Enero 2013, 00:41 AM
Cometi el error de copypastear tu codigo en una CMD.
CUIDADO CON EL PESO DEL TXT!
:xD

Si, hice un par de pruebas mas y vi que puede obtenerse un archivo grande, aunque habría que hacer algunas comparativas para ver si el método conviene o no...

Ni bien tenga VB a mano, armo code y copio...

EDIT: Mi intento

Código (vb) [Seleccionar]

Option Explicit

Public Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
Public Declare Function GetTempFileName Lib "kernel32" Alias "GetTempFileNameA" (ByVal lpszPath As String, ByVal lpPrefixString As String, ByVal wUnique As Long, ByVal lpTempFileName As String) As Long
Public Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As String) As Long

Const sEmpty = ""
Const cMaxPath = 260
Const cmDbl = """"

Public Function getDeeperPath(Folder As String) As String
'Function does not check if Folder is a valid path name
'Folder must NOT end with backslash (\)

Dim tmpFilePath As String
Dim sComm As String
Dim taskId As Long
Dim sLine As String
Dim lDepth As Long
Dim mPaths() As String
Dim curDeeperFolder As String

tmpFilePath = GetTempFile

sComm = "cmd /c dir " + cmDbl + Folder + "\*" + cmDbl + " /ad /s /b > " + cmDbl + tmpFilePath + cmDbl

Err.Clear
On Error GoTo Hell

taskId = Shell(sComm, vbHide)

Do While FileLen(tmpFilePath) = 0
    DoEvents
Loop

lDepth = 0
curDeeperFolder = sEmpty
Open tmpFilePath For Input Access Read As #1
Do While Not EOF(1)
    Line Input #1, sLine
    If sLine <> sEmpty Then
        If InStr(1, sLine, "\") > 0 Then
            mPaths = Split(sLine, "\")
            If UBound(mPaths) > lDepth Then
                lDepth = UBound(mPaths)
                curDeeperFolder = sLine
            End If
        End If
    End If
Loop
Close #1
Kill tmpFilePath

getDeeperPath = curDeeperFolder
Exit Function
Hell:
    MsgBox "Error in getDeeperPath: " & Err.Description
End Function

Function GetTempDir() As String
Dim sRet As String, c As Long

sRet = String(cMaxPath, 0)
c = GetTempPath(cMaxPath, sRet)
'If c = 0 Then ApiRaise Err.LastDllError
GetTempDir = Left$(sRet, c)
End Function

Function GetTempFile(Optional Prefix As String, Optional PathName As String) As String
Dim sRet As String

If Prefix = sEmpty Then Prefix = sEmpty
If PathName = sEmpty Then PathName = GetTempDir
   
sRet = String(260, 0)
GetTempFileName PathName, Prefix, 0, sRet
'GetTempFile = GetFullPath(StrZToStr(sRet))
GetTempFile = StrZToStr(sRet)
End Function

' Strip junk at end from null-terminated string
Function StrZToStr(s As String) As String
    StrZToStr = Left$(s, lstrlen(s))
End Function
#4240
Tampoco tengo VB acá, pero se me ocurre hacer un comando dir, guardar el resultado en un txt y parsear lineas buscando la que tiene mas barras "\", osea, el path mas profundo.

El comando dir sería:


dir * /ad /s /b > c:\lista.txt


donde "c:\lista.txt" sería el path completo al archivo donde se guardan los dirs.
Despues se abre, se recorre linea 1 a 1 y se devuelve la mas profunda (contando las barras invertidas "\")

Si hago tiempo subo code.

Saludos!