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

 

 


Tema destacado: Recuerda que debes registrarte en el foro para poder participar (preguntar y responder)


  Mostrar Temas
Páginas: 1 2 3 4 5 6 7 8 [9] 10 11 12 13
81  Programación / Scripting / Saveis si este codigo se puede utilizar para megavideo? en: 25 Marzo 2010, 01:13 am
Este codigo es util para controlar los videos en megavideo?.
Supuestamente es para youtube.



Código:
insertamos el video
<script type="text/javascript" src="swfobject.js"></script>
 <div id="ytapiplayer">
   Se necesita una versión de Flash Player superior a 8
y javascript, para ver este video.
 </div>

 <script type="text/javascript">

   var params = { allowScriptAccess: "always" };
   var atts = { id: "myytplayer" };
   swfobject.embedSWF("http://www.youtube.com/v/VIDEO_ID&enablejsapi=1&playerapiid=ytplayer",
                      "ytapiplayer", "425", "356", "8", null, null, params, atts);
 </script>



 function onYouTubePlayerReady(playerId) {
      ytplayer = document.getElementById("myytplayer");
    }






</script>

<a href="javascript:ytplayer.playVideo()">Reproducir</a>






fuente : http://www.polargeek.net/controlar-videos-de-youtube-con-javascript/


Ahi forma de hacerlo con megavideo?


