JuanFelipe Posted June 28, 2015 Share Posted June 28, 2015 (edited) Hello friends, I could help because I tried to make a progress bar that I check the progress of my script, thank you for your cooperation.expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $date = @MDAY & "/" & @MON & "/" & @YEAR #Region ### START Koda GUI section ### Form=c:\users\juan.caballeron\desktop\ \programacion\autoit\capturas\koda_1.7.3.0\forms\grabar capturas.kxf $Form1_1 = GUICreate("WhiteSnake... Para Colaboración de los compañeros, Pan y Gaseosa Diariamente para Caballo.", 686, 518, -1, -1) $MenuItem1 = GUICtrlCreateMenu("&Capturas") $MenuItem2 = GUICtrlCreateMenu("&Vehiculos") GUISetIcon("C:\Users\juan.caballeron\Desktop\ \Programacion\Autoit\Capturas\koda_1.7.3.0\iconos\Avatar on ice-256.ico", -1) GUISetCursor (7) GUISetBkColor(0xA6CAF0) $hechos = GUICtrlCreateGroup("Hechos", 16, 32, 449, 209) GUICtrlSetColor(-1, 0x000000) $box_fechah = GUICtrlCreateInput("", 112, 80, 81, 21);==== Fecha de Hecho GUICtrlSetLimit(-1, 10) $box_hora = GUICtrlCreateInput("", 112, 120, 81, 21);==== Hora GUICtrlSetLimit(-1, 5) $box_fechaf = GUICtrlCreateInput("", 112, 160, 81, 21);==== Fecha Fuente GUICtrlSetLimit(-1, 10) $box_fte = GUICtrlCreateInput("", 112, 200, 81, 21);==== Numero de fuente GUICtrlSetLimit(-1, 6) $Label3 = GUICtrlCreateLabel("Fecha Hecho:", 24, 80, 72, 17) $Label4 = GUICtrlCreateLabel("Hora:", 24, 120, 30, 17) $Label5 = GUICtrlCreateLabel("Fecha Fuente:", 24, 160, 73, 17) $Label6 = GUICtrlCreateLabel("Nro. Fuente:", 24, 200, 63, 17) $lbldirec = GUICtrlCreateLabel("Dirección de Caso", 264, 48, 91, 17) $lbl1 = GUICtrlCreateLabel("1.", 216, 88, 13, 17) $lbl2 = GUICtrlCreateLabel("2.", 216, 120, 13, 17) $boxcl = GUICtrlCreateCombo("", 240, 88, 41, 21);==== CALLE GUICtrlSetData($boxcl, "CL|KR|DG|TR") $numcl = GUICtrlCreateInput("", 288, 88, 41, 21);==== Número de Calle GUICtrlSetLimit(-1, 3) $comcl = GUICtrlCreateInput("", 336, 88, 41, 21);==== Composicion Calle GUICtrlSetLimit(-1, 4) $boxkr = GUICtrlCreateCombo("", 240, 120, 41, 21);==== Carrera GUICtrlSetData($boxkr, "CL|KR|DG|TR") $numkr = GUICtrlCreateInput("", 288, 120, 41, 21);==== Numero de Carrera GUICtrlSetLimit(-1, 3) $comkr = GUICtrlCreateInput("", 336, 120, 41, 21);=== Composicion Carrera GUICtrlSetLimit(-1, 4) $num2kr = GUICtrlCreateInput("", 384, 120, 41, 21);=== Complemento Carrera $pcardinal = GUICtrlCreateCombo("", 232, 160, 201, 21);==== Punto Cardinal GUICtrlSetData($pcardinal, "Sur|Norte|Oriente|Occidente") $noticia = GUICtrlCreateInput("", 232, 200, 201, 21);=== Noticia Criminal GUICtrlSetLimit(-1, 21) $Label13 = GUICtrlCreateLabel("P. Cardinal", 304, 144, 55, 17) $Label18 = GUICtrlCreateLabel("Tipo", 248, 72, 25, 17) $Label19 = GUICtrlCreateLabel("Num.", 296, 72, 29, 17) $Label20 = GUICtrlCreateLabel("Com.", 344, 72, 28, 17) $Label21 = GUICtrlCreateLabel("_______", 384, 88, 46, 17) $Label22 = GUICtrlCreateLabel("No. Noticia", 304, 184, 57, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $personas = GUICtrlCreateGroup("Datos de la Persona", 16, 256, 665, 185) $Label1 = GUICtrlCreateLabel("Tipo Identificación:", 32, 288, 94, 17) $Label2 = GUICtrlCreateLabel("No. Documento:", 32, 312, 82, 17) $Label7 = GUICtrlCreateLabel("Apellidos", 32, 336, 46, 17) $Label8 = GUICtrlCreateLabel("Nombres", 32, 360, 46, 17) $Label9 = GUICtrlCreateLabel("Sexo", 32, 384, 28, 17) $Label10 = GUICtrlCreateLabel("Fecha Nacimiento", 32, 408, 90, 17) $Combo1 = GUICtrlCreateCombo("", 128, 288, 49, 21);=== Tipo de Identificación GUICtrlSetData($combo1,"TI|CC|CE|PS|RC") $documento = GUICtrlCreateInput("", 128, 312, 193, 21);=== Número de Identificación $apellidos = GUICtrlCreateInput("", 128, 336, 377, 21);=== Apellidos $nombres = GUICtrlCreateInput("", 128, 360, 377, 21);=== Nombres $Combo2 = GUICtrlCreateCombo("", 128, 384, 49, 21);====SEXO GUICtrlSetData($Combo2,"Mas|Fem") $fecha_naci = GUICtrlCreateInput("", 128, 408, 81, 21);=== Fecha Nacimiento GUICtrlSetLimit(-1, 10) $Label16 = GUICtrlCreateLabel("Use T. para Tarjeta y C. para Cédula.", 184, 288, 180, 17) $Label17 = GUICtrlCreateLabel("M. Masculino y F. Femenino", 184, 384, 136, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $datoscap = GUICtrlCreateGroup("Datos Capturas", 480, 32, 201, 209) $Label11 = GUICtrlCreateLabel("Tipo", 496, 80, 25, 17) $Label12 = GUICtrlCreateLabel("Fecha OJ", 496, 120, 50, 17) $Label14 = GUICtrlCreateLabel("Número OJ", 496, 160, 57, 17) $Label15 = GUICtrlCreateLabel("Delito", 496, 184, 31, 17) $tipocap = GUICtrlCreateCombo("", 560, 80, 97, 21);=== Tipo de Captura GUICtrlSetData($tipocap,"Flagrancia|Orden Judicial") $fechaoj = GUICtrlCreateInput("", 560, 120, 97, 21);=== Fecha de la Orden GUICtrlSetLimit(-1, 10) $numoj = GUICtrlCreateInput("", 560, 160, 97, 21);=== Número de la orden $delitocap = GUICtrlCreateInput("", 496, 200, 169, 21);=== Delito GUICtrlCreateGroup("", -99, -99, 1, 1) $Titulo = GUICtrlCreateLabel("PROCESO PARA GRABAR CAPTURAS EN EL SIEDCO.", 175, 8, 277, 17, $SS_CENTER) GUICtrlSetCursor (-1, 3) $Progress1 = GUICtrlCreateProgress(512, 472, 169, 9, BitOR($WS_BORDER,$WS_CLIPSIBLINGS)) GUICtrlSetCursor (-1, 15) $creador = GUICtrlCreateLabel("By WhiteSnake", 16, 472, 78, 17) GUICtrlSetColor(-1, 0xFF0000) $iniciar = GUICtrlCreateButton("INICIAR PROCESO", 360, 464, 145, 25) GUICtrlSetCursor (-1, 0) $Icon1 = GUICtrlCreateIcon("C:\Users\juan.caballeron\Desktop\ \Programacion\Autoit\Capturas\koda_1.7.3.0\iconos\1249549841170809086.ico", -1, 96, 464, 32, 32) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Local $sComboRead1 = "" Local $sComboRead2 = "" Local $sComboRead3 = "" Local $sComboRead4 = "" Local $sComboRead5 = "" Local $sComboRead6 = "" Local $sComboRead7 = "" Local $sComboRead8 = "" Local $sComboRead9 = "" Local $sComboRead10 = "" Local $sComboRead11 = "" Local $sComboRead12 = "" Local $sComboRead13 = "" Local $sComboRead14 = "" Local $sComboRead15 = "" Local $sComboRead16 = "" Local $sComboRead17 = "" Local $sComboRead18 = "" Local $sComboRead19 = "" Local $sComboRead20 = "" Local $sComboRead21 = "" Local $sComboRead22 = "" Local $sComboRead23 = "" While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $iniciar $sComboRead1 = GUICtrlRead($box_fechah);========================== Fecha de Hecho $sComboRead2 = GUICtrlRead($box_hora);============================ Hora $sComboRead3 = GUICtrlRead($box_fechaf);========================== Fecha Fuente $sComboRead4 = GUICtrlRead($box_fte);============================= Numero de fuente $sComboRead5 = GUICtrlRead($boxcl);=============================== Calle $sComboRead6 = GUICtrlRead($numcl);=============================== Número de Calle $sComboRead7 = GUICtrlRead($comcl);=============================== Composicion Calle $sComboRead8 = GUICtrlRead($boxkr);=============================== Carrera $sComboRead9 = GUICtrlRead($numkr);=============================== Numero de Carrera $sComboRead10 = GUICtrlRead($comkr);============================== Composicion Carrera $sComboRead11 = GUICtrlRead($num2kr);============================= Complemento Carrera $sComboRead12 = GUICtrlRead($pcardinal);========================== Punto Cardinal $sComboRead13 = GUICtrlRead($noticia);============================ Noticia Criminal $sComboRead14 = GUICtrlRead($Combo1);============================= Tipo de Identificación $sComboRead15 = GUICtrlRead($documento);========================== Número de Identificación $sComboRead16 = GUICtrlRead($apellidos);========================== Apellidos $sComboRead17 = GUICtrlRead($nombres);============================ Nombres $sComboRead18 = GUICtrlRead($Combo2);============================= Sexo $sComboRead19 = GUICtrlRead($fecha_naci);========================= Fecha Nacimiento $sComboRead20 = GUICtrlRead($tipocap);============================ Tipo de Captura $sComboRead21 = GUICtrlRead($fechaoj);============================ Fecha de la Orden $sComboRead22 = GUICtrlRead($numoj);============================== Número de la orden $sComboRead23 = GUICtrlRead($delitocap);========================== Delito If $sComboRead1 = "" Then MsgBox(16,"Error","El Campo de la Fecha de hecho esta vacío") Else If $sComboRead1 > $date Then MsgBox(16,"Error", "La fecha no puede ser superior al día de hoy") Else If $sComboRead2 = "" Then MsgBox(16,"Error","El Campo de la Hora esta vacío") Else If $sComboRead3 = "" Then MsgBox(16,"Error","El Campo de la Fecha de Fuente esta vacío") Else If $sComboRead3 > $date Then MsgBox(16,"Error", "La fecha de fuente no puede ser superior al día de hoy") Else If $sComboRead4 = "" Then MsgBox(16,"Error","El Número de Fuente esta vacío") Else If $sComboRead5 = "" Then MsgBox(16,"Error","Datos de la dirección Incompletos") Else If $sComboRead6 = "" Then MsgBox(16,"Error","Datos de la dirección Incompletos") Else If $sComboRead8 = "" Then MsgBox(16,"Error","Datos de la dirección Incompletos") Else If $sComboRead9 = "" Then MsgBox(16,"Error","Datos de la dirección Incompletos") Else If $sComboRead12 = "" Then MsgBox(16,"Error","No Hay Punto Cardinal") Else If $sComboRead14 = "" Then MsgBox(16,"Error","Seleccione Tipo de Documento") Else If $sComboRead15 = "" Then MsgBox(16,"Error","Campo de Documento Vacío") Else If $sComboRead16 = "" Then MsgBox(16,"Error","Apellido Vacío") Else If $sComboRead17 = "" Then MsgBox(16,"Error","Nombre Vacío") Else If $sComboRead18 = "" Then MsgBox(16,"Error","Sexo Vacío") Else If $sComboRead19 = "" Then MsgBox(16,"Error","Fecha de nacimiento vacía");=============== Pendiente lo del calculo de la fecha de nacimiento ============== Else If $sComboRead19 >= $date Then MsgBox(16,"Error", "¿Que? Es que nació hoy? O no ha nacido?") Else If $sComboRead20 = "" Then MsgBox(16,"Error","Seleccione Tipo de Captura") Else If $sComboRead20 = "Flagrancia" And $sComboRead13 = "" Then MsgBox(16,"Error", "Si es flagrancia, debe llevar número de noticia.") Else If $sComboRead20 = "Orden Judicial" And $sComboRead21 ="" Then MsgBox(16,"Error","Si Es Orden Judicial Llene Los Datos De Forma Correcta Falta Fecha") Else If $sComboRead20 = "Orden Judicial" And $sComboRead22 ="" Then MsgBox(16,"Error","Si Es Orden Judicial Llene Los Datos De Forma Correcta Falta Número") Else Run("notepad.exe") WinWait("Sin título: Bloc de notas") WinActivate("Sin título: Bloc de notas") Send ($sComboRead1) EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndSwitch WEndI will introduce a longer code, but because I need to see if I explain how to set it up to check the progress of the process. Edited June 29, 2015 by JuanFelipe Link to comment Share on other sites More sharing options...
mLipok Posted June 29, 2015 Share Posted June 29, 2015 (edited) Please read this info about posting code on the forum. Edited June 29, 2015 by mLipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
JuanFelipe Posted June 29, 2015 Author Share Posted June 29, 2015 (edited) Already. I apologize, but I could help ... Edited June 29, 2015 by JuanFelipe Link to comment Share on other sites More sharing options...
argumentum Posted June 29, 2015 Share Posted June 29, 2015 (edited) Hello friends, I could help because I tried to make a progress bar that I check the progress of my script, thank you for your cooperation.I'd write it like so:expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $date = @MDAY & "/" & @MON & "/" & @YEAR #Region ### START Koda GUI section ### Form=c:\users\juan.caballeron\desktop\ \programacion\autoit\capturas\koda_1.7.3.0\forms\grabar capturas.kxf $Form1_1 = GUICreate("WhiteSnake... Para Colaboración de los compañeros, Pan y Gaseosa Diariamente para Caballo.", 686, 518, -1, -1) $MenuItem1 = GUICtrlCreateMenu("&Capturas") $MenuItem2 = GUICtrlCreateMenu("&Vehiculos") GUISetIcon("C:\Users\juan.caballeron\Desktop\ \Programacion\Autoit\Capturas\koda_1.7.3.0\iconos\Avatar on ice-256.ico", -1) GUISetCursor(7) GUISetBkColor(0xA6CAF0) $hechos = GUICtrlCreateGroup("Hechos", 16, 32, 449, 209) GUICtrlSetColor(-1, 0x000000) $box_fechah = GUICtrlCreateInput("", 112, 80, 81, 21);==== Fecha de Hecho GUICtrlSetLimit(-1, 10) $box_hora = GUICtrlCreateInput("", 112, 120, 81, 21);==== Hora GUICtrlSetLimit(-1, 5) $box_fechaf = GUICtrlCreateInput("", 112, 160, 81, 21);==== Fecha Fuente GUICtrlSetLimit(-1, 10) $box_fte = GUICtrlCreateInput("", 112, 200, 81, 21);==== Numero de fuente GUICtrlSetLimit(-1, 6) $Label3 = GUICtrlCreateLabel("Fecha Hecho:", 24, 80, 72, 17) $Label4 = GUICtrlCreateLabel("Hora:", 24, 120, 30, 17) $Label5 = GUICtrlCreateLabel("Fecha Fuente:", 24, 160, 73, 17) $Label6 = GUICtrlCreateLabel("Nro. Fuente:", 24, 200, 63, 17) $lbldirec = GUICtrlCreateLabel("Dirección de Caso", 264, 48, 91, 17) $lbl1 = GUICtrlCreateLabel("1.", 216, 88, 13, 17) $lbl2 = GUICtrlCreateLabel("2.", 216, 120, 13, 17) $boxcl = GUICtrlCreateCombo("", 240, 88, 41, 21);==== CALLE GUICtrlSetData($boxcl, "CL|KR|DG|TR") $numcl = GUICtrlCreateInput("", 288, 88, 41, 21);==== Número de Calle GUICtrlSetLimit(-1, 3) $comcl = GUICtrlCreateInput("", 336, 88, 41, 21);==== Composicion Calle GUICtrlSetLimit(-1, 4) $boxkr = GUICtrlCreateCombo("", 240, 120, 41, 21);==== Carrera GUICtrlSetData($boxkr, "CL|KR|DG|TR") $numkr = GUICtrlCreateInput("", 288, 120, 41, 21);==== Numero de Carrera GUICtrlSetLimit(-1, 3) $comkr = GUICtrlCreateInput("", 336, 120, 41, 21);=== Composicion Carrera GUICtrlSetLimit(-1, 4) $num2kr = GUICtrlCreateInput("", 384, 120, 41, 21);=== Complemento Carrera $pcardinal = GUICtrlCreateCombo("", 232, 160, 201, 21);==== Punto Cardinal GUICtrlSetData($pcardinal, "Sur|Norte|Oriente|Occidente") $noticia = GUICtrlCreateInput("", 232, 200, 201, 21);=== Noticia Criminal GUICtrlSetLimit(-1, 21) $Label13 = GUICtrlCreateLabel("P. Cardinal", 304, 144, 55, 17) $Label18 = GUICtrlCreateLabel("Tipo", 248, 72, 25, 17) $Label19 = GUICtrlCreateLabel("Num.", 296, 72, 29, 17) $Label20 = GUICtrlCreateLabel("Com.", 344, 72, 28, 17) $Label21 = GUICtrlCreateLabel("_______", 384, 88, 46, 17) $Label22 = GUICtrlCreateLabel("No. Noticia", 304, 184, 57, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $personas = GUICtrlCreateGroup("Datos de la Persona", 16, 256, 665, 185) $Label1 = GUICtrlCreateLabel("Tipo Identificación:", 32, 288, 94, 17) $Label2 = GUICtrlCreateLabel("No. Documento:", 32, 312, 82, 17) $Label7 = GUICtrlCreateLabel("Apellidos", 32, 336, 46, 17) $Label8 = GUICtrlCreateLabel("Nombres", 32, 360, 46, 17) $Label9 = GUICtrlCreateLabel("Sexo", 32, 384, 28, 17) $Label10 = GUICtrlCreateLabel("Fecha Nacimiento", 32, 408, 90, 17) $Combo1 = GUICtrlCreateCombo("", 128, 288, 49, 21);=== Tipo de Identificación GUICtrlSetData($Combo1, "TI|CC|CE|PS|RC") $documento = GUICtrlCreateInput("", 128, 312, 193, 21);=== Número de Identificación $apellidos = GUICtrlCreateInput("", 128, 336, 377, 21);=== Apellidos $nombres = GUICtrlCreateInput("", 128, 360, 377, 21);=== Nombres $Combo2 = GUICtrlCreateCombo("", 128, 384, 49, 21);====SEXO GUICtrlSetData($Combo2, "Mas|Fem") $fecha_naci = GUICtrlCreateInput("", 128, 408, 81, 21);=== Fecha Nacimiento GUICtrlSetLimit(-1, 10) $Label16 = GUICtrlCreateLabel("Use T. para Tarjeta y C. para Cédula.", 184, 288, 180, 17) $Label17 = GUICtrlCreateLabel("M. Masculino y F. Femenino", 184, 384, 136, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $datoscap = GUICtrlCreateGroup("Datos Capturas", 480, 32, 201, 209) $Label11 = GUICtrlCreateLabel("Tipo", 496, 80, 25, 17) $Label12 = GUICtrlCreateLabel("Fecha OJ", 496, 120, 50, 17) $Label14 = GUICtrlCreateLabel("Número OJ", 496, 160, 57, 17) $Label15 = GUICtrlCreateLabel("Delito", 496, 184, 31, 17) $tipocap = GUICtrlCreateCombo("", 560, 80, 97, 21);=== Tipo de Captura GUICtrlSetData($tipocap, "Flagrancia|Orden Judicial") $fechaoj = GUICtrlCreateInput("", 560, 120, 97, 21);=== Fecha de la Orden GUICtrlSetLimit(-1, 10) $numoj = GUICtrlCreateInput("", 560, 160, 97, 21);=== Número de la orden $delitocap = GUICtrlCreateInput("", 496, 200, 169, 21);=== Delito GUICtrlCreateGroup("", -99, -99, 1, 1) $Titulo = GUICtrlCreateLabel("PROCESO PARA GRABAR CAPTURAS EN EL SIEDCO.", 175, 8, 277, 17, $SS_CENTER) GUICtrlSetCursor(-1, 3) $Progress1 = GUICtrlCreateProgress(512, 472, 169, 9, BitOR($WS_BORDER, $WS_CLIPSIBLINGS)) GUICtrlSetCursor(-1, 15) $creador = GUICtrlCreateLabel("By WhiteSnake", 16, 472, 78, 17) GUICtrlSetColor(-1, 0xFF0000) $iniciar = GUICtrlCreateButton("INICIAR PROCESO", 360, 464, 145, 25) GUICtrlSetCursor(-1, 0) $Icon1 = GUICtrlCreateIcon("C:\Users\juan.caballeron\Desktop\ \Programacion\Autoit\Capturas\koda_1.7.3.0\iconos\1249549841170809086.ico", -1, 96, 464, 32, 32) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Local $sComboRead1 = "" Local $sComboRead2 = "" Local $sComboRead3 = "" Local $sComboRead4 = "" Local $sComboRead5 = "" Local $sComboRead6 = "" Local $sComboRead7 = "" Local $sComboRead8 = "" Local $sComboRead9 = "" Local $sComboRead10 = "" Local $sComboRead11 = "" Local $sComboRead12 = "" Local $sComboRead13 = "" Local $sComboRead14 = "" Local $sComboRead15 = "" Local $sComboRead16 = "" Local $sComboRead17 = "" Local $sComboRead18 = "" Local $sComboRead19 = "" Local $sComboRead20 = "" Local $sComboRead21 = "" Local $sComboRead22 = "" Local $sComboRead23 = "" Local $sError = "" While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete() Exit Case $iniciar $sComboRead1 = GUICtrlRead($box_fechah);========================== Fecha de Hecho $sComboRead2 = GUICtrlRead($box_hora);============================ Hora $sComboRead3 = GUICtrlRead($box_fechaf);========================== Fecha Fuente $sComboRead4 = GUICtrlRead($box_fte);============================= Numero de fuente $sComboRead5 = GUICtrlRead($boxcl);=============================== Calle $sComboRead6 = GUICtrlRead($numcl);=============================== Número de Calle $sComboRead7 = GUICtrlRead($comcl);=============================== Composicion Calle $sComboRead8 = GUICtrlRead($boxkr);=============================== Carrera $sComboRead9 = GUICtrlRead($numkr);=============================== Numero de Carrera $sComboRead10 = GUICtrlRead($comkr);============================== Composicion Carrera $sComboRead11 = GUICtrlRead($num2kr);============================= Complemento Carrera $sComboRead12 = GUICtrlRead($pcardinal);========================== Punto Cardinal $sComboRead13 = GUICtrlRead($noticia);============================ Noticia Criminal $sComboRead14 = GUICtrlRead($Combo1);============================= Tipo de Identificación $sComboRead15 = GUICtrlRead($documento);========================== Número de Identificación $sComboRead16 = GUICtrlRead($apellidos);========================== Apellidos $sComboRead17 = GUICtrlRead($nombres);============================ Nombres $sComboRead18 = GUICtrlRead($Combo2);============================= Sexo $sComboRead19 = GUICtrlRead($fecha_naci);========================= Fecha Nacimiento $sComboRead20 = GUICtrlRead($tipocap);============================ Tipo de Captura $sComboRead21 = GUICtrlRead($fechaoj);============================ Fecha de la Orden $sComboRead22 = GUICtrlRead($numoj);============================== Número de la orden $sComboRead23 = GUICtrlRead($delitocap);========================== Delito $sError = "" If $sComboRead1 = "" Then $sError &= "El Campo de la Fecha de hecho esta vacío"&@CRLF If $sComboRead1 > $date Then $sError &= "La fecha no puede ser superior al día de hoy"&@CRLF If $sComboRead2 = "" Then $sError &= "El Campo de la Hora esta vacío"&@CRLF If $sComboRead3 = "" Then $sError &= "El Campo de la Fecha de Fuente esta vacío"&@CRLF If $sComboRead3 > $date Then $sError &= "La fecha de fuente no puede ser superior al día de hoy"&@CRLF If $sComboRead4 = "" Then $sError &= "El Número de Fuente esta vacío"&@CRLF If $sComboRead5 = "" Then $sError &= "Datos de la dirección Incompletos"&@CRLF If $sComboRead6 = "" Then $sError &= "Datos de la dirección Incompletos"&@CRLF If $sComboRead8 = "" Then $sError &= "Datos de la dirección Incompletos"&@CRLF If $sComboRead9 = "" Then $sError &= "Datos de la dirección Incompletos"&@CRLF If $sComboRead12 = "" Then $sError &= "No Hay Punto Cardinal"&@CRLF If $sComboRead14 = "" Then $sError &= "Seleccione Tipo de Documento"&@CRLF If $sComboRead15 = "" Then $sError &= "Campo de Documento Vacío"&@CRLF If $sComboRead16 = "" Then $sError &= "Apellido Vacío"&@CRLF If $sComboRead17 = "" Then $sError &= "Nombre Vacío"&@CRLF If $sComboRead18 = "" Then $sError &= "Sexo Vacío"&@CRLF If $sComboRead19 = "" Then $sError &= "Fecha de nacimiento vacía"&@CRLF;=============== Pendiente lo del calculo de la fecha de nacimiento ============== If $sComboRead19 >= $date Then $sError &= "¿Que? Es que nació hoy? O no ha nacido?"&@CRLF If $sComboRead20 = "" Then $sError &= "Seleccione Tipo de Captura"&@CRLF If $sComboRead20 = "Flagrancia" And $sComboRead13 = "" Then $sError &= "Si es flagrancia, debe llevar número de noticia."&@CRLF If $sComboRead20 = "Orden Judicial" And $sComboRead21 = "" Then $sError &= "Si Es Orden Judicial Llene Los Datos De Forma Correcta Falta Fecha"&@CRLF If $sComboRead20 = "Orden Judicial" And $sComboRead22 = "" Then $sError &= "Si Es Orden Judicial Llene Los Datos De Forma Correcta Falta Número"&@CRLF If $sError = "" Then Run("notepad.exe") WinWait("Sin título: Bloc de notas") WinActivate("Sin título: Bloc de notas") Send($sComboRead1) Else MsgBox(16,"error",$sError,99,$Form1_1) EndIf EndSwitch WEndon the other hand, I don't understand the question. Edited June 29, 2015 by argumentum fix my code JuanFelipe 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
JuanFelipe Posted June 30, 2015 Author Share Posted June 30, 2015 (edited) . Edited June 30, 2015 by JuanFelipe Link to comment Share on other sites More sharing options...
JuanFelipe Posted June 30, 2015 Author Share Posted June 30, 2015 Thank you for teaching me something so amazing to me, I can not express my gratitude, on the other hand what I ask for help is that I have a progress bar in the project and want it to fill as you run the code, if the execution of the code goes in half, also the progress bar.Again thank you very much for your help, I was surprised by what helped me since I am a novice in the field. Link to comment Share on other sites More sharing options...
argumentum Posted June 30, 2015 Share Posted June 30, 2015 try the example in the help file about GUICtrlCreateProgress , they you'll see that to use a progress bar, there has to be progress to be measured. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
JuanFelipe Posted June 30, 2015 Author Share Posted June 30, 2015 I'm trying to use it but I can not make it work, my understanding is that the progress bar is used to measure time and would not process the code? Link to comment Share on other sites More sharing options...
argumentum Posted June 30, 2015 Share Posted June 30, 2015 nope JuanFelipe, progress shows a bar representing a percentage from zero to one hundred. What you see is is a step send by the code. I'll code what I mean. BRB Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
argumentum Posted June 30, 2015 Share Posted June 30, 2015 expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("GUICtrlCreateProgress Example", 400, 92, 192, 124) $Progress1 = GUICtrlCreateProgress(8, 8, 278, 17) $Label1 = GUICtrlCreateLabel("0", 8, 32, 276, 22, $SS_CENTER, $WS_EX_STATICEDGE) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Button1 = GUICtrlCreateButton("<< back", 8, 56, 75, 25) $Button2 = GUICtrlCreateButton("forth >>", 208, 56, 75, 25) $Group1 = GUICtrlCreateGroup("Step ""size""", 288, 0, 105, 41, BitOR($GUI_SS_DEFAULT_GROUP, $BS_CENTER)) $Input1 = GUICtrlCreateInput("10", 296, 15, 89, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER)) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("Auto ""next"" delay", 288, 40, 105, 41, BitOR($GUI_SS_DEFAULT_GROUP, $BS_CENTER)) $Input2 = GUICtrlCreateInput("500", 296, 55, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER)) $Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 361, 57, 15, 15) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Local $iSavPos = 0; progressbar-saveposition Local $iAutoNext = 0 Local $iAutoNextTimer = TimerInit() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete() Exit Case $Checkbox1 If _IsChecked($Checkbox1) Then ;MsgBox($MB_SYSTEMMODAL, "", "The checkbox is checked.", 0, $Form1) If Not Int(GUICtrlRead($Input2)) Then GUICtrlSetData($Input2, 500) $iAutoNext = 1 $iAutoNextTimer = TimerInit() Else ;MsgBox($MB_SYSTEMMODAL, "", "The checkbox is not checked.", 0, $Form1) $iAutoNext = 0 EndIf Case $Button1 $iSavPos -= Int(GUICtrlRead($Input1)) If $iSavPos < 0 Then $iSavPos = 0 GUICtrlSetData($Progress1, $iSavPos) GUICtrlSetData($Label1, GUICtrlRead($Progress1)) Case $Button2 $iSavPos += Int(GUICtrlRead($Input1)) If $iSavPos > 100 Then $iSavPos = 100 GUICtrlSetData($Progress1, $iSavPos) GUICtrlSetData($Label1, GUICtrlRead($Progress1)) EndSwitch If $iAutoNext Then If TimerDiff($iAutoNextTimer) >= Int(GUICtrlRead($Input2)) Then ; wait for next progressstep $iAutoNextTimer = TimerInit() $iSavPos += Int(GUICtrlRead($Input1)) If $iSavPos > 100 Then $iSavPos = 0 GUICtrlSetData($Progress1, $iSavPos) GUICtrlSetData($Label1, GUICtrlRead($Progress1)) EndIf EndIf WEnd Func _IsChecked($idControlID) Return BitAND(GUICtrlRead($idControlID), $GUI_CHECKED) = $GUI_CHECKED EndFunc ;==>_IsChecked Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
argumentum Posted June 30, 2015 Share Posted June 30, 2015 Hello sir, excuse me in advance for disturbing So I've seen several examples of progress bars, have one in my form but I get not even make it to work. The truth took more or less a year with Autoit so I'm not very experienced, what I do is that when you click on on Start button, the progress bar runs as it is doing all the process that will put him the code. My apologies if I do not understand me very well or do not quite understand if you explain it to me.Attached is a picture in which I show my progress bar on Form.1.bmplook @JuanFelipe , I did see the progress bar in your form but it has no use until something gets done. Lets say the user fills the data then clicks"INICIAR PROCESO" then ???, where is the code for the initiated process at ?. Is not shown in the code you've posted. So no process, no use for a process bar. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
JuanFelipe Posted July 3, 2015 Author Share Posted July 3, 2015 OK, when I finished all my process I will send my code to you. argumentum 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now