Jump to content

Hemrry

Active Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by Hemrry

  1. Good morning, I have a question when executing my script, the selected option is not synchronized with the identification that I put in it and the progress bar, the programs do install perfectly but Dropbox is installed, for example, and the identification tells me that it is being installed chrome #include <GuiButton.au3> #include <GUIConstants.au3> #include <WindowsConstants.au3> Opt("MustDeclareVars", 1) Global $FileChrome = "Programas\Chrome64.exe /silent /install" Global $FileAdobe = "Programas\AdobeDC.exe /sAll /sPB" Global $FileDropbox = "Programas\Dropbox86.exe /S" Global $FileOffice = "Programas\Office2013x64\setup.exe" Global $FileIso = "Programas\UltraISO.exe /VERYSILENT" ;Variables Global $Ini, $VPinc, $Checkbox1, $Checkbox2, $Checkbox3, $Checkbox4, $Checkbox5, $Checkbox6, $Progress1 Global $label1, $label2, $label3, $label4, $label5 $VPinc = GUICreate("Instalacion de Programas", 407, 355, -1, -1) GUISetBkColor(0xFFFFFF) $Ini = GUICtrlCreateButton("Instalar Programas", 100, 16, 200, 30) GUICtrlSetFont(-1, 12, 800, 2, "Times New Roman") GUICtrlSetCursor (-1, 0) $Checkbox1 = GUICtrlCreateCheckbox("Google Chrome", 29, 74, 129, 20) GUICtrlSetFont(-1, 11, 800, 2, "Times New Roman") $Checkbox2 = GUICtrlCreateCheckbox("Adobe Acrobat DC", 29, 98, 145, 20) GUICtrlSetFont(-1, 11, 800, 2, "Times New Roman") $Checkbox3 = GUICtrlCreateCheckbox("Dropbox", 29, 122, 81, 20) GUICtrlSetFont(-1, 11, 800, 2, "Times New Roman") $Checkbox4 = GUICtrlCreateCheckbox("Microsoft Office 2013", 29, 146, 161, 20) GUICtrlSetFont(-1, 11, 800, 2, "Times New Roman") $Checkbox5 = GUICtrlCreateCheckbox("Ultra ISO", 29, 170, 89, 20) GUICtrlSetFont(-1, 11, 800, 2, "Times New Roman") $Checkbox6 = GUICtrlCreateCheckbox("Seleccionar Todo", 253, 67, 129, 20) GUICtrlSetFont(-1, 11, 800, 2, "Times New Roman") $Progress1 = GUICtrlCreateProgress(32, 288, 337, 25, $PBS_SMOOTH) GUICtrlSetColor(-1, 0x008000) GUICtrlCreateLabel("Precione ESC para Salir", 129, 328, 160, 22) GUICtrlSetFont(-1, 11, 800, 2, "Times New Roman") GUISetState() Global $idMsg = 0 While 1 $idMsg = GUIGetMsg() Switch $idMsg Case $GUI_EVENT_CLOSE Exit Case $Checkbox6 _CheckAll() Case $Ini If _IsChecked($Checkbox1) Then RunWait(@ComSpec & " /c " & $FileChrome, "", @SW_HIDE, "") $label1 = GUICtrlCreateLabel("Instalando Google Chrome" , 90, 240, 224, 22, $SS_CENTER) GUICtrlSetFont($label1, 11, 800, 2, "Times New Roman") GUICtrlSetColor($label1, 0x008000) _SendMessage(GUICtrlGetHandle($Progress1), 20) GUICtrlSetData($Progress1, 20) If _IsChecked($Checkbox2) Then RunWait(@ComSpec & " /c " & $FileAdobe,"", @SW_HIDE,"") $label2 = GUICtrlCreateLabel("Instalando Adobe Acrobat DC", 90, 240, 224, 22, $SS_CENTER) GUICtrlSetFont($label2, 11, 800, 2, "Times New Roman") GUICtrlSetColor($label2, 0x008000) _SendMessage(GUICtrlGetHandle($Progress1), 40) GUICtrlSetData($Progress1, 40) If _IsChecked($Checkbox3) Then RunWait(@ComSpec & " /c " & $FileDropbox, "", @SW_HIDE,"") $label3 = GUICtrlCreateLabel("Instalando Dropbox" , 90, 240, 224, 22, $SS_CENTER) GUICtrlSetFont($label3, 11, 800, 2, "Times New Roman") GUICtrlSetColor($label3, 0x008000) _SendMessage(GUICtrlGetHandle($Progress1), 60) GUICtrlSetData($Progress1, 60) If _IsChecked($Checkbox4) Then RunWait(@ComSpec & " /c " & $FileOffice, "", @SW_HIDE, "") $label4 = GUICtrlCreateLabel("Instalando Microsoft Office 2013" , 90, 240, 224, 22, $SS_CENTER) GUICtrlSetFont($label4, 11, 800, 2, "Times New Roman") GUICtrlSetColor($label4, 0x008000) _SendMessage(GUICtrlGetHandle($Progress1), 80) GUICtrlSetData($Progress1, 80) If _IsChecked($Checkbox5) Then RunWait(@ComSpec & " /c " & $FileIso, "", @SW_HIDE, "") $label5 = GUICtrlCreateLabel("Instalando Ultra ISO" , 90, 240, 224, 22, $SS_CENTER) GUICtrlSetFont($label5, 11, 800, 2, "Times New Roman") GUICtrlSetColor($label5, 0x008000) _SendMessage(GUICtrlGetHandle($Progress1), 100) GUICtrlSetData($Progress1, 100) GUISetState(@SW_SHOW) EndSwitch WEnd Func _CheckAll() If _IsChecked($Checkbox6) Then GUICtrlSetState($Checkbox1, $GUI_CHECKED) GUICtrlSetState($Checkbox2, $GUI_CHECKED) GUICtrlSetState($Checkbox3, $GUI_CHECKED) GUICtrlSetState($Checkbox4, $GUI_CHECKED) GUICtrlSetState($Checkbox5, $GUI_CHECKED) Else GUICtrlSetState($Checkbox1, $GUI_UNCHECKED) GUICtrlSetState($Checkbox2, $GUI_UNCHECKED) GUICtrlSetState($Checkbox3, $GUI_UNCHECKED) GUICtrlSetState($Checkbox4, $GUI_UNCHECKED) GUICtrlSetState($Checkbox5, $GUI_UNCHECKED) EndIf EndFunc Func _IsChecked($idControlID) Return BitAND(GUICtrlRead($idControlID), $GUI_CHECKED) = $GUI_CHECKED EndFunc
  2. Sorry, I don't know if I'm doing it wrong but I already tried anyway and it still shows the cmd window for like 1 second and it disappears
  3. Ok, the only thing I don't want is for the cmd window to not be displayed when running UltraISO\UltraISO.exe /s , when the While is executed, all cmd windows are displayed even though I'm set @SW_HIDE to hide the sale that's what I mean and excuse me
  4. Thank you very much, yes I know, I just put it like this to have it as a test and see the execution window
  5. I want to make a code to automatically execute the installation of certain programs, it's almost ready, only that when executing the installation the CMD sales are shown and I want them to be hidden and I've already tried many options in forums but they don't work for me I don't have Any idea that I may be doing wrong, could you help me please? #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <SendMessage.au3> #RequireAdmin Global $FileChrome = Global $FileAdobe = Global $FileDropbox = Global $FileOffice = Global $FileIso = UltraISO\UltraISO.exe /? Dim $Ini, $fin, $VPinc, $Progress1 IniA () Func IniA () $VPinc = GUICreate("Instalacion de Programas", 401, 437, -1, -1) GUISetBkColor(0x000000) $Ini = GUICtrlCreateButton("Instalar Programas", 100, 16, 200, 30, $BS_MULTILINE) GUICtrlSetFont(-1, 12, 800, 2, "Times New Roman") GUICtrlSetCursor (-1, 0) $Label2 = GUICtrlCreateLabel("Precione ESC para Salir", 120, 399, 160, 22) GUICtrlSetFont(-1, 11, 800, 2, "Times New Roman") GUICtrlSetColor(-1, 0x34EB41) $Label1 = GUICtrlCreateLabel("Google Chrome", 16, 72, 112, 22) GUICtrlSetFont(-1, 11, 800, 2, "Times New Roman") GUICtrlSetColor(-1, 0x34EB41) $Label3 = GUICtrlCreateLabel("Adobe Acrobat DC", 16, 102, 128, 22) GUICtrlSetFont(-1, 11, 800, 2, "Times New Roman") GUICtrlSetColor(-1, 0x34EB41) $Label4 = GUICtrlCreateLabel("Dropbox", 16, 132, 64, 22) GUICtrlSetFont(-1, 11, 800, 2, "Times New Roman") GUICtrlSetColor(-1, 0x34EB41) $Label5 = GUICtrlCreateLabel("Microsoft Office 2013", 16, 162, 144, 22) GUICtrlSetFont(-1, 11, 800, 2, "Times New Roman") GUICtrlSetColor(-1, 0x34EB41) $Label6 = GUICtrlCreateLabel("Ultra ISO", 16, 192, 72, 22) GUICtrlSetFont(-1, 11, 800, 2, "Times New Roman") GUICtrlSetColor(-1, 0x34EB41) $Progress1 = GUICtrlCreateProgress(32, 360, 337, 25) GUICtrlSetColor(-1, 0x008000) GUICtrlSetBkColor(-1, 0xFFFFFF) GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Ini RunWait('"' & @ComSpec & ' /c "' & $FileChrome & '"', @SW_HIDE) _SendMessage(GUICtrlGetHandle($Progress1), 20) Sleep (100) GUICtrlSetData(-1, 20) RunWait('"' & @ComSpec & ' /c "' & $FileAdobe & '"', @SW_HIDE) _SendMessage(GUICtrlGetHandle($Progress1), 40) Sleep (100) GUICtrlSetData(-1, 40) RunWait('"' & @ComSpec & ' /c "' & $FileDropbox & '"', @SW_HIDE) _SendMessage(GUICtrlGetHandle($Progress1), 60) Sleep (100) GUICtrlSetData(-1, 60) RunWait('"' & @ComSpec & ' /c "' & $FileOffice & '"', @SW_HIDE) _SendMessage(GUICtrlGetHandle($Progress1), 80) Sleep (100) GUICtrlSetData(-1, 80) RunWait('"' & @ComSpec & ' /c "' & $FileIso & '"', @SW_HIDE) _SendMessage(GUICtrlGetHandle($Progress1), 100) Sleep (100) GUICtrlSetData(-1, 100) GUISetState(@SW_SHOW,$VPinc) EndSwitch WEnd EndFunc
  6. They are teachers thank you very much for all the help and you are very right in terms of reading the ini, I already do tests thanks for everything
  7. Hello, how are you? I need help creating a menu but a dropdown of buttons. I have this idea, but I would like to know if it can be done in another way, since when entering an option and returning to attract, the menu by buttons no longer works. Thank you very much in advance. #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <DateTimeConstants.au3> #include <MsgBoxConstants.au3> #include <Constants.au3> #include <GUIConstants.au3> #include <FontConstants.au3> #include <WinAPI.au3> #include <WinAPISysWin.au3> #include <Array.au3> #include <GuiEdit.au3> #NoTrayIcon ;Ventanas Dim $VIngreP ;Funciones Principales Prin () Func Prin () $VIngreP = GUICreate("Ingreso", 601, 201, iniread("cord.ini", "Section", "X-Pos2", 0), iniread("cord.ini", "Section", "Y-Pos2", 0)) GUISetBkColor(0xFFFFFF) GUICtrlSetFont(-1, 12, 800, 0, "Times New Roman") $Button2 = GUICtrlCreateButton("Ingreso", 24, 152, 161, 33) GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman") GUICtrlSetCursor (-1, 0) Local $ingreDummy = GUICtrlCreateDummy() Local $ingreContext = GUICtrlCreateContextMenu($ingreDummy) Local $PP = GUICtrlCreateMenuItem("He", $ingreContext) Local $PT = GUICtrlCreateMenuItem("Hi", $ingreContext) $Button3 = GUICtrlCreateButton("Ingreso d", 216, 152, 161, 33) GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman") GUICtrlSetCursor (-1, 0) Local $resulDummy = GUICtrlCreateDummy() Local $resulContext = GUICtrlCreateContextMenu($resulDummy) Local $RP = GUICtrlCreateMenuItem("lol", $resulContext) Local $RT = GUICtrlCreateMenuItem("Cool", $resulContext) Local $RA =GUICtrlCreateMenuItem("holl", $resulContext) $Button4 = GUICtrlCreateButton("Busqueda", 410, 152, 161, 33) GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman") GUICtrlSetCursor (-1, 0) Local $busqueDummy = GUICtrlCreateDummy() Local $busqueContext = GUICtrlCreateContextMenu($busqueDummy) Local $BP = GUICtrlCreateMenuItem("cool", $busqueContext) Local $BT = GUICtrlCreateMenuItem("roll", $busqueContext) Local $BA =GUICtrlCreateMenuItem("jkl", $busqueContext) GUISetState(@SW_SHOW) While 1 $a = wingetpos("Ingreso") $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button2 ShowMenu($VIngreP, $nMsg, $ingreContext) Case $PP Case $PT Case $Button3 ShowMenu($VIngreP, $nMsg, $resulContext) Case $RP Case $RT Case $RA Case $Button4 ShowMenu($VIngreP, $nMsg, $busqueContext) Case $BP Case $BT Case $BA EndSwitch iniwrite("cord.ini", "Section", "X-Pos2", $a[0]) iniwrite("cord.ini", "Section", "Y-Pos2", $a[1]) WEnd EndFunc ; Cordenadas de Menu Contextual Func ShowMenu($hWnd, $idCtrl, $idContext) Local $aPos, $x, $y Local $hMenu = GUICtrlGetHandle($idContext) $aPos = ControlGetPos($hWnd, "", $idCtrl) $x = $aPos[0] $y = $aPos[1] + $aPos[3] ClientToScreen($hWnd, $x, $y) TrackPopupMenu($hWnd, $hMenu, $x, $y) EndFunc ;==>ShowMenu ; Convert the client (GUI) coordinates to screen (desktop) coordinates Func ClientToScreen($hWnd, ByRef $x, ByRef $y) Local $tPoint = DllStructCreate("int;int") DllStructSetData($tPoint, 1, $x) DllStructSetData($tPoint, 2, $y) DllCall("user32.dll", "int", "ClientToScreen", "hwnd", $hWnd, "struct*", $tPoint) $x = DllStructGetData($tPoint, 1) $y = DllStructGetData($tPoint, 2) ; release Struct not really needed as it is a local $tPoint = 0 EndFunc ;==>ClientToScreen ; Show at the given coordinates (x, y) the popup menu (hMenu) which belongs to a given GUI window (hWnd) Func TrackPopupMenu($hWnd, $hMenu, $x, $y) DllCall("user32.dll", "int", "TrackPopupMenuEx", "hwnd", $hMenu, "int", 0, "int", $x, "int", $y, "hwnd", $hWnd, "ptr", 0) EndFunc ;==>TrackPopupMenu
  8. Perfect, thank you very much
  9. Hello, I am a bit of a beginner in programming with autoit, please could you help me, I am a bit stuck, I am doing a login with user and password validation, it works very well with iniread, but it can only read a single line of the ini file when you want to add more users or passwords to the ini file continues to read me only the first line and does not validate the rest of the data, and I tried with inireadsection, but there is the problem I am not very clear on how to use it and I looked for an example and tried but I cannot make it work please for whom can help thank you very much #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <DateTimeConstants.au3> #include <MsgBoxConstants.au3> #include <Constants.au3> #include <GUIConstants.au3> #include <FontConstants.au3> #include <WinAPI.au3> #include <WinAPISysWin.au3> #include <Array.au3> Contra() Prin () Func Contra() Global $Login = GUICreate("Login", 441, 251, -0, -0) GUISetFont(12, 400, 2, "Times New Roman") GUISetBkColor(0xFFFFFF) $Label = GUICtrlCreateLabel("Usuario", 280, 40, 95, 24, $SS_CENTER) $usur = GUICtrlCreateInput("", 248, 80, 169, 27) GUICtrlSetBkColor(-1, 0xC8C8C8) $Pass = GUICtrlCreateInput("", 248, 168, 169, 27, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD)) GUICtrlSetBkColor(-1, 0xC8C8C8) $Labe2 = GUICtrlCreateLabel("Contraseña", 288, 128, 95, 23, $SS_CENTER) $Button1 = GUICtrlCreateButton("Login", 136, 208, 177, 33) GUICtrlSetCursor (-1, 0) $Pic1 = GUICtrlCreatePic("Logo.JPG", 8, 24, 233, 169) Dim $Login_AccelTable[1][2] = [["{ENTER}", $Button1]] GUISetAccelerators($Login_AccelTable) GUISetState(@SW_SHOW) While 1 $a = wingetpos("Login") $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Global $UserInput = GUICtrlRead($usur) Global $Passinput = GUICtrlRead($Pass) if $UserInput = iniread ("User.ini", "Usuario", 1, Default) And $Passinput = iniread ("Pass.ini", "Contraseñas", 1, Default) Then Prin () Else MsgBox(0,"ERROR","Verifique usuario y contraseña") EndIf EndSwitch WEnd EndFunc Func Prin () GUISetState(@SW_HIDE,$Login) $VIngreP = GUICreate("Ingreso", 602, 202, 215, 168) GUISetBkColor(0xFFFFFF) $Label1 = GUICtrlCreateLabel("! Bienvenido", 16, 8, 88, 23) GUICtrlSetFont(-1, 12, 800, 0, "Times New Roman") $Label2 = GUICtrlCreateLabel($UserInput, 104, 8, 61, 23, BitOR($SS_CENTER,$SS_RIGHTJUST), $GUI_WS_EX_PARENTDRAG) GUICtrlSetFont(-1, 12, 800, 0, "Times New Roman") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc
  10. Sorry the problem is that it does nothing, it only runs and does not mutrate an error code in the SciTE panel and it also does not show an error in cmd, it runs without an error but does not perform the function
  11. Ok at the moment of executing it, it does not create an error message, however, not to perform its function in this case is to create a network hosted on windows, the program runs without any problem according to the SciTE panel, but it does not perform its function on windows.
  12. Thank you very much, water would be something like that, I still have the problem Local $iPID = Run(@ComSpec & " /K netsh wlan set hostednetwork mode=allow ssid=" & $usu " key=" & $con)
  13. Good afternoon I need help in this project I would like to apply a variable in CMD from autoit at the moment of starting the program does not show me errors but it also does not perform its function could it help me please #include <Constants.au3> #RequireAdmin $con ="123456" $usu ="hola" Local $iPID = Run(@ComSpec & " /K netsh wlan set hostednetwork mode=allow ssid=" & $usu "key=" & $con) Local $iPID = Run(@ComSpec & " /K netsh wlan set hostednetwork mode=allow ssid=" & $usu "key=" & $con, '', $STDERR_CHILD + $STDOUT_CHILD) ProcessWaitClose($iPID) StdoutRead($iPID)
  14. 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
  15. 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
  16. 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
  17. Good afternoon, I am adjusting the latest modifications but I am having problems with the conditions or the variables, I am not sure yet, because when applying the variable, it limits the ping to drop below the amount I place, I explain. If I put that when it is below 100 it turns green and when it is above 100 it turns red. Even if you have a ping of 40 or 80, this bone red always remains static. Could you please help me. #include <Constants.au3> #include <GUIConstants.au3> #include <FontConstants.au3> #include <WinAPI.au3> #include <WinAPISysWin.au3> HotKeySet("^{SPACE}", "Terminate") Local $hGUI = GUICreate("MyGUI",100 , 35, -1, -1, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_LAYERED)) GUISetBkColor(0x000000) _WinAPI_SetLayeredWindowAttributes($hGUI, 0x000000) Local $idLabel = GUICtrlCreateLabel ("", 0, 0,100, 35, $SS_CENTER+$SS_CENTERIMAGE, $GUI_WS_EX_PARENTDRAG) GUICtrlSetColor (-1,0x34eb41) GUICtrlSetFont (-1, 14, $FW_NORMAL, $GUI_FONTNORMAL, "Comic Sans MS") GUISetState(@SW_SHOW, $hGUI) Local $2idLabel = GUICtrlCreateLabel ("", 0, 0,100, 35, $SS_CENTER+$SS_CENTERIMAGE, $GUI_WS_EX_PARENTDRAG) GUICtrlSetColor (-1,0xfa0707) GUICtrlSetFont (-1, 14, $FW_NORMAL, $GUI_FONTNORMAL, "Comic Sans MS") GUISetState(@SW_SHOW, $hGUI) While 1 Local $iPing Local $var $iPing = Ping("www.google.es", "") $var = 100 If $iPing < $var Then GUICtrlSetData ($idLabel, $iPing & " ms") ElseIf $iPing > $var Then GUICtrlSetData ($2idLabel, $iPing & " ms") EndIf WEnd Func Terminate() Exit EndFunc ;==>Terminate
  18. Muchas gracias por el aporte. Funcionó muy bien. Te lo agradezco. Inserté la función para poder moverla por toda la pantalla y que el bucle se ejecute constantemente para que no se conecte a Internet #include <Constants.au3> #include <GUIConstants.au3> #include <FontConstants.au3> #include <WinAPI.au3> #include <WinAPISysWin.au3> HotKeySet("^{SPACE}", "Terminate") Local $hGUI = GUICreate("MyGUI",80 , 34, 1700, 2, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_LAYERED)) GUISetBkColor(0x000000) _WinAPI_SetLayeredWindowAttributes($hGUI, 0x000000) Local $idLabel = GUICtrlCreateLabel ("", 0, 0,80, 40, $SS_CENTER+$SS_CENTERIMAGE, $GUI_WS_EX_PARENTDRAG) GUICtrlSetColor (-1,0x34eb41) GUICtrlSetFont (-1, 13, $FW_NORMAL, $GUI_FONTNORMAL, "Comic Sans MS") GUISetState(@SW_SHOW, $hGUI) Local $iPing While Sleep(90) $iPing = Ping("www.google.es", "") GUICtrlSetData ($idLabel, $iPing & " ms") WEnd Func Terminate()     Exit  EndFunc   ;==>Terminate
  19. Buenas soy nuevo con Autoit mi proyecto es crear una venta de Ping Flotante que este transparente solo el fondo y que el Ping permanezca completamente Visible la intención es crear una venta Fija y que solo varié el Ping sin que parpadee la Vetana completa. Ok realice dos pruebas que seria Hi, I am new with Autoit. My project is to create a Floating Ping GUI that has a transparent background and that the Ping remains completely visible. The intention is to create a fixed window and that only the Ping changes without blinking the entire GUI. Ok. I have made two tests that would be: HotKeySet("{ESC}", "Terminate") While 1     WinSetTrans("Medidor", "", 100)     Local $iPing = Ping("www.google.es", "")     SplashTextOn("Medidor", $iPing & "ms." , 80, 40, 422, 17, 1+2+16,"Comic Sans MS","10")     WinSetTrans("Medidor", "", 100)     Sleep(100)  WEnd Func Terminate()     Exit 0 EndFunc Y este otro que es con Ventanas GUI para fijar la ventana y darle transparencia pero aun no consigo colocar el texto en este caso el ping es dicha coordenada And this other one that uses a Windows GUI to fix the window and give it transparency but I still can't put the text. In this case the ping is at a given coordinate #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> HotKeySet("{ESC}", "Terminate") WinSetTrans("Conexion", "", 100)     GUICreate("Conexion", 80, 40, 422, 17, $WS_POPUP, $WS_EX_TOPMOST)     GUISetBkColor(0xE0FFFF)     Local $idPic = GUICtrlCreatePic("..\GUI\mslogo.jpg", 80, 40, 422, 17) WinSetTrans("Conexion", "", 100)     GUISetState(@SW_SHOW) While 1     Local $iPing = Ping("www.google.es", "")     Sleep(100)  WEnd Func Terminate()     Exit 0 EndFunc Muchas gracias por la ayudar. Thanks a lot for any help
×
×
  • Create New...