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


Tema destacado: Estamos en la red social de Mastodon


  Mostrar Mensajes
Páginas: 1 ... 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 [940] 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 ... 1253
9391  Programación / Scripting / MOVIDO: Robot publicitario en pascal R-WEB [Aporte], (Aumenta tus visitas!) en: 17 Abril 2013, 18:29 pm
El tema ha sido movido a Programación General.
Delphi/Pascal no es un lenguaje interpretado :P.
http://foro.elhacker.net/index.php?topic=388274.0
9392  Programación / Scripting / [APORTE] [Inno Setup] Plantilla para usarla como script por defecto. en: 17 Abril 2013, 13:21 pm
A petición de un usuario aquí tienen la plantilla por defecto que uso para mis instaladores...


Setup.iss

Código
  1. ; = = = = = = = = = = = = = = = = = = =
  2. ; Default Template (by Elektro H@cker) |
  3. ;                                      |
  4. ;            InnoSetup 5.5.3           |
  5. ; = = = = = = = = = = = = = = = = = = =
  6.  
  7. [Setup]
  8.  
  9. ; Info
  10. ; ----
  11. #define Name "Application"
  12. #define Version "1.0"
  13. #define EXE "Application.exe"
  14. AppName={#Name}
  15. AppVersion={#Version}
  16. AppVerName={#Name} {#Version}
  17. AppCopyright=Elektro H@cker
  18. AppPublisher=Elektro H@cker
  19.  
  20. ; Paths
  21. ; -----
  22. DefaultDirName={pf}\{#Name}
  23. DefaultGroupName={#Name}
  24. OutputDir=.\Output\
  25. OutputBaseFilename={#Name}
  26. UninstallDisplayIcon={app}\{#EXE}
  27.  
  28. ; Resources
  29. ; ---------
  30. ;SetupIconFile=Icon.ico
  31. ;WizardImageFile=Icon.bmp
  32. ;WizardSmallImageFile=Icon.bmp
  33. ;InfoBeforeFile=Info.txt
  34.  
  35. ; Compression
  36. ; -----------
  37. Compression=lzma/ultra
  38. InternalCompressLevel=Ultra
  39. SolidCompression=True
  40.  
  41. ; Appearance
  42. ; ----------
  43. AlwaysShowComponentsList=False
  44. DisableDirPage=True
  45. DisableProgramGroupPage=True
  46. DisableReadyPage=True
  47. DisableStartupPrompt=True
  48. FlatComponentsList=False
  49. LanguageDetectionMethod=None
  50. PrivilegesRequired=PowerUser
  51. RestartIfNeededByRun=False
  52. ShowLanguageDialog=NO
  53. ShowTasksTreeLines=True
  54. Uninstallable=True
  55. ArchitecturesAllowed=x86 x64
  56. ;ArchitecturesInstallIn64BitMode=x64
  57.  
  58. [Languages]
  59. Name: spanish; MessagesFile: compiler:Languages\Spanish.isl
  60.  
  61. [Dirs]
  62. ;{sd}                  = C:\
  63. ;{commonappdata}       = C:\ProgramData
  64. ;{sd}\Users\{username} = C:\Users\UserName
  65. ;{userdesktop}         = C:\Users\UserName\Desktop
  66. ;{localappdata}        = C:\Users\UserName\AppData\Local
  67. ;{userappdata}         = C:\Users\UserName\AppData\Roaming
  68. ;{userstartmenu}       = C:\Users\UserName\AppData\Roaming\Microsoft\Windows\Start Menu
  69.  
  70. [Files]
  71. ;Source: {app}\*.*; DestDir: {app}; DestName:; Attribs:; Flags:;
  72. ;Attribs: ReadOnly Hidden System
  73. ;DestName: Example.exe
  74. ;Flags: 32bit 64bit Deleteafterinstall IgnoreVersion NoCompression Onlyifdoesntexist recursesubdirs uninsneveruninstall
  75.  
  76. [Registry]
  77. ;Root: HKCR; Subkey: SystemFileAssociations\.ext\Shell\OPTION; ValueName: Icon; ValueType: String; ValueData: {app}\{#Exe}; Flags: ;
  78. ;Root: HKCR; Subkey: SystemFileAssociations\.ext\Shell\OPTION\Command; ValueType: String; ValueData: """{app}\{#Exe}"" ""%1"""; Flags: ;
  79. ;Flags: uninsdeletevalue uninsdeletekey
  80.  
  81. [Tasks]
  82. ;Name: Identifier; Description: Title; GroupDescription: Group; Flags:;
  83. ;Flags: Unchecked
  84.  
  85. [Run]
  86. ;Filename: "{cmd}"; Parameters: "/C command"; StatusMsg: "Installing..."; Flags: RunHidden WaitUntilTerminated
  87. ;Filename: {app}\{#Exe}; Description: {cm:LaunchProgram,{#Nombre}}; Flags: NoWait PostInstall SkipIfSilent ShellExec Unchecked
  88. ;Flags: 32bit 64bit RunHidden WaitUntilTerminated NoWait PostInstall SkipIfSilent ShellExec Unchecked
  89.  
  90. [Icons]
  91. Name: {userstartmenu}\Programs\{#Name}; Filename: {app}\{#Exe}; Iconfilename: {app}\{#Exe}; WorkingDir: {app}
  92.  
  93. [Code]
  94.  
  95. const
  96.  Custom_Height = 440;
  97.  Custom_ProgressBar_Height = 20;
  98.  Page_Color = clwhite;
  99.  Page_Color_Alternative1 = clblack;
  100.  Page_Color_Alternative2 = clwhite;
  101.  Font_Color = clblack;
  102.  
  103.  
  104. var
  105.  DefaultTop,
  106.  DefaultLeft,
  107.  DefaultHeight,
  108.  DefaultBackTop,
  109.  DefaultNextTop,
  110.  DefaultCancelTop,
  111.  DefaultBevelTop,
  112.  DefaultOuterHeight: Integer;
  113.  
  114.  
  115. procedure InitializeWizard();
  116. begin
  117.  
  118.  DefaultTop := WizardForm.Top;
  119.  DefaultLeft := WizardForm.Left;
  120.  DefaultHeight := WizardForm.Height;
  121.  DefaultBackTop := WizardForm.BackButton.Top;
  122.  DefaultNextTop := WizardForm.NextButton.Top;
  123.  DefaultCancelTop := WizardForm.CancelButton.Top;
  124.  DefaultBevelTop := WizardForm.Bevel.Top;
  125.  DefaultOuterHeight := WizardForm.OuterNotebook.Height;
  126.  
  127.  
  128.  // Pages (Size)
  129.  WizardForm.Height := Custom_Height;
  130.  WizardForm.InnerPage.Height := WizardForm.InnerPage.Height + (Custom_Height - DefaultHeight);
  131.  WizardForm.LicensePage.Height := WizardForm.LicensePage.Height + (Custom_Height - DefaultHeight);
  132.  
  133.  
  134.  // Pages (Color)
  135.  WizardForm.color := Page_Color_Alternative1;
  136.  WizardForm.FinishedPage.Color  := Page_Color;
  137.  WizardForm.InfoAfterPage.Color := Page_Color;
  138.  WizardForm.InfoBeforePage.Color := Page_Color;
  139.  WizardForm.InnerPage.Color := Page_Color;
  140.  WizardForm.InstallingPage.color := Page_Color;
  141.  WizardForm.LicensePage.Color := Page_Color;
  142.  WizardForm.PasswordPage.color := Page_Color;
  143.  WizardForm.PreparingPage.color := Page_Color;
  144.  WizardForm.ReadyPage.Color := Page_Color;
  145.  WizardForm.SelectComponentsPage.Color  := Page_Color;
  146.  WizardForm.SelectDirPage.Color  := Page_Color;
  147.  WizardForm.SelectProgramGroupPage.color := Page_Color;
  148.  WizardForm.SelectTasksPage.color := Page_Color;
  149.  WizardForm.UserInfoPage.color := Page_Color;
  150.  WizardForm.WelcomePage.color := Page_Color;
  151.  
  152.  
  153.  // Controls (Size)
  154.  WizardForm.InfoAfterMemo.Height := (Custom_Height - (DefaultHeight / 2));
  155.  WizardForm.InfoBeforeMemo.Height := (Custom_Height - (DefaultHeight / 2));
  156.  WizardForm.InnerNotebook.Height :=  WizardForm.InnerNotebook.Height + (Custom_Height - DefaultHeight);
  157.  WizardForm.LicenseMemo.Height := WizardForm.LicenseMemo.Height + (Custom_Height - DefaultHeight);
  158.  WizardForm.OuterNotebook.Height := WizardForm.OuterNotebook.Height + (Custom_Height - DefaultHeight);
  159.  WizardForm.ProgressGauge.Height := Custom_ProgressBar_Height
  160.  WizardForm.ReadyMemo.Height := (Custom_Height - (DefaultHeight / 2));
  161.  WizardForm.Taskslist.Height := (Custom_Height - (DefaultHeight / 2));
  162.  WizardForm.WizardBitmapImage.Height := (Custom_Height - (DefaultHeight - DefaultBevelTop));
  163.  WizardForm.WizardBitmapImage2.Height  := (Custom_Height - (DefaultHeight - DefaultBevelTop));
  164.  
  165.  
  166.  // Controls (Location)
  167.  WizardForm.BackButton.Top := DefaultBackTop + (Custom_Height - DefaultHeight);
  168.  WizardForm.Bevel.Top := DefaultBevelTop + (Custom_Height - DefaultHeight);
  169.  WizardForm.CancelButton.Top := DefaultCancelTop + (Custom_Height - DefaultHeight);
  170.  WizardForm.LicenseAcceptedRadio.Top := WizardForm.LicenseAcceptedRadio.Top + (Custom_Height - DefaultHeight);
  171.  WizardForm.LicenseNotAcceptedRadio.Top := WizardForm.LicenseNotAcceptedRadio.Top + (Custom_Height - DefaultHeight);
  172.  WizardForm.NextButton.Top := DefaultNextTop + (Custom_Height - DefaultHeight);
  173.  WizardForm.Top := DefaultTop - (Custom_Height - DefaultHeight) div 2;
  174.  //WizardForm.ProgressGauge.Top := (DefaultHeight / 2)
  175.  
  176.  
  177.  // Controls (Back Color)
  178.  WizardForm.DirEdit.Color  := Page_Color_Alternative2;
  179.  WizardForm.GroupEdit.Color  := Page_Color_Alternative2;
  180.  WizardForm.InfoAfterMemo.Color := Page_Color_Alternative2;
  181.  WizardForm.InfoBeforeMemo.Color := Page_Color_Alternative2;
  182.  WizardForm.LicenseMemo.Color := Page_Color_Alternative2;
  183.  WizardForm.MainPanel.Color := Page_Color;
  184.  WizardForm.PasswordEdit.Color  := Page_Color_Alternative2;
  185.  WizardForm.ReadyMemo.Color := Page_Color_Alternative2;
  186.  WizardForm.Taskslist.Color := Page_Color;
  187.  WizardForm.UserInfoNameEdit.Color  := Page_Color_Alternative2;
  188.  WizardForm.UserInfoOrgEdit.Color  := Page_Color_Alternative2;
  189.  WizardForm.UserInfoSerialEdit.Color  := Page_Color_Alternative2;
  190.  
  191.  
  192.  // Controls (Font Color)
  193.  WizardForm.FinishedHeadingLabel.font.color  := Font_Color;
  194.  WizardForm.InfoafterMemo.font.Color  := Font_Color;
  195.  WizardForm.FinishedLabel.font.color  := Font_Color;
  196.  WizardForm.DirEdit.font.Color  := Page_Color_Alternative1;
  197.  WizardForm.Font.color := Font_Color;
  198.  WizardForm.GroupEdit.font.Color  := Page_Color_Alternative1;
  199.  WizardForm.InfoBeforeMemo.font.Color  := Page_Color_Alternative1;
  200.  WizardForm.LicenseMemo.font.Color  := Page_Color_Alternative1;
  201.  WizardForm.MainPanel.font.Color := Font_Color;
  202.  WizardForm.PageDescriptionLabel.font.color  := Font_Color;
  203.  WizardForm.PageNameLabel.font.color  := Font_Color;
  204.  WizardForm.PasswordEdit.font.Color  := Page_Color_Alternative1;
  205.  WizardForm.Taskslist.font.Color  := Font_Color;
  206.  WizardForm.UserInfoNameEdit.font.Color  := Page_Color_Alternative1;
  207.  WizardForm.UserInfoOrgEdit.font.Color  := Page_Color_Alternative1;
  208.  WizardForm.UserInfoSerialEdit.font.Color  := Page_Color_Alternative1;
  209.  WizardForm.WelcomeLabel1.font.color  := Font_Color;
  210.  WizardForm.WelcomeLabel2.font.color  := Font_Color;
  211.  WizardForm.ReadyMemo.font.Color := Page_Color_Alternative1;
  212.  
  213. end;


Este es el aspecto por defecto:




Y se puede customizar un poco el aspecto para conseguir algo parecido a esto, sólamente cambiando las variables de la plantilla...

[/code]
9393  Programación / Scripting / Re: Acciones sobre archivos de texto. [Batch] en: 17 Abril 2013, 00:42 am
pero a mi me cuesta mucho.

De lo que se trata es de aprender poco a poco, con ejemplos pero sin que te lo den todo hecho, yo ya te dí casi todo hecho, solo hay que colocar cada cosa en su sitio :P.

Intenta hacerlo y si aún no lo has conseguido postea el código que llevas y te lo corregiré en un minuti momento.

Un saludo.
9394  Programación / Programación General / Re: Modificar idiomas de .exe en: 17 Abril 2013, 00:25 am
aquí tienes un pequeñísimo ejemplo:

http://foro.elhacker.net/scripting/deshabilitar_pestana_procesos_del_administardor_de_tareas-t378796.0.html;msg1811891#msg1811891



Saludos
9395  Programación / Scripting / Re: Acciones sobre archivos de texto. [Batch] en: 17 Abril 2013, 00:18 am
Lo que quiero es que en la ventana cmd pueda escribir el texto a añadir a todas las lineas del texto.
El que tu me pones la ventana cmd me pide el nombre del archivo de texto.

La idea es que partiendo del archivo frutero.txt (u otro nombre) la ventana cmd pida el texto a añadir a las lineas de ese archivo de texto.

Fíjate en el código, puedes pedir el texto a introducir exáctamente de la misma manera que se puede pedir el archivo de texto en el script que te he puesto de ejemplo. Te quise poner un ejemplo de las dos maneras.

Código:
Set /P /?

Citar
El modificador /P permite establecer el valor de una variable para una línea
de entrada escrita por el usuario. Muestra la cadena del símbolo del sistema
antes de leer la línea de entrada. La cadena del símbolo del sistema puede
estar vacía.

Saludos!
9396  Informática / Software / Re: [APORTE] MEGA-PACK para iniciarse en VS2012 x64 (Instalador + Recursos + Tools) en: 17 Abril 2013, 00:02 am
¡ Llegó la nueva versión del instalador !

He corregido un error que sufrieron algunas personas con la carpeta de instalación del VS en la version antigua de este instalador...
Además lo he optimizado tanto en el sistema de la instalación de los componentes, como en su desinstalación... ...Y contiene más librerías, más controles, y más snippets!


La instalación completa y la instalación por defecto han sido testeadas en Windows 7 de 32 y 64 Bits, en Windows XP tampoco debería haber problemas.



LO PUEDEN DESCARGAR DE FORMA DIRECTA EN EL COMENTARIO PRINCIPAL DE ESTE HILO.



         
9397  Informática / Software / Re: [APORTE] MEGA-PACK para iniciarse en VS2012 x64 (Instalador + Recursos + Tools) en: 17 Abril 2013, 00:00 am
De nada, eh? xD

Me ha hecho mucha gracia el video, es un tutorial express xD

"...Y después de instalar esto le pinchamos aquí para abrir el .NET, que tarda unas 400 horas en abrirse, pero yo ya lo tenia abierto así que..." X'D

Gracias por el video.

PD: El idioma por defecto de la IDE es Inglés, para poder elegir Español (como comentas en tu tuto) hay que instalar el idioma español para la IDe (Que va incluida en el instalador).
9398  Programación / Scripting / Re: Acciones sobre archivos de texto. [Batch] en: 16 Abril 2013, 22:32 pm
...Es decir: Como añadir un string al final de cada línea de un archivo de texto.

Pues así:

Código
  1. @Echo OFF
  2. Title Frutero
  3.  
  4. Set /P "InputText=Arrastra el archivo de texto... >> "
  5. Set "String= tiene fruta"
  6. Call :Writter "%InputText%" "%String%" ".\Frutero.txt"
  7. Pause&Exit
  8.  
  9. :Writter
  10. ((FOR /F "Usebackq Tokens=*" %%@ IN ("%~1") DO (Echo %%@%~2)) > %3) & (GOTO:EOF)


Saludos!
9399  Programación / .NET (C#, VB.NET, ASP) / Re: Ayuda en ejercicio basico en: 16 Abril 2013, 20:20 pm
Te está diciendo que intentas usar una variable que no tiene ningún valor asignado.

Asígnale un valor, y listo:

Código
  1. float primernumero = 0;
  2. float segundonumero = 0;
  3. float resultado = 0;
  4. string operacion = null;

El ¿porque?, pues me imagino que porque C# es así de restrictivo, no sé, no manejo C#... :P

Saludos!
9400  Programación / .NET (C#, VB.NET, ASP) / Re: Problema accediendo a un objecto en un Form !! en: 16 Abril 2013, 20:12 pm
Reference to a non-shared member requires an object reference.

este es el error que me atormenta

Pues no tienes que atormentarte xD, simplemente declara las cosas como compartidas (Shared), y listo.

Ejemplo:

Código
  1. Public Class Class1
  2.  
  3.    Public Shared SharedVar As String = "Test" ' Esta la podrás leer
  4.    Public Var As String = "Test"' Esta no la podrás leer
  5.  
  6. End Class

Código
  1. Imports WindowsApplication1.Class1
  2.  
  3. Public Class Form1
  4.    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  5.        MsgBox(SharedVar) ' String: "Test"
  6.        MsgBox(Var) ' Exception: Reference to a non-shared member requires an object reference
  7.    End Sub
  8. End Class

Saludos!
Páginas: 1 ... 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 [940] 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 ... 1253
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines