Calculadora by Odraude

y programas personales para otros como tu, puede que te corrijan ;)
Responder
Odraude
Mensajes: 6
Registrado: 04 Mar 2010, 17:44

Calculadora by Odraude

Mensaje por Odraude »

Es una simple calculadora con las funciones más básicas
Está basada en una de la página de autoit inglesa.
Adjuntos
Calculadora.PNG
Calculadora.PNG (15.51 KiB) Visto 2745 veces
Calculadora by Odraude.zip
(329.26 KiB) Descargado 337 veces
Avatar de Usuario
XPyro
Profesional del Autoit
Mensajes: 542
Registrado: 04 Mar 2007, 10:12
Ubicación: México
Contactar:

Re: Calculadora by Odraude

Mensaje por XPyro »

Me gusto el diseño, igual el Skin, gracias por compartir el código :smt006
Imagen
Avatar de Usuario
Chefito
Profesional del Autoit
Mensajes: 2035
Registrado: 21 Feb 2008, 18:42
Ubicación: Albacete/Cuenca (España)

Re: Calculadora by Odraude

Mensaje por Chefito »

A mi también me gusta mucho el diseño :smt023 .

Lo que es el programa es un tanto simplillo :smt001 . Te animo a que por lo menos corrijas los errores que tiene, como que solo se puedan introducir números, que el error que sale cuando ha pasado algo desaparezca en tal que escribas algo, etc.

Saludos.
Cita vista en algún lugar de la red: En este mundo hay 10 tipos de personas, los que saben binario y los que no ;).
Avatar de Usuario
gna08
Hacker del Foro
Mensajes: 379
Registrado: 27 Sep 2008, 18:51
Ubicación: Cordoba, Argentina

Re: Calculadora by Odraude

Mensaje por gna08 »

Me encanto el diseño, excelente amigo, como hago si quiero obtener una raíz cubíca?
Saludos
Aunk no m Buskes, Seguro m enkontras!
Odraude
Mensajes: 6
Registrado: 04 Mar 2010, 17:44

Re: Calculadora by Odraude

Mensaje por Odraude »

para hacer una raiz cubica hay que elevar el numero a 1/3
Avatar de Usuario
Ximorro
Profesional del Autoit
Mensajes: 1500
Registrado: 10 Jul 2009, 12:35
Ubicación: Castellón, España

Re: Calculadora by Odraude

Mensaje por Ximorro »

¡Muy bien Odraude, voy a tener que mirar esta dll para skins porque haces cosas muy vistosas con ella!

Una sugerencia, cuando guardes archivos en el temporal (ya sea con FileInstall u otros métodos) queda mejor borrarlos cuando has acabado con ellos.
Puedes hacerlo fácilmente con FileDelete justo antes de finalizar el script.

Haces buenos GUIs para comandos de consola u adaptación de otros programas, te recomiendo lanzarte y empezar a hacer tus propios programas, o ve ampliando estos, que así también se aprende.
Por ejemplo coge el del lame.exe y hazle un GUI más completito, si le pones un buen grupito de opciones seguro que la gente lo usará normalmente.
Para practicar también puedes realizar la sugerencia que te hacía en el calculador de ecuaciones de segundo grado.

Cuando tengas dudas ya sabes dónde estamos ;-)
"¿Y no será que en este mundo hay cada vez más gente y menos personas?". Mafalda (Quino)
Odraude
Mensajes: 6
Registrado: 04 Mar 2010, 17:44

Re: Calculadora by Odraude

Mensaje por Odraude »

No pensaba que os gustaría tanto el Skin. :smt001

Os pongo el UDF completo del SkinCrafter sacado del foro inglés.

Código: Seleccionar todo

#cs ----------------------------------------------------------------------------
 AutoIt Version: 3.3.0.0
 Author:         Kenneth P. Morrissey (ken82m)

 UDF Function:   Enabled skinning of AutoIT GUI's using SkinCrafter
                (Tested with SkinCrafter 3.3.3)
                 
 Example
                #include <SkinCrafter.au3>
                _LoadSkinCrafter("SkinCrafterDLL.dll");Load SkinCrafter DLL

        ;GUI With Initial Skin
                $GUI_1 = GuiCreate("Test", -1, -1, 0, 0)
                _InitializeSkinCrafter($GUI_1, "ice-cold.skf")
                GUICtrlCreateButton("Test", 50, 50, 50)
                GUISetState()

        ;GUI With Additional Skin Loaded & Applied
                $GUI_2 = GuiCreate("Test2", -1, -1, 200, 0)
                GUICtrlCreateButton("Test", 10, 10, 50)
                _LoadSkin("skinastic.skf", 2)
                _ApplySkin($GUI_2, 2)
                GUISetState()

        ;GUI with no skin applied
                $GUI_3 = GuiCreate("Test3", -1, -1, 400, 0)
                GUICtrlCreateButton("Test", 10, 10, 50)
                _ExcludeSkin($GUI_3)
                GUISetState()

        ;GUI with initial skin automatically applied
                $GUI_4 = GuiCreate("Test4", -1, -1, 600, 0)
                GUICtrlCreateButton("Test", 10, 10, 50)
                GUISetState()

                While 1
                   If GuiGetMsg()=-3 Then Exit
                WEnd
#ce ----------------------------------------------------------------------------
Global $nSkinCrafterDll