82  Programación / Scripting / Manejar el reproductor de youtube desde javascript. Ayuda en: 24 Marzo 2010, 20:31 pm
Pues lo que intento hacer es que al picar en un boton el video se posicione a la mitad por ejemplo. Como podria hacer eso?
83  Programación / .NET (C#, VB.NET, ASP) / Como descargo un archivo de internet ( EN PARTES ). Alguien sabe? en: 24 Marzo 2010, 18:59 pm
Pues lo que dice mi titulo.

Quiero descargar un archivo diciendole en que parte del archivo ahi que empezar a descargar.

Alguna informacion?
84  Programación / .NET (C#, VB.NET, ASP) / Presionar boton de un programa externo. ( VB. Net ) en: 1 Marzo 2010, 15:11 pm
Necesito ejecutar un programa externo algo como process.start pero luego quiero presionar un boton que contiene el programa.

Necesito algo de informacion al respecto.
Cualquier comentario es bienvenido.
85  Programación / .NET (C#, VB.NET, ASP) / MSScriptControl en: 19 Febrero 2010, 20:37 pm
Tengo un codigo vbs y lo estoy ejecutando desde vb 2005 express con

MSScriptControl.ScriptControlClass

Me tira el error de que falta el objeto wscript

pero si lo ejecuto el vbs sin vb.net si funciona asi que creo que es cosa del vb 2005

Saveis que es lo que pasa?.
Por que no reconose a wscript?
86  Programación / Scripting / Ayuda con este codigo. error(WScript.scriptfullname) en: 19 Febrero 2010, 15:18 pm
Tengo este codigo y lo estoy ejecutando desde vb 2005 express.

Me tirava el error de que faltaba el objeto wscript asi que agregue esta linea:

Código:
Set Wscript = CreateObject("WScript.SHELL")

Pero ahora me tira otro error en esta linea
Código:
wscript.scriptfullname

Al pareser no es miembro de wscript, Saveis que es lo que pasa?.
Por que no reconose a wscript?
Que tipo de objeto debo crear?

Código:
'RunAs Admin!
Set Wscript = CreateObject("WScript.SHELL")

If IsAdmin() = False Then
 
  Set objShell = CreateObject("Shell.Application")
  objShell.ShellExecute "wscript.exe", Chr(34) & _
  Wscript.ScriptFullName & Chr(34), "", "runas", 1
  Wscript.Quit 0
msgbox()
End If


'Remove any previous instances and install a fresh version
'Run("cscript uninstall_tap.vbs uac")
driver = ScriptPath() & "Windows_" & GetOSArchitecture()
driverhelper = Chr(34) & driver & "/driverhelper.exe" & Chr(34)
inf = Chr(34) & driver & "/IpopTap.inf" & Chr(34)
Run(driverhelper & " Install " & inf & " IpopTap")

res = Run(driverhelper & " Status IpopTap")
'Make sure the device is installed and that it has the correct name!
If ChangeNetworkName(res, "tapipop") = 0 Then
  Wscript.Echo "Installation Successful!"
Else
  Wscript.Echo "Installation Failed!  Please uninstall and then reinstall again."
End If

'Changes the Network Name given a PnpInstanceID
'Note:  Windows does a poor job of cleanup and often times, uninstalled devices will have
'  the PnpInstanceID of running devices.  Because of this, all devices with a given
'  PnpInstanceId will be renamed
Function ChangeNetworkName(pnpInstanceID, name)
  Const HKEY_LOCAL_MACHINE = &H80000002
  Const NETWORK_CONNECTIONS = "SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}"
  Dim oReg, path
  Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
  oReg.EnumKey HKEY_LOCAL_MACHINE, NETWORK_CONNECTIONS, arrSubKeys
  Set WshShell = WScript.CreateObject("WScript.Shell")
  ChangeNetworkName = 1
  For Each subkey In arrSubKeys
    path = "HKLM\" & NETWORK_CONNECTIONS & "\" & subkey & "\Connection\"
    'Turn error reporting off
    On Error Goto 0
    On Error Resume Next
    id = wshShell.RegRead(path & "PnpInstanceID")
    If id = pnpInstanceID Then
      wshShell.RegWrite path & "Name", name
      ChangeNetworkName = 0
      Exit For
    End If
  Next
End Function

'Executes the app and returns the first line from StdOut
Function Run(app)
  Dim oExec, WshShell
  Set WshShell = CreateObject("Wscript.Shell")
  Set oExec = WshShell.Exec(app)

  Do While oExec.Status = 0
  Loop
  Run = OExec.StdOut.ReadLine()
End Function

'Returns 32 or 64 for the OS Architecture
Function GetOSArchitecture()
  GetOSArchitecture = "64"
  On Error Goto 0
  On Error Resume Next
  Set WshShell = WScript.CreateObject("WScript.Shell")
  Const KEY = "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE"
  arch =  WshShell.RegRead(KEY)
  If arch = "x86" Then
    GetOSArchitecture = "32"
  End If
End Function

Function ScriptPath()
  ScriptPath = Left(WScript.ScriptFullName, _
    Len(WScript.ScriptFullName) - Len(WScript.ScriptName))
End Function

Function IsAdmin()
  IF Instr(1, "XP", Run("%comspec% /c ver | findstr XP"), 0) = 0 Then
    IsAdmin = True
    Exit Function
  End If

  'Check for elevated
  IsAdmin = RunCleanExit("%comspec% /c whoami /all | findstr /I /C:""S-1-16-12288""")
End Function

Function RunCleanExit(app)
  RunCleanExit = False
  Set oShell = CreateObject("WScript.Shell")
  Set oExec = oShell.Exec(app)

  Do While oExec.Status = 0
  Loop
  If oExec.ExitCode = 0 Then
    RunCleanExit = True
  End If
End Function
87  Programación / .NET (C#, VB.NET, ASP) / Activar javascript en vb.net en: 17 Febrero 2010, 10:40 am
Alguien save como activar javascript mediante codigo?.
O agregar mi pagina a sitios de confianza? o otra forma de crear un archivo en el cliente sin que pida permiso?.

Sugerencias...
88  Programación / .NET (C#, VB.NET, ASP) / Guardar el contenido de un textbox en la configuracion de la aplicacion. (vb.ne) en: 16 Febrero 2010, 21:43 pm
Hola gente.
Estoy intentando guardar en la configuracion de la aplicacion un textbox, pero nada de nada.
Con el checkbox si lo consegui de esta forma.
Código:
my.settings.checkbox = my.checkbox1.checked

y lo cargo en el load del formulario asi
Código:
my.checkbox1.checked = my.settings.checkbox
Todo esto declarando my.settings.checkbox como boolean.

El problema ahora es el textbox, lo declaro como string y guardo la configuracion asi:
Código:
my.settings.textbox1 = my.textbox1.text

Y lo cargo al inicio asi:
Código:
my.textbox1.text = my.settings.textbox1

Pero nada de nada. Alguien save que puede estar pasando?.
89  Programación / .NET (C#, VB.NET, ASP) / tabcontrol (vb.net). Cambiar de tab mediante codigo. en: 7 Febrero 2010, 22:59 pm
La cuestion es que necesito que al picar en el tab2 examine aver si existe un archivo y si no existe pues vuelbe al tab1 y si existe pues se keda en el tab2.

Saveis como llamo nuevamente al tab1?.

Código:
   Private Sub TabPage2_HandleCreated(ByVal sender As Object, ByVal e As     System.EventArgs) Handles TabPage2.HandleCreated
        If File.Exists("c:\fichero.txt") Then
            MsgBox("Existe", MsgBoxStyle.Information)
        Else

           'Aqui va el codigo que llama al tab1 nuevamente. pero como lo llamo?
        End If
    End Sub


Intente con tab1.select(). Pero nada
90  Programación / PHP / Llamar a una funcion javascript desde un href de php. en: 7 Febrero 2010, 13:00 pm
Esta es la funcion a la que quiero llamar:

Código:
function fwrite_x(folder,filename,data,mode){ //fwrite_x v1.0 byScriptman
//modes: 0:si no existe, regresa false ;1: sobreescribe; 2:append.
filename=folder+filename;
if(fso.FileExists(filename) == false&&mode==0) return false;
if(fso.FileExists(filename) != false&&mode==2) {
tf = fso.OpenTextFile(filename,1);
var dataold = tf.readall(); tf.close(); }
else dataold="";
var tf = fso.CreateTextFile(filename,2);
tf.write(dataold+data);
tf.close();
return true;
}


y la quiero llamar desde aqui:

Código:
echo "<a class=\"toplinkbox\" href=\"javascript:fwrite_x("c:\","archivo.txt","Prueba de escritura",2);"><b>$customtitle</b></a>";



Saveis que estoy haciendo mal?
Páginas: 1 2 3 4 5 6 7 8 [9] 10 11 12 13
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines