Jump to content

Help to enter password to my code - (Moved)


Recommended Posts

Good evening I am new to programming with AutoIt however I have proposed many projects in this case I already have my code completed and it works correctly but I cannot find a way to assign a password and I try various options but it does not work could you help me please

 

 

#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
#include <GUIConstants.au3>
#include <WindowsConstants.au3>




; Botones
Dim $Cban, $Cei, $Fav, $Sent, $Cabe, $Dirtv, $Bonu, $TM, $Pass, $OK, $Exit

;Ventanas

Dim  $VPinc, $VCban, $VCei, $VFav, $VSent, $VCaribe, $VDirectv, $Vbonus, $VTM, $Vcont

;Boton Atras
Dim $Atras, $Atras1, $Atras2, $Atras3, $Atras4, $Atras5,$Atras6,$Atras7

;Botones Copiar
Dim $copi,  $copi1,  $copi2,  $copi3,  $copi4,  $copi5,  $copi6,  $copi7, $copi8, $copi9, $copi10, $copi11, $copi12
Dim $copi12, $copi13, $copi14, $copi15, $copi16, $copi17, $copi18, $copi19, $copi20,$copi21,$copi22,$copi23


Dim $Imf  = "00000000000"
Dim $Imf1 = "00000000000"
Dim $Imf2 = "00000000000"
Dim $Imf3 = "00000000000"
Dim $Imf4 = "00000000000"
Dim $imf11= "00000000000"
Dim $imf12= "00000000000"

Dim $Imf17= "00000000000"
Dim $Imf18= "00000000000"
Dim $Imf19= "00000000000"
Dim $Imf20= "00000000000 "

Dim $Imf21= "00000000000"
Dim $Imf22= "00000000000"


;Imformacion
Dim $Imf5 = "00000000000"
Dim $Imf6 = "00000000000"
;Imformacion
Dim $Imf7 = "00000000000"
Dim $Imf8 = "00000000000"
;Imformacion
Dim $Imf9 = "00000000000"
Dim $Imf10 = "00000000000"
;Imformacion
Dim $imf13 = "00000000000"
Dim $imf14 = "00000000000"
Dim $imf15 = "00000000000"
Dim $imf16 = "00000000000"
Dim $imf23 = "00000000000"



;Funciones Principales
Prin ()
Cuentas ()
Correo ()
Seniat ()
Faov ()
Bancaribe ()
Bonus ()
AirTm ()
Directv ()




GUISetState(@SW_HIDE,$VCban)
GUISetState(@SW_HIDE,$VCei)
GUISetState(@SW_HIDE,$VFav)
GUISetState(@SW_HIDE,$VSent)
GUISetState(@SW_HIDE,$VCaribe)
GUISetState(@SW_HIDE,$VBonus)
GUISetState(@SW_HIDE,$VTM)
GUISetState(@SW_HIDE,$VDirectv)

Selec ()
Func Selec ()
        while 1
        $msg=GUIGetMsg()
        Select
               Case $msg=$GUI_EVENT_CLOSE
                    $x = 1
               if WinActive($VPinc) and $x = 1 then
                  ExitLoop
               endif
               if WinActive($VCban) then
                    GUISetState(@SW_HIDE,$VCban)
                    GUISetState(@SW_SHOW,$VPinc)
                    $x = 0
                endif
                if WinActive($VCei) then
                    GUISetState(@SW_HIDE,$VCei)
                    GUISetState(@SW_SHOW,$VPinc)
                    $x = 0
                endif
                  if WinActive($VFav) then
                    GUISetState(@SW_HIDE,$VFav)
                    GUISetState(@SW_SHOW,$VPinc)
                    $x = 0
                 endif
                  if WinActive($VSent) then
                    GUISetState(@SW_HIDE,$VSent)
                    GUISetState(@SW_SHOW,$VPinc)
                    $x = 0
                 endif
                if WinActive($VBonus) then
                    GUISetState(@SW_HIDE,$VBonus)
                    GUISetState(@SW_SHOW,$VCban)
                    $x = 0
                 endif
                if WinActive($VTM) then
                    GUISetState(@SW_HIDE,$VTM)
                    GUISetState(@SW_SHOW,$VCban)
                    $x = 0
                 endif
                if WinActive($VCaribe) then
                    GUISetState(@SW_HIDE,$VCaribe)
                    GUISetState(@SW_SHOW,$VCban)
                    $x = 0
                 endif
                 if WinActive($VDirectv) then
                    GUISetState(@SW_HIDE,$VDirectv)
                    GUISetState(@SW_SHOW,$VPinc)
                    $x = 0
                 endif


 Case $msg = $Cban
                IniWrite("Data\OPT.INI", "GENERAL", "BUTTON", "1")
                GUISetState(@SW_HIDE,$VPinc)
                Cuentas()
 Case $msg = $Cei
                IniWrite("Data\OPT.INI", "GENERAL", "BUTTON", "2")
                GUISetState(@SW_HIDE,$VPinc)
                Correo()
 Case $msg = $Fav
                IniWrite("Data\OPT.INI", "GENERAL", "BUTTON", "3")
                GUISetState(@SW_HIDE,$VPinc)
                Faov()
 Case $msg = $Sent
                IniWrite("Data\OPT.INI", "GENERAL", "BUTTON", "4")
                GUISetState(@SW_HIDE,$VPinc)
                Seniat()
 Case $msg = $Cabe
                IniWrite("Data\OPT.INI", "GENERAL", "BUTTON", "5")
                GUISetState(@SW_HIDE,$VCban)
                Bancaribe()