#cs===================================================================================
 Fuction        _LoadSkinCrafter ( $nDLL ) 

 Description    Loads the SkinCrafter DLL into Memory
                This should be run before any GUI's are created.

 Parameter      $nDLL       The path to SkinCrafterDLL.dll

 Return         Success     1
                Failure     0   Sets @error:  1 - $nDLL   Does Not Exist
                                              2 - DLLOpen  Failed

 Author         Kenneth P. Morrissey (ken82m)
#ce===================================================================================
Func _LoadSkinCrafter($nDLL)
    $nSkinCrafterDll = DllOpen($nDLL)
    If Not FileExists($nDLL) Then
        SetError(1)
        Return 0
    EndIf
    If $nSkinCrafterDll = -1 Then
        SetError(2)
        Return 0
    EndIf
    DllCall($nSkinCrafterDll, "int:cdecl", "InitLicenKeys", "wstr","SKINCRAFTER", "wstr","SKINCRAFTER.COM", "wstr", "[email protected]","wstr","DEMOSKINCRAFTERLICENCE")
    DllCall($nSkinCrafterDll, "int:cdecl", "DefineLanguage", "int", 0)
    Return 1
EndFunc



#cs===================================================================================
 Fuction        _InitializeSkinCrafter ( $nHWND , $nSkin )

 Description    Load Initial Skin and Apply to GUI (Only Run ONCE)
                This should be run AFTER the GUI is created but BEFORE any controls.
                
                This skin will apply to all future GUI's by default.

 Parameter      $nHWND      Handle to the first GUI created
                $nSkin      Path to Skin File (SKF)

 Return         Success     1
                Failure     0   Sets @error:  1 - $nInitialGUI  Does Not Exist
                                              2 - $nSkin        Does Not Exist

 Author         Kenneth P. Morrissey (ken82m)
#ce===================================================================================
Func _InitializeSkinCrafter($nHWND, $nSkin)
    If Not WinExists($nHWND) Then
        SetError(1)
        Return 0
    EndIf
    If Not FileExists($nSkin) Then
        SetError(2)
        Return 0
    EndIf
    DllCall($nSkinCrafterDll, "int:cdecl", "InitDecoration", "int", 1)
    DllCall($nSkinCrafterDll, "int:cdecl", "LoadSkinFromFile", "wstr", $nSkin)
    DllCall($nSkinCrafterDll, "int:cdecl", "ApplySkin")
    DllCall($nSkinCrafterDll, "int:cdecl", "DecorateAs","long",$nHWND,"long",1)
    Return 1
EndFunc



#cs===================================================================================
 Fuction        _ApplySkin ( $nHWND , $nSkinID )

 Description    Load Initial Skin and Apply to GUI (Only Run ONCE)
                No restrictions, this can be run at any time during the script after InitializeSkinCrafter()

 Parameter      $nHWND      Handle to the first GUI created
                $nSkinID    ID of loaded skin to apply (Must be greater than 1)

 Return         Success     1
                Failure     0   Sets @error:  1 - $nHWND    Does Not Exist
                                              2 - $nSkinID  is invalid

 Author         Kenneth P. Morrissey (ken82m)
#ce===================================================================================
Func _ApplySkin($nHWND, $nSkinID)
    If Not WinExists($nHWND) Then
        SetError(1)
        Return 0
    EndIf
    If $nSkinID > 1 Then
        DllCall($nSkinCrafterDll, "int:cdecl", "ApplyAddedSkin","long",$nHWND,"long",$nSkinID)
        Return 1
    Else
        SetError(2)
        Return 0
    EndIf
EndFunc



#cs===================================================================================
 Fuction        _LoadSkin ( $nSkin , $nSkinID )

 Description    Load additional skin file.

 Parameter      $nSkin      Path to the skin file being loaded
                $nSkinID    ID to associate with the skin (Must be a number greater than 1)

 Return         Success     1
                Failure     0   Sets @error:  1 - $nSkin    Does Not Exist
                                              2 - $nSkinID  is Inavlid

 Author         Kenneth P. Morrissey (ken82m)
#ce===================================================================================
Func _LoadSkin($nSkin, $nSkinID)
    If Not FileExists($nSkin) Then
        SetError(1)
        Return 0
    EndIf
    If $nSkinID > 1 Then
        DllCall($nSkinCrafterDll, "int:cdecl", "AddSkinFromFile", "wstr", $nSkin, "short",$nSkinID)
        Return 1
    Else
        SetError(2)
        Return 0
    EndIf
EndFunc



#cs===================================================================================
 Fuction        _ExcludeSkin ( $nHWND )

 Description    Excludes a GUI from all loaded skins.

 Parameter      $nHWND      Handle to the GUI to exclude

 Return         Success     1
                Failure     0   Sets @error:  1 - $nHWND  Does Not Exist

 Author         Kenneth P. Morrissey (ken82m)
#ce===================================================================================
Func _ExcludeSkin($nHWND)
    If Not WinExists($nHWND) Then
        SetError(1)
        Return 0
    EndIf
    DllCall($nSkinCrafterDll, "int:cdecl", "ExcludeWnd", "long", $nHWND)
    Return 1
EndFunc
Si quereis mas Skins los podeis descargar de forma gratuita en la página oficial de SkinCrafter. http://www.skincrafter.com/skins
Responder