Case $msg = $Bonu
                IniWrite("Data\OPT.INI", "GENERAL", "BUTTON", "6")
                GUISetState(@SW_HIDE,$VCban)
                Bonus()
 Case $msg = $TM
                IniWrite("Data\OPT.INI", "GENERAL", "BUTTON", "7")
                GUISetState(@SW_HIDE,$VCban)
                AirTm()
 Case $msg = $Dirtv
                IniWrite("Data\OPT.INI", "GENERAL", "BUTTON", "8")
                GUISetState(@SW_HIDE,$VPinc)
                Directv()



 Case $msg=$Atras
                GUISetState(@SW_HIDE,$VCban)
                GUISetState(@SW_SHOW,$VPinc)
 Case $msg=$Atras1
                GUISetState(@SW_HIDE,$VCaribe)
                GUISetState(@SW_SHOW,$VCban)
 Case $msg=$Atras2
                GUISetState(@SW_HIDE,$VCei)
                GUISetState(@SW_SHOW,$VPinc)
 Case $msg=$Atras3
                GUISetState(@SW_HIDE,$VFav)
                GUISetState(@SW_SHOW,$VPinc)
 Case $msg=$Atras4
                GUISetState(@SW_HIDE,$VSent)
                GUISetState(@SW_SHOW,$VPinc)
 Case $msg=$Atras5
                GUISetState(@SW_HIDE,$VDirectv)
                GUISetState(@SW_SHOW,$VPinc)
  Case $msg=$Atras6
                GUISetState(@SW_HIDE,$VBonus)
                GUISetState(@SW_SHOW,$VCban)
  Case $msg=$Atras7
                GUISetState(@SW_HIDE,$VTM)
                GUISetState(@SW_SHOW,$VCban)
  Case $msg=$Copi
                ClipPut ($Imf)
  Case $msg=$Copi1
                ClipPut ($Imf1)
  Case $msg=$Copi2
                ClipPut ($Imf2)
  Case $msg=$Copi3
                ClipPut ($Imf3)
  Case $msg=$Copi4
                ClipPut ($Imf4)
  Case $msg=$Copi5
                ClipPut ($Imf5)
  Case $msg=$Copi6
                ClipPut ($Imf6)
  Case $msg=$Copi7
                ClipPut ($Imf7)
  Case $msg=$Copi8
                ClipPut ($Imf8)
  Case $msg=$Copi9
                ClipPut ($Imf9)
  Case $msg=$Copi10
                ClipPut ($Imf10)
  Case $msg=$Copi11
                ClipPut ($Imf11)
  Case $msg=$Copi12
                ClipPut ($Imf12)
  Case $msg=$Copi13
                ClipPut ($Imf13)
  Case $msg=$Copi14
                ClipPut ($Imf14)
  Case $msg=$Copi15
                ClipPut ($Imf15)
  Case $msg=$Copi16
                ClipPut ($Imf16)
  Case $msg=$Copi17
                ClipPut ($Imf17)
  Case $msg=$Copi18
                ClipPut ($Imf18)
  Case $msg=$Copi19
                ClipPut ($Imf19)
  Case $msg=$Copi20
                ClipPut ($Imf20)
  Case $msg=$Copi21
                ClipPut ($Imf21)
  Case $msg=$Copi22
                ClipPut ($Imf22)
  Case $msg=$Copi23
                ClipPut ($Imf23)
EndSelect
    WEnd
 EndFunc




 Func Prin ()
;ventana Principal
$VPinc = GUICreate("Imformacion de Cuentas", 490, 122, -1, -1, $WS_POPUP)
;Selecciones del menu
$Cban = GUICtrlCreateButton("Cuentas Bancarias", 16, 30, 73, 60, $BS_MULTILINE)
GUICtrlSetFont(-1, 10, 500, 2, "Times New Roman")
GUICtrlSetCursor (-1, 0)
$Cei = GUICtrlCreateButton("Correo elctronico", 112, 30, 73, 60, $BS_MULTILINE)
GUICtrlSetFont(-1, 10, 500, 2, "Times New Roman")
GUICtrlSetCursor (-1, 0)
$Fav = GUICtrlCreateButton("Faov", 208, 30, 73, 60, $BS_MULTILINE)
GUICtrlSetFont(-1, 10, 500, 2, "Times New Roman")
GUICtrlSetCursor (-1, 0)
$Sent = GUICtrlCreateButton("Seniat ", 304, 30, 73, 60, $BS_MULTILINE)
GUICtrlSetFont(-1, 10, 500, 2, "Times New Roman")
GUICtrlSetCursor (-1, 0)
$Dirtv = GUICtrlCreateButton("Directv ", 400, 30, 73, 60, $BS_MULTILINE)
GUICtrlSetFont(-1, 10, 500, 2, "Times New Roman")
GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW,$VPinc)
EndFunc


Func Cuentas()
$VCban = GUICreate("Cuentas Bancarias", 150, 500, -1, -1, $WS_POPUP)
$Cabe = GUICtrlCreateButton("Bancaribe", 37, 30, 80, 60, $BS_MULTILINE)
GUICtrlSetFont(-1, 12, 500, 2, "Times New Roman")
$Bonu = GUICtrlCreateButton("Bonus", 37, 100, 80, 60, $BS_MULTILINE)
GUICtrlSetFont(-1, 12, 500, 2, "Times New Roman")
$TM = GUICtrlCreateButton("AirTm", 37, 170, 80, 60, $BS_MULTILINE)
GUICtrlSetFont(-1, 12, 500, 2, "Times New Roman")
$Atras= GUICtrlCreateButton("Atras", 35, 450, 90, 30)
GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW,$VCban)
EndFunc

Func Bancaribe()
 $VCaribe = GUICreate("Bancaribe", 500, 700, -1, -1, $WS_SYSMENU)
            GUICtrlCreateLabel("Numero de Cuenta:", 10, 20, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 22, 200, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
    $copi = GUICtrlCreateButton("Copiar", 390, 21, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Numero de Tarjeta:", 10, 50, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 52, 200, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
   $copi1 = GUICtrlCreateButton("Copiar", 390, 51, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Pin de tres digitos:", 10, 80, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 82, 100, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
   $copi2 = GUICtrlCreateButton("Copiar", 390, 81, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Valid from:0000", 70, 120, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("Valid Thru:000", 300, 120, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")

            GUICtrlCreateLabel("Conexion Bancaribe", 180, 180, 200, 30)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

            GUICtrlCreateLabel("Usuario:", 10, 240, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 240, 200, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
   $copi3 = GUICtrlCreateButton("Copiar", 390, 241, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Contraseña:", 10, 270, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 270, 200, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
   $copi4 = GUICtrlCreateButton("Copiar", 390, 271, 80, 20)
            GUICtrlSetCursor (-1, 0)


  $Atras1 = GUICtrlCreateButton("Atras", 215, 620, 90, 30)
            GUICtrlSetCursor (-1, 0)

GUISetState(@SW_SHOW,$VCaribe)

     EndFunc


Func Bonus()
 $VBonus = GUICreate("Bonus", 500, 300, -1, -1, $WS_SYSMENU)

            GUICtrlCreateLabel("Numero de Tarjeta:", 10, 50, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 52, 200, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
   $copi17 = GUICtrlCreateButton("Copiar", 390, 51, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Pin de siete digitos:", 10, 80, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 82, 100, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
   $copi18 = GUICtrlCreateButton("Copiar", 390, 81, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Conexion Bonus", 175, 110, 200, 30)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

            GUICtrlCreateLabel("Usuario:", 10, 140, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 142, 200, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
   $copi19 = GUICtrlCreateButton("Copiar", 390, 141, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Contraseña:", 10, 170, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 172, 200, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
   $copi20 = GUICtrlCreateButton("Copiar", 390, 171, 80, 20)
            GUICtrlSetCursor (-1, 0)


  $Atras6 = GUICtrlCreateButton("Atras", 215, 230, 90, 30)
            GUICtrlSetCursor (-1, 0)

        GUISetState(@SW_SHOW,$VBonus)
EndFunc

Func AirTm()
$VTM = GUICreate("AirTm", 400, 190, -1, -1, $WS_SYSMENU)
            GUICtrlCreateLabel("Usuario AirTm", 130, 15, 300, 30)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

            GUICtrlCreateLabel("Usuario:", 10, 50, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 100, 50, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
   $copi21 = GUICtrlCreateButton("Copiar", 310, 51, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Contraseña:", 10, 80, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 100, 80, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
   $copi22 = GUICtrlCreateButton("Copiar", 310, 81, 80, 20)
            GUICtrlSetCursor (-1, 0)

$Atras7 = GUICtrlCreateButton("Atras", 150, 120, 90, 30)
          GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW,$VTM)
EndFunc


Func Correo()
$VCei = GUICreate("Correo Electronico", 400, 150, -1, -1, $WS_POPUP)
            GUICtrlCreateLabel("Correo Electronico", 130, 15, 300, 30)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

            GUICtrlCreateLabel("Usuario:", 10, 50, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 100, 50, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
   $copi5 = GUICtrlCreateButton("Copiar", 310, 51, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Contraseña:", 10, 80, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 100, 80, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
   $copi6 = GUICtrlCreateButton("Copiar", 310, 81, 80, 20)
            GUICtrlSetCursor (-1, 0)

$Atras2 = GUICtrlCreateButton("Atras", 130, 110, 90, 30)
          GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW,$VCei)
EndFunc

Func Faov()
$VFav = GUICreate("Faov", 300, 150, -1, -1, $WS_POPUP)
            GUICtrlCreateLabel("Usuario FAOV", 108, 15, 150, 30)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

            GUICtrlCreateLabel("Usuario:", 10, 50, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 100, 50, 100, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
   $copi7 = GUICtrlCreateButton("Copiar", 210, 51, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Contraseña:", 10, 80, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 100, 80, 100, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
   $copi8 = GUICtrlCreateButton("Copiar", 210, 81, 80, 20)
            GUICtrlSetCursor (-1, 0)

$Atras3 = GUICtrlCreateButton("Atras", 109, 110, 90, 30)
          GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW,$VFav)
EndFunc

Func Seniat()
$VSent = GUICreate("Seniat", 300, 150, -1, -1, $WS_POPUP)
            GUICtrlCreateLabel("Usuario Seniat", 108, 15, 150, 30)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

            GUICtrlCreateLabel("Usuario:", 10, 50, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 100, 50, 100, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
   $copi9 = GUICtrlCreateButton("Copiar", 210, 51, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Contraseña:", 10, 80, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 100, 80, 100, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  $copi10 = GUICtrlCreateButton("Copiar", 210, 81, 80, 20)
            GUICtrlSetCursor (-1, 0)

$Atras4 = GUICtrlCreateButton("Atras", 109, 110, 90, 30)
          GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW,$VSent)
EndFunc


Func Directv()
$VDirectv = GUICreate("Directv", 500, 280, -1, -1, $WS_POPUP)
            GUICtrlCreateLabel("Usuario Directv", 190, 15, 150, 30)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

            GUICtrlCreateLabel("Usuario:", 10, 50, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 150, 50, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  $copi13 = GUICtrlCreateButton("Copiar", 400, 44, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Contraseña:", 10, 80, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 150, 80, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  $copi14 = GUICtrlCreateButton("Copiar", 400, 74, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Numero de Tarjeta:", 10, 120, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 150, 120, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  $copi15 = GUICtrlCreateButton("Copiar", 400, 115, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Numero de Cedula:", 10, 150, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 150, 150, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  $copi16 = GUICtrlCreateButton("Copiar", 400, 145, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Numero de Cliente:", 10, 180, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 150, 180, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  $copi23 = GUICtrlCreateButton("Copiar", 400, 180, 80, 20)
            GUICtrlSetCursor (-1, 0)

$Atras5 = GUICtrlCreateButton("Atras", 200, 230, 90, 30)
          GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW,$VDirectv)
EndFunc

 

Link to post
Share on other sites
1 hour ago, Hemrry said:

I cannot find a way to assign a password

Do you mean something like this (I still suffer from a hangover ;)) :

#include <GUIConstantsEx.au3>
#include <EditConstants.au3>

GUICreate("Password GUI", 500, 150)
Local $idInput = GUICtrlCreateInput("Password", 20, 30, 200, 30, BitOR($ES_PASSWORD, $GUI_SS_DEFAULT_INPUT))
Local $idOK    = GUICtrlCreateButton("OK", 240, 30, 60, 30)
GUISetState(@SW_SHOW, "Password GUI")
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            GUISetState(@SW_HIDE, "Password GUI")
            ExitLoop
        Case $idOK
            MsgBox(4160, "Info  : ", "Password = " & GUICtrlRead($idInput) & @CRLF)
    EndSwitch
WEnd

 

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to post
Share on other sites
9 minutes ago, Aelc said:

@Musashi well i was thinking about what he means, too :D  Actually i didn't found any input in his script... so i was wondered 

I was just guessing, too :lol:. Let's wait and see if this is the solution that @Hemrry is looking for.

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to post
Share on other sites
7 hours ago, Musashi said:

Do you mean something like this (I still suffer from a hangover ;)) :

#include <GUIConstantsEx.au3>
#include <EditConstants.au3>

GUICreate("Password GUI", 500, 150)
Local $idInput = GUICtrlCreateInput("Password", 20, 30, 200, 30, BitOR($ES_PASSWORD, $GUI_SS_DEFAULT_INPUT))
Local $idOK    = GUICtrlCreateButton("OK", 240, 30, 60, 30)
GUISetState(@SW_SHOW, "Password GUI")
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            GUISetState(@SW_HIDE, "Password GUI")
            ExitLoop
        Case $idOK
            MsgBox(4160, "Info  : ", "Password = " & GUICtrlRead($idInput) & @CRLF)
    EndSwitch
WEnd

 

Sorry I speak Spanish and I don't write English very well, I'm looking for something like that but I can't figure out how to integrate it since it gives me an error when compiling I came up with this one but I present the same problem

 

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>

Dim $Pass

Contra()
Func Contra()
$Vcont = GUICreate("Login", 220, 100, -1, -1,$WS_POPUP)
$Pass = GUICtrlCreateInput("",10,40,-1,-1,$ES_PASSWORD)
 GUICtrlCreateLabel("Ingrese su contraseña", 55, 20, 150, 20)
$OKbutton = GUICtrlCreateButton("Login",110,70,100)
$Exit = GUICtrlCreateButton("Exit",10,70,100)
GUISetState(@SW_SHOW,$Vcont)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE or $msg = $Exit
            Exit
        Case $msg = $OKbutton
            _login()
    EndSelect
WEnd
EndFunc




func _login()
$PasswordInput = GUICtrlRead($Pass)
if $PasswordInput = "lock" Then
MsgBox(0,"ERROR","Bienvenido")
 Else
     MsgBox(0,"ERROR","Por favor Ingrese su Contraseña")

EndIf
EndFunc

 

Link to post
Share on other sites
2 hours ago, Hemrry said:

since it gives me an error when compiling

Can you please post the error message (console output of SciTE Editor)

For me, this works :

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>

Local $idPass

Contra()

Func Contra()
    $Vcont = GUICreate("Login", 220, 100, -1, -1, $WS_POPUP)
    $idPass = GUICtrlCreateInput("", 10, 40, -1, -1, BitOR($ES_PASSWORD, $GUI_SS_DEFAULT_INPUT))
    GUICtrlCreateLabel("Ingrese su contraseña", 55, 20, 150, 20)
    $OKbutton = GUICtrlCreateButton("Login", 110, 70, 100)
    $Exit = GUICtrlCreateButton("Exit", 10, 70, 100)
    GUISetState(@SW_SHOW, $Vcont)

    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE Or $msg = $Exit
                Exit
            Case $msg = $OKbutton
                _login()
        EndSelect
    WEnd
EndFunc   ;==>Contra

Func _login()
    ConsoleWrite("_login " & GUICtrlRead($idPass) & @CRLF) ; *** just for test
    $PasswordInput = GUICtrlRead($idPass)
    If $PasswordInput = "lock" Then
        MsgBox(0, "ERROR", "Bienvenido")
    Else
        MsgBox(0, "ERROR", "Por favor Ingrese su Contraseña")
    EndIf
EndFunc   ;==>_login

Example : Output of errors in the SciTE Editor console :

Console.jpg.cadf6da7ff4befc298144538f259e88f.jpg

 

Edited by Musashi

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to post
Share on other sites

Good night thanks for the help Musashi, it is not an error like so in the console but when entering the password the program starts me but it does not allow me to list any selections

#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
#include <GUIConstants.au3>
#include <WindowsConstants.au3>




; Botones
Dim $Cban, $Cei, $Fav, $Sent, $Cabe, $Dirtv, $Bonu, $TM, $Pass, $OK, $Exit

;Ventanas

Dim  $VPinc, $VCban, $VCei, $VFav, $VSent, $VCaribe, $VDirectv, $Vbonus, $VTM, $Vcont

;Boton Atras
Dim $Atras, $Atras1, $Atras2, $Atras3, $Atras4, $Atras5,$Atras6,$Atras7

;Botones Copiar
Dim $copi,  $copi1,  $copi2,  $copi3,  $copi4,  $copi5,  $copi6,  $copi7, $copi8, $copi9, $copi10, $copi11, $copi12
Dim $copi12, $copi13, $copi14, $copi15, $copi16, $copi17, $copi18, $copi19, $copi20,$copi21,$copi22,$copi23


Dim $Imf  = "00000000000"
Dim $Imf1 = "00000000000"
Dim $Imf2 = "00000000000"
Dim $Imf3 = "00000000000"
Dim $Imf4 = "00000000000"
Dim $imf11= "00000000000"
Dim $imf12= "00000000000"

Dim $Imf17= "00000000000"
Dim $Imf18= "00000000000"
Dim $Imf19= "00000000000"
Dim $Imf20= "00000000000 "

Dim $Imf21= "00000000000"
Dim $Imf22= "00000000000"


;Imformacion
Dim $Imf5 = "00000000000"
Dim $Imf6 = "00000000000"
;Imformacion
Dim $Imf7 = "00000000000"
Dim $Imf8 = "00000000000"
;Imformacion
Dim $Imf9 = "00000000000"
Dim $Imf10 = "00000000000"
;Imformacion
Dim $imf13 = "00000000000"
Dim $imf14 = "00000000000"
Dim $imf15 = "00000000000"
Dim $imf16 = "00000000000"
Dim $imf23 = "00000000000"



;Funciones Principales
Prin ()
Cuentas ()
Correo ()
Seniat ()
Faov ()
Bancaribe ()
Bonus ()
AirTm ()
Directv ()




GUISetState(@SW_HIDE,$VCban)
GUISetState(@SW_HIDE,$VCei)
GUISetState(@SW_HIDE,$VFav)
GUISetState(@SW_HIDE,$VSent)
GUISetState(@SW_HIDE,$VCaribe)
GUISetState(@SW_HIDE,$VBonus)
GUISetState(@SW_HIDE,$VTM)
GUISetState(@SW_HIDE,$VDirectv)


Contra()
Func Contra()
GUISetState(@SW_HIDE,$VPinc)
$Vcont = GUICreate("Login", 220, 100, -1, -1,$WS_POPUP)
$Pass = GUICtrlCreateInput("",10,40,-1,-1,$ES_PASSWORD)
 GUICtrlCreateLabel("Ingrese su contraseña", 55, 20, 150, 20)
$OK = GUICtrlCreateButton("Login",110,70,100)
$Exit = GUICtrlCreateButton("Exit",10,70,100)
GUISetState(@SW_SHOW,$Vcont)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE or $msg = $Exit
            Exit
        Case $msg = $OK
            Valide()
    EndSelect
WEnd
EndFunc

Selec ()
Func Selec ()
        while 1
        $msg=GUIGetMsg()
        Select
               Case $msg=$GUI_EVENT_CLOSE
                    $x = 1
               if WinActive($VPinc) and $x = 1 then
                  ExitLoop
               endif
               if WinActive($VCban) then
                    GUISetState(@SW_HIDE,$VCban)
                    GUISetState(@SW_SHOW,$VPinc)
                    $x = 0
                endif
                if WinActive($VCei) then
                    GUISetState(@SW_HIDE,$VCei)
                    GUISetState(@SW_SHOW,$VPinc)
                    $x = 0
                endif
                  if WinActive($VFav) then
                    GUISetState(@SW_HIDE,$VFav)
                    GUISetState(@SW_SHOW,$VPinc)
                    $x = 0
                 endif
                  if WinActive($VSent) then
                    GUISetState(@SW_HIDE,$VSent)
                    GUISetState(@SW_SHOW,$VPinc)
                    $x = 0
                 endif
                if WinActive($VBonus) then
                    GUISetState(@SW_HIDE,$VBonus)
                    GUISetState(@SW_SHOW,$VCban)
                    $x = 0
                 endif
                if WinActive($VTM) then
                    GUISetState(@SW_HIDE,$VTM)
                    GUISetState(@SW_SHOW,$VCban)
                    $x = 0
                 endif
                if WinActive($VCaribe) then
                    GUISetState(@SW_HIDE,$VCaribe)
                    GUISetState(@SW_SHOW,$VCban)
                    $x = 0
                 endif
                 if WinActive($VDirectv) then
                    GUISetState(@SW_HIDE,$VDirectv)
                    GUISetState(@SW_SHOW,$VPinc)
                    $x = 0
                 endif


 Case $msg = $Cban
                GUISetState(@SW_HIDE,$VPinc)
                Cuentas()
 Case $msg = $Cei
                GUISetState(@SW_HIDE,$VPinc)
                Correo()
 Case $msg = $Fav
                GUISetState(@SW_HIDE,$VPinc)
                Faov()
 Case $msg = $Sent
                GUISetState(@SW_HIDE,$VPinc)
                Seniat()
 Case $msg = $Cabe
                GUISetState(@SW_HIDE,$VCban)
                Bancaribe()
Case $msg = $Bonu
                GUISetState(@SW_HIDE,$VCban)
                Bonus()
 Case $msg = $TM
                GUISetState(@SW_HIDE,$VCban)
                AirTm()
 Case $msg = $Dirtv
                GUISetState(@SW_HIDE,$VPinc)
                Directv()



 Case $msg=$Atras
                GUISetState(@SW_HIDE,$VCban)
                GUISetState(@SW_SHOW,$VPinc)
 Case $msg=$Atras1
                GUISetState(@SW_HIDE,$VCaribe)
                GUISetState(@SW_SHOW,$VCban)
 Case $msg=$Atras2
                GUISetState(@SW_HIDE,$VCei)
                GUISetState(@SW_SHOW,$VPinc)
 Case $msg=$Atras3
                GUISetState(@SW_HIDE,$VFav)
                GUISetState(@SW_SHOW,$VPinc)
 Case $msg=$Atras4
                GUISetState(@SW_HIDE,$VSent)
                GUISetState(@SW_SHOW,$VPinc)
 Case $msg=$Atras5
                GUISetState(@SW_HIDE,$VDirectv)
                GUISetState(@SW_SHOW,$VPinc)
  Case $msg=$Atras6
                GUISetState(@SW_HIDE,$VBonus)
                GUISetState(@SW_SHOW,$VCban)
  Case $msg=$Atras7
                GUISetState(@SW_HIDE,$VTM)
                GUISetState(@SW_SHOW,$VCban)
  Case $msg=$Copi
                ClipPut ($Imf)
  Case $msg=$Copi1
                ClipPut ($Imf1)
  Case $msg=$Copi2
                ClipPut ($Imf2)
  Case $msg=$Copi3
                ClipPut ($Imf3)
  Case $msg=$Copi4
                ClipPut ($Imf4)
  Case $msg=$Copi5
                ClipPut ($Imf5)
  Case $msg=$Copi6
                ClipPut ($Imf6)
  Case $msg=$Copi7
                ClipPut ($Imf7)
  Case $msg=$Copi8
                ClipPut ($Imf8)
  Case $msg=$Copi9
                ClipPut ($Imf9)
  Case $msg=$Copi10
                ClipPut ($Imf10)
  Case $msg=$Copi11
                ClipPut ($Imf11)
  Case $msg=$Copi12
                ClipPut ($Imf12)
  Case $msg=$Copi13
                ClipPut ($Imf13)
  Case $msg=$Copi14
                ClipPut ($Imf14)
  Case $msg=$Copi15
                ClipPut ($Imf15)
  Case $msg=$Copi16
                ClipPut ($Imf16)
  Case $msg=$Copi17
                ClipPut ($Imf17)
  Case $msg=$Copi18
                ClipPut ($Imf18)
  Case $msg=$Copi19
                ClipPut ($Imf19)
  Case $msg=$Copi20
                ClipPut ($Imf20)
  Case $msg=$Copi21
                ClipPut ($Imf21)
  Case $msg=$Copi22
                ClipPut ($Imf22)
  Case $msg=$Copi23
                ClipPut ($Imf23)
EndSelect
    WEnd
 EndFunc

Valide ()
Func Valide ()
   $msg=GUIGetMsg()
$msg =$GUI_EVENT_CLOSE
$PasswordInput = GUICtrlRead($Pass)
if $PasswordInput = "lock" Then
   Prin ()
   Else
     MsgBox(0,"ERROR","Por favor Ingrese su Contraseña")
EndIf

   EndFunc


 Func Prin ()
;ventana Principal
$VPinc = GUICreate("Imformacion de Cuentas", 490, 122, -1, -1, $WS_POPUP)
;Selecciones del menu
$Cban = GUICtrlCreateButton("Cuentas Bancarias", 16, 30, 73, 60, $BS_MULTILINE)
GUICtrlSetFont(-1, 10, 500, 2, "Times New Roman")
GUICtrlSetCursor (-1, 0)
$Cei = GUICtrlCreateButton("Correo elctronico", 112, 30, 73, 60, $BS_MULTILINE)
GUICtrlSetFont(-1, 10, 500, 2, "Times New Roman")
GUICtrlSetCursor (-1, 0)
$Fav = GUICtrlCreateButton("Faov", 208, 30, 73, 60, $BS_MULTILINE)
GUICtrlSetFont(-1, 10, 500, 2, "Times New Roman")
GUICtrlSetCursor (-1, 0)
$Sent = GUICtrlCreateButton("Seniat ", 304, 30, 73, 60, $BS_MULTILINE)
GUICtrlSetFont(-1, 10, 500, 2, "Times New Roman")
GUICtrlSetCursor (-1, 0)
$Dirtv = GUICtrlCreateButton("Directv ", 400, 30, 73, 60, $BS_MULTILINE)
GUICtrlSetFont(-1, 10, 500, 2, "Times New Roman")
GUICtrlSetCursor (-1, 0)
GUISetState(@SW_HIDE,$Vcont)
GUISetState(@SW_SHOW,$VPinc)
EndFunc


Func Cuentas()
$VCban = GUICreate("Cuentas Bancarias", 150, 500, -1, -1, $WS_POPUP)
$Cabe = GUICtrlCreateButton("Bancaribe", 37, 30, 80, 60, $BS_MULTILINE)
GUICtrlSetFont(-1, 12, 500, 2, "Times New Roman")
$Bonu = GUICtrlCreateButton("Bonus", 37, 100, 80, 60, $BS_MULTILINE)
GUICtrlSetFont(-1, 12, 500, 2, "Times New Roman")
$TM = GUICtrlCreateButton("AirTm", 37, 170, 80, 60, $BS_MULTILINE)
GUICtrlSetFont(-1, 12, 500, 2, "Times New Roman")
$Atras= GUICtrlCreateButton("Atras", 35, 450, 90, 30)
GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW,$VCban)
EndFunc

Func Bancaribe()
 $VCaribe = GUICreate("Bancaribe", 500, 700, -1, -1, $WS_SYSMENU)
            GUICtrlCreateLabel("Numero de Cuenta:", 10, 20, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 22, 200, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
    $copi = GUICtrlCreateButton("Copiar", 390, 21, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Numero de Tarjeta:", 10, 50, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 52, 200, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
   $copi1 = GUICtrlCreateButton("Copiar", 390, 51, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Pin de tres digitos:", 10, 80, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 82, 100, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
   $copi2 = GUICtrlCreateButton("Copiar", 390, 81, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Valid from:0000", 70, 120, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("Valid Thru:000", 300, 120, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")

            GUICtrlCreateLabel("Conexion Bancaribe", 180, 180, 200, 30)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

            GUICtrlCreateLabel("Usuario:", 10, 240, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 240, 200, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
   $copi3 = GUICtrlCreateButton("Copiar", 390, 241, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Contraseña:", 10, 270, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 270, 200, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
   $copi4 = GUICtrlCreateButton("Copiar", 390, 271, 80, 20)
            GUICtrlSetCursor (-1, 0)


  $Atras1 = GUICtrlCreateButton("Atras", 215, 620, 90, 30)
            GUICtrlSetCursor (-1, 0)

GUISetState(@SW_SHOW,$VCaribe)

     EndFunc


Func Bonus()
 $VBonus = GUICreate("Bonus", 500, 300, -1, -1, $WS_SYSMENU)

            GUICtrlCreateLabel("Numero de Tarjeta:", 10, 50, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 52, 200, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
   $copi17 = GUICtrlCreateButton("Copiar", 390, 51, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Pin de siete digitos:", 10, 80, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 82, 100, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
   $copi18 = GUICtrlCreateButton("Copiar", 390, 81, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Conexion Bonus", 175, 110, 200, 30)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

            GUICtrlCreateLabel("Usuario:", 10, 140, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 142, 200, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
   $copi19 = GUICtrlCreateButton("Copiar", 390, 141, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Contraseña:", 10, 170, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 170, 172, 200, 30)
            GUICtrlSetFont(-1, 10, 700, 0, "MS Sans Serif")
   $copi20 = GUICtrlCreateButton("Copiar", 390, 171, 80, 20)
            GUICtrlSetCursor (-1, 0)


  $Atras6 = GUICtrlCreateButton("Atras", 215, 230, 90, 30)
            GUICtrlSetCursor (-1, 0)

        GUISetState(@SW_SHOW,$VBonus)
EndFunc

Func AirTm()
$VTM = GUICreate("AirTm", 400, 190, -1, -1, $WS_SYSMENU)
            GUICtrlCreateLabel("Usuario AirTm", 130, 15, 300, 30)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

            GUICtrlCreateLabel("Usuario:", 10, 50, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 100, 50, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
   $copi21 = GUICtrlCreateButton("Copiar", 310, 51, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Contraseña:", 10, 80, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 100, 80, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
   $copi22 = GUICtrlCreateButton("Copiar", 310, 81, 80, 20)
            GUICtrlSetCursor (-1, 0)

$Atras7 = GUICtrlCreateButton("Atras", 150, 120, 90, 30)
          GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW,$VTM)
EndFunc


Func Correo()
$VCei = GUICreate("Correo Electronico", 400, 150, -1, -1, $WS_POPUP)
            GUICtrlCreateLabel("Correo Electronico", 130, 15, 300, 30)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

            GUICtrlCreateLabel("Usuario:", 10, 50, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 100, 50, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
   $copi5 = GUICtrlCreateButton("Copiar", 310, 51, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Contraseña:", 10, 80, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 100, 80, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
   $copi6 = GUICtrlCreateButton("Copiar", 310, 81, 80, 20)
            GUICtrlSetCursor (-1, 0)

$Atras2 = GUICtrlCreateButton("Atras", 130, 110, 90, 30)
          GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW,$VCei)
EndFunc

Func Faov()
$VFav = GUICreate("Faov", 300, 150, -1, -1, $WS_POPUP)
            GUICtrlCreateLabel("Usuario FAOV", 108, 15, 150, 30)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

            GUICtrlCreateLabel("Usuario:", 10, 50, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 100, 50, 100, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
   $copi7 = GUICtrlCreateButton("Copiar", 210, 51, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Contraseña:", 10, 80, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 100, 80, 100, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
   $copi8 = GUICtrlCreateButton("Copiar", 210, 81, 80, 20)
            GUICtrlSetCursor (-1, 0)

$Atras3 = GUICtrlCreateButton("Atras", 109, 110, 90, 30)
          GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW,$VFav)
EndFunc

Func Seniat()
$VSent = GUICreate("Seniat", 300, 150, -1, -1, $WS_POPUP)
            GUICtrlCreateLabel("Usuario Seniat", 108, 15, 150, 30)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

            GUICtrlCreateLabel("Usuario:", 10, 50, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 100, 50, 100, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
   $copi9 = GUICtrlCreateButton("Copiar", 210, 51, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Contraseña:", 10, 80, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 100, 80, 100, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  $copi10 = GUICtrlCreateButton("Copiar", 210, 81, 80, 20)
            GUICtrlSetCursor (-1, 0)

$Atras4 = GUICtrlCreateButton("Atras", 109, 110, 90, 30)
          GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW,$VSent)
EndFunc


Func Directv()
$VDirectv = GUICreate("Directv", 500, 280, -1, -1, $WS_POPUP)
            GUICtrlCreateLabel("Usuario Directv", 190, 15, 150, 30)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

            GUICtrlCreateLabel("Usuario:", 10, 50, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 150, 50, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  $copi13 = GUICtrlCreateButton("Copiar", 400, 44, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Contraseña:", 10, 80, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 150, 80, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  $copi14 = GUICtrlCreateButton("Copiar", 400, 74, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Numero de Tarjeta:", 10, 120, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 150, 120, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  $copi15 = GUICtrlCreateButton("Copiar", 400, 115, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Numero de Cedula:", 10, 150, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 150, 150, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  $copi16 = GUICtrlCreateButton("Copiar", 400, 145, 80, 20)
            GUICtrlSetCursor (-1, 0)

            GUICtrlCreateLabel("Numero de Cliente:", 10, 180, 150, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
            GUICtrlCreateLabel("00000000000", 150, 180, 200, 30)
            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  $copi23 = GUICtrlCreateButton("Copiar", 400, 180, 80, 20)
            GUICtrlSetCursor (-1, 0)

$Atras5 = GUICtrlCreateButton("Atras", 200, 230, 90, 30)
          GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW,$VDirectv)
EndFunc

 

Link to post
Share on other sites
On 4/29/2020 at 4:29 AM, Hemrry said:

it is not an error like so in the console but when entering the password the program starts me but it does not allow me to list any selections

 

33 minutes ago, Hemrry said:

help

Please do not get me wrong, but your script needs, in my opinion, a complete rebuild. At the moment, it looks as if it was processed with an obfuscator. The entire GUI control, the variable naming, the structure of the script etc. makes a quick correction virtually impossible.

I don't want to discourage you in any way, since you have delivered a script after all (which is more than many others do). The only solution I see would be to rewrite it, but unfortunately I don't have the time to do that.

You should better start from scratch again and post the single steps here in the forum. Then the helpers can immediately point out potential problems and offer alternatives.

This is surely not the answer you were hoping for, but I didn't want to leave you without any feedback ;). Maybe other users have a better suggestion to offer.

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to post
Share on other sites
Selec () ; <<<<<<<<<<<<<<<<<<<<<<<<<

Func Selec ()        

    while 1

Your Selec function never gets called due to it being called after the endless loop before it.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By DJ143
      I have a autoit exe file which is used in upload/browse file functionality.  This has been integrated with selenium framework and I am invoking the autoit exe using Java process and runtime. 
      Now the issue is when I run the scripts and invoke the autoit exe in local it works perfectly.  But when I use selenium grid or jenkins to run the scripts in another windows server it is not working.
      Can anyone please suggest any solution for this?
    • By Hermes
      Hello, the script below will read column A from an excel file - and if a value matches in the browser, it will click the corresponding link and click on a specific button to paste the data, then writes "Completed" in Column B. It will continue to read from the excel file and do the same thing for all the remaining rows.
      #Include "Chrome.au3" #Include "wd_core.au3" #Include "wd_helper.au3" #Include "WinHttp.au3" #include <MsgBoxConstants.au3> #include <File.au3> #include <IE.au3> #include <Array.au3> #include <INet.au3> #include <AutoItConstants.au3> #include <WinAPIFiles.au3> #include <GDIPlus.au3> #include <Excel.au3> #Include "WinHttp.au3" #Include "_HtmlTable2Array.au3" Local $sDesiredCapabilities, $sSession SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_LoadWait($sSession) _WD_Navigate($sSession, "table1.html") _WD_LoadWait($sSession) _WD_WaitElement($sSession, $_WD_LOCATOR_ByXPath, "//table[@class='main']") Local $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//table[@class='main']") ;ConsoleWrite ("mat-table " & $sElement & @CRLF) Local $aArray1 = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, ".//td[contains(@class,'data')]", $sElement, True) sleep(1000) For $i = 0 to UBound($aArray1) - 1 $aArray1[$i] = _WD_ElementAction($sSession, $aArray1[$i], 'text') Next ;_ArrayDisplay($aArray1) ;Email variables $SmtpServer = "" ; address for the smtp-server to use - REQUIRED $FromName = "Hermes" ; name from who the email was sent $FromAddress = "sender@gmail.com" ; address from where the mail should come $ToAddress = "recipient@gmail.com" ; destination address of the email - REQUIRED, use commas (,) to add more email addresses $Subject = "File not found" ; subject from the email - can be anything you want it to be $Body = "File not found!" ; the messagebody from the mail - can be left blank but then you get a blank mail $AttachFiles = "" ; the file(s) you want to attach seperated with a ; (Semicolon) - leave blank if not needed $CcAddress = "" ; address for cc - leave blank if not needed $BccAddress = "" ; address for bcc - leave blank if not needed $Importance = "High" ; Send message priority: "High", "Normal", "Low" $Username = "" ; username for the account used from where the mail gets sent - REQUIRED $Password = "" ; password for the account used from where the mail gets sent - REQUIRED $IPPort = 25 ; port used for sending the mail $ssl = 0 ; enables/disables secure socket layer sending - put to 1 if using httpS $tls = 0 ; enables/disables TLS when required Local $oAppl = _Excel_Open() Local $sWorkbook = "c:\test.xlsx" Local $oWorkbook = _Excel_BookOpen($oAppl, $sWorkbook) ;open excel and pass both parameters If FileExists($sWorkbook) Then ;Check if the file exist. Local $oAppl = _Excel_Open() Local $sWorkbook = "c:\test.xlsx" Local $oWorkbook = _Excel_BookOpen($oAppl, $sWorkbook) ;open excel and pass both parameters Local $aArray2 = _Excel_RangeRead($oWorkbook,Default,$oWorkbook.ActiveSheet.Usedrange.Columns("A:A")) Local $iIdx Local $Skipline = 0 ;0==> first line Do Local $temprf For $i = 0 To UBound($aArray2) - 1 $temprf &= $aArray2[$i] _WD_WaitElement($sSession, $_WD_LOCATOR_ByXPath, ".//a[contains(@class,'edit') and contains(text(),'Edit')]") Local $aElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, ".//a[contains(@class,'edit') and contains(text(),'Edit')]", $sElement, True) $iIdx = _ArraySearch($aArray1, $aArray2[$i]) If @error Then ContinueLoop _WD_ElementAction($sSession, $aElement[$iIdx], 'click') If $i < $Skipline Then ContinueLoop $oRange = $oWorkbook.ActiveSheet.Range("B" & $i + 1 & ":XFD" & $i + 1) _Excel_RangeCopyPaste($oWorkbook.Activesheet, $oRange) ;Paste Local $oTest4 = _WD_FindElement($sSession, $_WD_LOCATOR_ByCSSSelector, "pastebutton") _WD_ElementAction($sSession, $oTest4, 'click') Sleep(1000) ;Save Button Local $save3 = _WD_FindElement($sSession, $_WD_LOCATOR_ByCSSSelector, "button.button") _WD_ElementAction($sSession, $save3, 'click') _Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, "Completed", "B" & $i+1) sleep(1000) Next Until (Not @error) _Excel_Close($oWorkbook) Else _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl, $tls) Exit EndIf _WD_LoadWait($sSession) ;Attaching files to emails Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance="Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0, $tls = 0) Local $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' $objEmail.To = $s_ToAddress Local $i_Error = 0 Local $i_Error_desciption = "" If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress $objEmail.Subject = $s_Subject If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer If Number($IPPort) = 0 then $IPPort = 25 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort ;Authenticated SMTP If $s_Username <> "" Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password EndIf ; Set security params If $ssl Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True If $tls Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendtls") = True ;Update settings $objEmail.Configuration.Fields.Update ; Set Email Importance Switch $s_Importance Case "High" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "High" Case "Normal" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Normal" Case "Low" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Low" EndSwitch $objEmail.Fields.Update ; Sent the Message $objEmail.Send $objEmail="" EndFunc ;==>_INetSmtpMailCom Local $aDir = _FileListToArrayRec(@TempDir, "scoped_dir*;chrome_*", $FLTAR_FOLDERS, $FLTAR_NORECUR, $FLTAR_NOSORT, $FLTAR_FULLPATH) Sleep(2000) For $i = 1 To $aDir[0] DirRemove($aDir[$i], $DIR_REMOVE) Next _WD_LoadWait($sSession) _WD_Shutdown() Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true, "args":["start-maximized","disable-infobars"]}}}}' EndFunc ;==>SetupChrome If the excel file doesn't exists in the folder, it will send an email to a specific recipient.
      What i am trying figure out now is if the excel crashes while the script/loop is running, I want to relaunch the excel file continue to the last row before the excel crashed. So if the value of column B is not marked as "completed", it should continue from that row
      Appreciate any help that I can get to achieve this.
      table1.html test.xlsx
    • By adityaparakh
      Hello ,
      I am trying to use Websockets in AutoIt.
      It is to fetch live stock market prices , API is provided and documentation available for python language.
      The link for the code snippet is :
      https://symphonyfintech.com/xts-market-data-front-end-api-v2/#tag/Introduction
      https://symphonyfintech.com/xts-market-data-front-end-api-v2/#tag/Instruments/paths/~1instruments~1subscription/post
       
      https://github.com/symphonyfintech/xts-pythonclient-api-sdk
       
      Second Link is to subscribe to a list of ExchangeInstruments.
      Now I would like to get live stock ltp (LastTradedPrice) for a few stocks whose "ExchangeInstrumentID" I know.
      I am able to use the WinHttp object to perform actions using simple codes like below :
      I have the secretKey and appkey and can generate the needed token. And get the unique ExchangeInstrumentID.

      Below code is just for example of how I am using WinHttp. Unrelated to socket part.
      Global $InteractiveAPItoken = IniRead(@ScriptDir & "\Config.ini", "token", "InteractiveAPItoken", "NA") $baseurl = "https://brokerlink.com/interactive/" $functionurl = "orders" $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("POST", $baseurl & $functionurl, False) $oHTTP.SetRequestHeader("Content-Type", "application/json;charset=UTF-8") $oHTTP.SetRequestHeader("authorization", $InteractiveAPItoken) $pD = '{ "exchangeSegment": "NSEFO", "exchangeInstrumentID": ' & $exchangeInstrumentID & ', "productType": "' & $producttype & '", "orderType": "MARKET", "orderSide": "' & $orderside & '", "timeInForce": "DAY", "disclosedQuantity": 0, "orderQuantity": ' & $qty & ', "limitPrice": 0, "stopPrice": 0, "orderUniqueIdentifier": "' & $orderidentifier & '"}' $oHTTP.Send($pD) $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status
          
          
      But am struggling to understand and use socket.
      Would be of great help if you can have a look at the link mentioned above and help with the code sample for AutoIt.
      To connect and listen to a socket.
      Thanks a lot
       
    • By Hermes
      Hi, I have a site that has the following elements below: 
      <div>More element here</div> <div>More element here</div> <div>More element here</div> When I do this in Auto It:
      Local $oSelectDiv = _WD_FindElement($sSession, $_WD_LOCATOR_ByCSSSelector, "div") _WD_HighlightElement($sSession, $oSelectDiv, 1) I also tried to add [3], but it doesnt seems to work:
      Local $oSelectDiv = _WD_FindElement($sSession, $_WD_LOCATOR_ByCSSSelector, "div[3]") _WD_HighlightElement($sSession, $oSelectDiv, 1) It always highlight the first one, but I am trying to highlight the 3rd in the list. Is there anyway to select the 3rd div without having to add any class/id in the divs, and without using XPATH? The structure of the elements in that site were built that way.
    • By meety
      My au3 script program needs administrator privileges on win10 to be executed correctly, because it needs to be added to the boot---Script code:RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName, "REG_SZ", @ScriptFullPath)
      I need to let the program automatically get administrator privileges, so I use a function of #RequireAdmin. Although the program can be added to the boot, but does not execute after system boot up? why is that?
      What should I do?
      --------------------------------------------------------------------
      Update:
      I found that after using the #RequireAdmin function, the program cannot be executed after system boot up.
      An example is given below. after it is compiled, it will not be executed after system boot up in the following two ways.
      1. C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\
      2. RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName, "REG_SZ", @ScriptFullPath)
      why is that?
      example
      #include <MsgBoxConstants.au3>
      #RequireAdmin
      Func test()
          MsgBox(0, "", "this is test message")
      EndFunc   ;==>test
      test()
       
       
×
×
  • Create New...