Jump to content

Search the Community

Showing results for tags 'Progressbar'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 18 results

  1. Version 1.0.0

    840 downloads

    I have created a UDF that will allow you to easily create a customizable GUI with either a standard progress bar or a marquee style progress bar. You can change the size and back ground color of the GUI, as well as the font, font size, and color of the text. The function doesn't require any parameters to operate, but the default text is very generic so you probably would want to set that at the very least.
  2. Hello, I am currently writing a program that parses a massive table from a website, and need a way to add a progress bar while parsing. I am currently using the function _IETableWriteToArray($oObj, True) to parse the array. I need the progress bar to update as the table is parsed, not just at the end of the parsing. Any help at all would be very much appreciated! *EDIT --> The array I am left with after parsing is $array[0-50000][16]
  3. Hi, I'd like to show a progress bar for an operation performed by an external program my script is running silently, I want to show it in a GUI I created using the GUICtrlCreateProgress but I have no idea how to do it. The important thing to point out is that there's no way of knowing how long the external program will run, as it is a file splitter and it depends on the size of file it splits and the split parts size. Can someone point me in the right direction or give me an example how to do so? This is my RunWait command: RunWait($MYFILES1 & '\fsplit.exe -split ' & $Size & ' mb ' & $File & " -f " & $File & "." & $extension) It uses multiple variables declared and set earlier in the script, how will I got about having the progress of that command shown using GUICtrlCreateProgress ? Is it possible? Thank you.
  4. I am currently working on a script which contains a cpu intensive GUI with too many tabs, and groups and so i would like to add something like a progress bar or a watermark which would load before the GUI and provide user with the information that the gui is loading and that he needs to wait. I tried adding Progress() function before the GUI Region but that failed to provide any significant improvement in my condition as the progressbar too takes more or less the same time to load. This is my GUI code #Region ### START Koda GUI section ### Form=\\desktop-dvg37gp\primary\sync\megasync\languages\autoit\programs\30second\final - copy\form\form1.kxf $MainMenu = GUICreate("Video Viewing Automator", 496, 592, -1, -1) GUISetIcon("", -1) $LogTab = GUICtrlCreateTab(0, 0, 489, 537, $WS_BORDER, BitOR($TCS_EX_FLATSEPARATORS,$WS_EX_STATICEDGE)) GUICtrlSetFont(-1, 10, 800, 0, "Default") $TabSheet1 = GUICtrlCreateTabItem("Log") $Log = GUICtrlCreateEdit("", 8, 26, 473, 465, BitOR($ES_AUTOVSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_HSCROLL,$WS_VSCROLL)) GUICtrlSetData(-1, "") GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Open_Log = GUICtrlCreateButton("Open Current Log in NotePad", 69, 501, 153, 25) $Open_LogF = GUICtrlCreateButton("Open Log Folder", 272, 501, 153, 25) $Options = GUICtrlCreateTabItem("Options") $Group1 = GUICtrlCreateGroup("LogIn", 284, 371, 110, 57, BitOR($GUI_SS_DEFAULT_GROUP,$BS_LEFT,$BS_FLAT)) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $LoginID = GUICtrlCreateInput("", 348, 379, 41, 21, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER)) GUICtrlSetCursor (-1, 0) $Password = GUICtrlCreateInput("", 348, 403, 41, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD,$WS_BORDER)) GUICtrlSetCursor (-1, 0) $LogID = GUICtrlCreateLabel("LogInID", 288, 384, 49, 17) $Pass = GUICtrlCreateLabel("Password", 288, 408, 58, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlSetCursor (-1, 0) $Group2 = GUICtrlCreateGroup("Push Updates", 4, 371, 150, 137, BitOR($GUI_SS_DEFAULT_GROUP,$BS_LEFT,$BS_FLAT)) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Psh_Tk1 = GUICtrlCreateInput("", 85, 403, 65, 21, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER)) GUICtrlSetCursor (-1, 0) $Label6 = GUICtrlCreateLabel("Token", 8, 408, 40, 17) $Psh_Chk = GUICtrlCreateCheckbox("Enable", 8, 485, 65, 17) GUICtrlSetCursor (-1, 0) $Label18 = GUICtrlCreateLabel("Send After Cycles", 8, 387, 105, 17) $Psh_AftCyc = GUICtrlCreateInput("", 116, 383, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetCursor (-1, 0) $Label45 = GUICtrlCreateLabel("Token", 8, 425, 40, 17) $Psh_Tk2 = GUICtrlCreateInput("", 85, 422, 65, 21, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER)) GUICtrlSetCursor (-1, 0) $Psh_Tk3 = GUICtrlCreateInput("", 85, 441, 65, 21, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER)) GUICtrlSetCursor (-1, 0) $Psh_Tk4 = GUICtrlCreateInput("", 85, 459, 65, 21, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER)) GUICtrlSetCursor (-1, 0) $Label46 = GUICtrlCreateLabel("Token", 8, 442, 40, 17) $Label47 = GUICtrlCreateLabel("Token", 7, 459, 40, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlSetCursor (-1, 0) $AutoStart = GUICtrlCreateGroup("Misc.", 157, 371, 126, 137) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Label22 = GUICtrlCreateLabel("", 167, 391, 4, 4) $autostartcheck = GUICtrlCreateCheckbox("Enable AutoStart ", 162, 386, 113, 17) GUICtrlSetCursor (-1, 0) $Label28 = GUICtrlCreateLabel("CIAP Limit", 197, 408, 62, 17) $CIAP = GUICtrlCreateInput("", 162, 406, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetCursor (-1, 0) $Label23 = GUICtrlCreateLabel("CustomerID", 197, 430, 69, 17) $NickName_Edit = GUICtrlCreateInput("", 162, 428, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetCursor (-1, 0) $Label8 = GUICtrlCreateLabel(" Zero Limit", 197, 450, 64, 17) $Z_Lim = GUICtrlCreateInput("", 162, 449, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetCursor (-1, 0) $Label14 = GUICtrlCreateLabel("Load Limit", 197, 479, 62, 17) $L_Lim = GUICtrlCreateInput("", 162, 473, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetCursor (-1, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group13 = GUICtrlCreateGroup("", 5, 26, 390, 345, BitOR($GUI_SS_DEFAULT_GROUP,$BS_LEFT,$BS_FLAT)) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Group3 = GUICtrlCreateGroup("Setting Scheme 1", 13, 34, 121, 313) $S1_Chk = GUICtrlCreateCheckbox("Enable", 18, 321, 65, 17) GUICtrlSetCursor (-1, 0) $Group7 = GUICtrlCreateGroup("Hustle", 21, 128, 105, 105) $S1_HusChk = GUICtrlCreateCheckbox("Enable", 28, 212, 65, 17) GUICtrlSetCursor (-1, 0) $Label30 = GUICtrlCreateLabel("Limit", 31, 144, 30, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $S1_HusLim = GUICtrlCreateInput("000", 73, 142, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $Label31 = GUICtrlCreateLabel("Before", 31, 169, 41, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $S1_HusBef = GUICtrlCreateInput("000", 73, 166, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $Label59 = GUICtrlCreateLabel("Thres.", 31, 193, 40, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $S1_HusThres = GUICtrlCreateInput("000", 73, 188, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group8 = GUICtrlCreateGroup("Target", 21, 47, 105, 81) $Label19 = GUICtrlCreateLabel("Today", 30, 62, 39, 17) $S1_TarToday = GUICtrlCreateInput("000", 80, 60, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $Label20 = GUICtrlCreateLabel("In Hours", 30, 87, 52, 17) GUICtrlSetFont(-1, 1, 800, 0, "MS Sans Serif") $S1_TarHours = GUICtrlCreateInput("000", 81, 82, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $S1_TarChk = GUICtrlCreateCheckbox("Enable", 27, 107, 65, 17) GUICtrlSetCursor (-1, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group9 = GUICtrlCreateGroup("Randomization", 21, 234, 105, 81) $Label24 = GUICtrlCreateLabel("Target", 27, 252, 41, 17) $S1_RandTar = GUICtrlCreateInput("000", 79, 249, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $Label29 = GUICtrlCreateLabel("Hustle", 27, 277, 40, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $S1_RandHus = GUICtrlCreateInput("000", 79, 272, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $S1_RandChk = GUICtrlCreateCheckbox("Enable", 25, 294, 65, 17) GUICtrlSetCursor (-1, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group15 = GUICtrlCreateGroup("Setting Scheme 1", 138, 40, 121, 305) $S2_Chk = GUICtrlCreateCheckbox("Enable", 143, 327, 65, 17) GUICtrlSetCursor (-1, 0) $Group16 = GUICtrlCreateGroup("Hustle", 146, 134, 105, 105) $S2_HusChk = GUICtrlCreateCheckbox("Enable", 153, 218, 65, 17) GUICtrlSetCursor (-1, 0) $Label33 = GUICtrlCreateLabel("Limit", 156, 150, 30, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $S2_HusLim = GUICtrlCreateInput("000", 198, 148, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $Label34 = GUICtrlCreateLabel("Before", 156, 175, 41, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $S2_HusBef = GUICtrlCreateInput("000", 198, 172, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $Label60 = GUICtrlCreateLabel("Thres.", 156, 199, 40, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $S2_HusThres = GUICtrlCreateInput("000", 198, 194, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group17 = GUICtrlCreateGroup("Target", 146, 53, 105, 81) $Label35 = GUICtrlCreateLabel("Today", 155, 68, 39, 17) $S2_TarToday = GUICtrlCreateInput("000", 205, 66, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $Label36 = GUICtrlCreateLabel("In Hours", 155, 93, 52, 17) GUICtrlSetFont(-1, 1, 800, 0, "MS Sans Serif") $S2_TarHours = GUICtrlCreateInput("000", 206, 88, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $S2_TarChk = GUICtrlCreateCheckbox("Enable", 152, 113, 65, 17) GUICtrlSetCursor (-1, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group18 = GUICtrlCreateGroup("Randomization", 146, 240, 105, 81) $Label37 = GUICtrlCreateLabel("Target", 152, 258, 41, 17) $S2_RandTar = GUICtrlCreateInput("000", 204, 255, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $Label38 = GUICtrlCreateLabel("Hustle", 152, 283, 40, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $S2_RandHus = GUICtrlCreateInput("000", 204, 278, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $S2_RandChk = GUICtrlCreateCheckbox("Enable", 150, 300, 65, 17) GUICtrlSetCursor (-1, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group19 = GUICtrlCreateGroup("Setting Scheme 1", 264, 40, 121, 305) $Group20 = GUICtrlCreateGroup("Hustle", 272, 134, 105, 105) $S3_HusChk = GUICtrlCreateCheckbox("Enable", 279, 218, 65, 17) GUICtrlSetCursor (-1, 0) $Label39 = GUICtrlCreateLabel("Limit", 282, 150, 30, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $S3_HusLim = GUICtrlCreateInput("000", 324, 148, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $Label40 = GUICtrlCreateLabel("Before", 282, 175, 41, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $S3_HusBef = GUICtrlCreateInput("000", 324, 172, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $Label61 = GUICtrlCreateLabel("Thres.", 282, 199, 40, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $S3_HusThres = GUICtrlCreateInput("000", 324, 194, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group21 = GUICtrlCreateGroup("Target", 272, 53, 105, 81) $Label41 = GUICtrlCreateLabel("Today", 281, 68, 39, 17) $S3_TarToday = GUICtrlCreateInput("000", 331, 66, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $Label42 = GUICtrlCreateLabel("In Hours", 281, 93, 52, 17) GUICtrlSetFont(-1, 1, 800, 0, "MS Sans Serif") $S3_TarHours = GUICtrlCreateInput("000", 332, 88, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $S3_TarChk = GUICtrlCreateCheckbox("Enable", 278, 113, 65, 17) GUICtrlSetCursor (-1, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group22 = GUICtrlCreateGroup("Randomization", 272, 240, 105, 81) $Label43 = GUICtrlCreateLabel("Target", 278, 258, 41, 17) $S3_RandTar = GUICtrlCreateInput("000", 330, 255, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $Label44 = GUICtrlCreateLabel("Hustle", 278, 283, 40, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $S3_RandHus = GUICtrlCreateInput("000", 330, 278, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $S3_RandChk = GUICtrlCreateCheckbox("Enable", 276, 300, 65, 17) GUICtrlSetCursor (-1, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $S3_Chk = GUICtrlCreateCheckbox("Enable", 269, 327, 65, 17) GUICtrlSetCursor (-1, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Chk_SRand = GUICtrlCreateCheckbox("Enable Scheme Randomization", 14, 351, 193, 17) GUICtrlSetCursor (-1, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlSetCursor (-1, 0) $Group23 = GUICtrlCreateGroup("Screenshots", 397, 31, 81, 108) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $ScrSht_FChk = GUICtrlCreateCheckbox("Fail", 402, 51, 41, 17) GUICtrlSetCursor (-1, 0) $ScrSht_SChk = GUICtrlCreateCheckbox("Success", 402, 74, 65, 17) GUICtrlSetCursor (-1, 0) $ScrSht_OpnFld = GUICtrlCreateButton("Open Folder", 401, 95, 73, 17) $ScrSht_DelAll = GUICtrlCreateButton("Delete All", 401, 115, 73, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group24 = GUICtrlCreateGroup("Log", 397, 140, 81, 65) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Log_OpnFld = GUICtrlCreateButton("Open Folder", 401, 154, 73, 17) $Log_DelAll = GUICtrlCreateButton("Delete All", 401, 180, 73, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group25 = GUICtrlCreateGroup("Coordinates", 397, 206, 81, 65) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Label48 = GUICtrlCreateLabel("X +/-", 407, 228, 33, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $Label49 = GUICtrlCreateLabel("Y +/-", 407, 249, 33, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $Coord_x = GUICtrlCreateInput("00", 444, 221, 25, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $Coord_y = GUICtrlCreateInput("00", 443, 242, 25, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Save_All = GUICtrlCreateButton("Save All", 203, 509, 83, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Group36 = GUICtrlCreateGroup("Calibration", 397, 273, 81, 97) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button5 = GUICtrlCreateButton("Delete All", 401, 333, 73, 17) $Button6 = GUICtrlCreateButton("Calibrate", 401, 302, 73, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group37 = GUICtrlCreateGroup("Initial Setup", 395, 371, 81, 57) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button8 = GUICtrlCreateButton("Start", 399, 400, 73, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group38 = GUICtrlCreateGroup("Settings Profile", 285, 428, 193, 41) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button7 = GUICtrlCreateButton("Save Current", 292, 446, 81, 17) $Button9 = GUICtrlCreateButton("Load New ", 387, 446, 81, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group39 = GUICtrlCreateGroup("Minimum Internet Speed", 285, 469, 193, 41) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Label57 = GUICtrlCreateLabel("Google Ping", 292, 487, 73, 17) $G_Ping = GUICtrlCreateInput("", 426, 484, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$WS_BORDER)) GUICtrlSetCursor (-1, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $TabSheet2 = GUICtrlCreateTabItem("Stats") GUICtrlSetState(-1,$GUI_SHOW) $Group4 = GUICtrlCreateGroup("Errors", 5, 397, 473, 57) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xC0C0C0) $pauses = GUICtrlCreateLabel("Video Auto Pause", 16, 413, 105, 17) $VAPE = GUICtrlCreateEdit("", 128, 408, 33, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "0") GUICtrlSetCursor (-1, 2) $Label2 = GUICtrlCreateLabel("Private Videos", 16, 432, 86, 17) $ChkZeroErrGUI = GUICtrlCreateEdit("", 278, 430, 33, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "0") GUICtrlSetCursor (-1, 2) $Label3 = GUICtrlCreateLabel("Restarts", 367, 432, 51, 17) $Rsrt = GUICtrlCreateEdit("", 430, 430, 33, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "0") GUICtrlSetCursor (-1, 2) $Label9 = GUICtrlCreateLabel("Check Zero", 199, 432, 70, 17) $PrivVideoGUI = GUICtrlCreateEdit("", 128, 430, 33, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "0") GUICtrlSetCursor (-1, 2) $Label10 = GUICtrlCreateLabel("Session Expired", 335, 408, 94, 17) $Session_Expired_Counter_GUI = GUICtrlCreateEdit("", 430, 408, 33, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "0") GUICtrlSetCursor (-1, 2) $Label11 = GUICtrlCreateLabel("Video Loading", 527, 388, 85, 17) $videoloaderr = GUICtrlCreateEdit("", 278, 408, 33, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "0") GUICtrlSetCursor (-1, 2) $Label21 = GUICtrlCreateLabel("", 16, 451, 4, 4) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Label13 = GUICtrlCreateLabel("VideoViewer", 203, 408, 74, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $basicstarts = GUICtrlCreateGroup("Time", 126, 30, 230, 145) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $RunTime = GUICtrlCreateLabel("Runtime", 132, 44, 50, 17) $Runtimefrm = GUICtrlCreateEdit("", 182, 42, 57, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "00:00:00") GUICtrlSetCursor (-1, 2) $Group26 = GUICtrlCreateGroup("Cycles", 133, 61, 89, 105) $lstcycle = GUICtrlCreateEdit("", 137, 79, 81, 81, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_VSCROLL)) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group27 = GUICtrlCreateGroup("Avg.", 241, 38, 110, 57) $Group28 = GUICtrlCreateGroup("Neces", 297, 50, 49, 41) $Edit6 = GUICtrlCreateEdit("", 301, 63, 41, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "00:00") GUICtrlSetCursor (-1, 2) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group29 = GUICtrlCreateGroup("Curr.", 245, 50, 49, 41) $Cycle_Avg = GUICtrlCreateEdit("", 249, 63, 41, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "00:00") GUICtrlSetCursor (-1, 2) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $dwntime = GUICtrlCreateEdit("", 292, 147, 57, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "0") GUICtrlSetCursor (-1, 2) $internetdwn = GUICtrlCreateLabel("Downtime", 230, 148, 59, 17) $Label56 = GUICtrlCreateLabel("Uptime", 230, 114, 43, 17) $UPtime = GUICtrlCreateEdit("", 292, 113, 57, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "0") GUICtrlSetCursor (-1, 2) GUICtrlCreateGroup("", -99, -99, 1, 1) $Mini = GUICtrlCreateGroup("Mini-Log", 5, 453, 473, 73) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xC0C0C0) $Log2 = GUICtrlCreateEdit("", 9, 471, 465, 49, BitOR($ES_AUTOVSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_VSCROLL,$WS_BORDER)) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlCreateGroup("", -99, -99, 1, 1) $Group5 = GUICtrlCreateGroup("Economics", 359, 30, 117, 145) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xC0C0C0) $Label4 = GUICtrlCreateLabel("Total ", 364, 89, 37, 17) $Eco_Total = GUICtrlCreateEdit("", 410, 85, 38, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "0") GUICtrlSetCursor (-1, 2) $Label5 = GUICtrlCreateLabel("Rate", 364, 57, 31, 17) $Eco_Rate = GUICtrlCreateEdit("", 409, 57, 38, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "0") GUICtrlSetCursor (-1, 2) $Label16 = GUICtrlCreateLabel("Rs.", 451, 57, 23, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $Label17 = GUICtrlCreateLabel("Rs.", 451, 86, 23, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $Label54 = GUICtrlCreateLabel("Target", 364, 124, 41, 17) $Eco_Tar = GUICtrlCreateEdit("", 410, 121, 38, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "0") GUICtrlSetCursor (-1, 2) $Label55 = GUICtrlCreateLabel("Rs.", 451, 125, 23, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") GUICtrlCreateGroup("", -99, -99, 1, 1) $Group6 = GUICtrlCreateGroup("Target", 5, 173, 241, 105) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xC0C0C0) $Group10 = GUICtrlCreateGroup("Hour", 15, 189, 110, 57) $Group30 = GUICtrlCreateGroup("Neces", 71, 201, 49, 41) $Tar_Hr_Nece = GUICtrlCreateEdit("", 83, 219, 25, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "00") GUICtrlSetCursor (-1, 2) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group31 = GUICtrlCreateGroup("Done", 19, 201, 49, 41) $Tar_Hr_Done = GUICtrlCreateEdit("", 31, 219, 25, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "00") GUICtrlSetCursor (-1, 2) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group11 = GUICtrlCreateGroup("Today", 130, 188, 110, 57) $Group32 = GUICtrlCreateGroup("Neces", 186, 200, 49, 41) $Tar_Today_Nece = GUICtrlCreateEdit("", 198, 218, 25, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "00") GUICtrlSetCursor (-1, 2) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group33 = GUICtrlCreateGroup("Done", 134, 200, 49, 41) $Tar_Today_Done = GUICtrlCreateEdit("", 146, 218, 25, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "00") GUICtrlSetCursor (-1, 2) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $Label1 = GUICtrlCreateLabel("Achieving Possible Today?", 13, 258, 157, 17) GUICtrlSetFont(-1, 7, 800, 0, "MS Sans Serif") $Tar_AchPos = GUICtrlCreateEdit("", 190, 254, 41, 17, BitOR($ES_CENTER,$ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "Yes") GUICtrlSetCursor (-1, 2) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group14 = GUICtrlCreateGroup("Views", 5, 29, 119, 145) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xC0C0C0) $Label50 = GUICtrlCreateLabel("Successful", 10, 45, 66, 17) $Label51 = GUICtrlCreateLabel("Attempted", 10, 67, 61, 17) $S_View = GUICtrlCreateEdit("", 85, 44, 33, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "00") GUICtrlSetCursor (-1, 2) $A_View = GUICtrlCreateEdit("", 85, 61, 33, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "00") GUICtrlSetCursor (-1, 2) $Group12 = GUICtrlCreateGroup("S. Rate", 43, 116, 57, 49) $S_Rate = GUICtrlCreateEdit("", 48, 137, 33, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "0") GUICtrlSetCursor (-1, 2) $Label15 = GUICtrlCreateLabel("%", 85, 137, 13, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") GUICtrlCreateGroup("", -99, -99, 1, 1) $Label7 = GUICtrlCreateLabel("Hustled", 10, 85, 47, 17) $Edit12 = GUICtrlCreateEdit("", 85, 84, 33, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "00") GUICtrlSetCursor (-1, 2) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group35 = GUICtrlCreateGroup("Randomization", 5, 278, 145, 120) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xC0C0C0) $Label26 = GUICtrlCreateLabel("Target", 11, 296, 41, 17) $Rand_Tar = GUICtrlCreateInput("000", 111, 293, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$ES_READONLY,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $Label52 = GUICtrlCreateLabel("Hustle", 11, 329, 40, 17) GUICtrlSetFont(-1, 2, 800, 0, "MS Sans Serif") $Rand_Hus = GUICtrlCreateInput("000", 111, 324, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$ES_READONLY,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) $Label53 = GUICtrlCreateLabel("Setting Scheme", 11, 361, 93, 17) $Rand_Setting = GUICtrlCreateInput("000", 112, 355, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_LOWERCASE,$ES_READONLY,$WS_BORDER)) GUICtrlSetFont(-1, 5, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group40 = GUICtrlCreateGroup("Expiry", 249, 221, 229, 57) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xC0C0C0) $Label58 = GUICtrlCreateLabel("Days left for License to Expire", 259, 244, 175, 17) GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif") $Expirydate_gui = GUICtrlCreateEdit("", 439, 244, 25, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "0") GUICtrlSetCursor (-1, 2) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group34 = GUICtrlCreateGroup("Expiry", 249, 175, 229, 47) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xC0C0C0) $Label12 = GUICtrlCreateLabel("PushBullet Alerts Sent", 267, 198, 130, 17) GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif") $Psh_Sent = GUICtrlCreateEdit("", 431, 196, 33, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "0") GUICtrlSetCursor (-1, 2) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group41 = GUICtrlCreateGroup("Coming Soon!", 154, 285, 325, 111) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xC0C0C0) $Label62 = GUICtrlCreateLabel("Coming Soon! :)", 269, 344, 94, 17) GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif") GUICtrlCreateGroup("", -99, -99, 1, 1) $TabSheet3 = GUICtrlCreateTabItem("About") $Credits = GUICtrlCreateLabel("Developer - Rohan Sawant", 173, 74, 157, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xC0C0C0) $Contact = GUICtrlCreateLabel("Email- rohansawantct83@gmail.com", 148, 53, 207, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xC0C0C0) $Label32 = GUICtrlCreateLabel("© 2016 Rohan Sawant All Rights Reserved", 78, 29, 347, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xC0C0C0) GUICtrlCreateTabItem("") GUICtrlSetCursor (-1, 0) $Start = GUICtrlCreateButton("Start ", 0, 560, 97, 25, $BS_PUSHLIKE) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xC0C0C0) GUICtrlSetCursor (-1, 0) $Label25 = GUICtrlCreateLabel("© 2016 Rohan Sawant All Rights Reserved", 234, 560, 249, 17) GUICtrlSetFont(-1, 7, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xC0C0C0) $Label27 = GUICtrlCreateLabel("Today", 384, 4, 49, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $TotalViews = GUICtrlCreateEdit("", 440, 4, 41, 17, BitOR($ES_NOHIDESEL,$ES_READONLY,$ES_WANTRETURN)) $N_Name = GUICtrlCreateEdit("", 280, 7, 73, 17, BitOR($ES_NOHIDESEL,$ES_READONLY,$ES_WANTRETURN)) $Edit1 = GUICtrlCreateEdit("", 104, 568, 65, 17, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, ""&Chr(39)&"Esc"&Chr(39)&" to Stop") GUICtrlSetFont(-1, 2, 400, 0, "MS Sans Serif") $PrgBar1 = GUICtrlCreateProgress(0, 536, 489, 17) Dim $MainMenu_AccelTable[1][2] = [["{INS}", $Start]] GUISetAccelerators($MainMenu_AccelTable) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### I am a newbie to programming, so the only thing i can think of to solve this problem is write another script. and have it ... ShellExecute("Script1.exe") ProgressOn("Loading...") ProgressSet(50,"Loading....") WinWait("Script1.exe) ProgressOff() is this the right way? if not what is ? Please let me know if my GUI region code is really needed here.
  5. #include <ColorConstants.au3>; Including required files #include <GUIConstantsEx.au3> #include <file.au3> #include <Array.au3> #include <string.au3> Example() Func Example() Local $hash Local $hashes = "hash.txt" _FileReadToArray($hashes, $hash) For $i = 1 To UBound($hash) - 500 $hashcheck = $hash[$i] $PDenc = "hash=" & $hashcheck & "&decrypt=Decrypt" $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("POST", "http://myurl/", False) ; Post url $oHTTP.SetRequestHeader("Host", "myurl") $oHTTP.SetRequestHeader("Connection", "keep-aliveContent-Length: 29") $oHTTP.SetRequestHeader("Cache-Control", "max-age=0") $oHTTP.SetRequestHeader("Origin", "http://myurl") $oHTTP.SetRequestHeader("Upgrade-Insecure-Requests", "1") $oHTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36") $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.SetRequestHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8") $oHTTP.SetRequestHeader("Referer", "http://myurl") $oHTTP.SetRequestHeader("Accept-Language", "en-US,en;q=0.8") $oHTTP.Send($PDenc) $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status sleep(2000) If $oStatusCode = 503 then MsgBox(4096, "Response code", $oStatusCode) ExitLoop EndIf ; Saves the body response regardless of the Response code $file = FileOpen("Received.html", 2) ; The value of 2 overwrites the file if it already exists FileWrite($file, $oReceived) $read = FileRead("Received.html") ;read file if StringInStr($read, "not found") Then ContinueLoop Else ContinueLoop $Datastring = ('</script></div><br/>') $newreadamount = _StringBetween($read, $Datastring, "</b><br/><br/>") ;read title from file $newreadamount[0] = StringReplace($newreadamount[0], '<b>', "") ; taking out the X makes it easier to compare value If @error Then ContinueLoop EndIf $file = FileOpen("decrypted.txt", 1) FileWrite($file, $newreadamount[0] & @CRLF) EndIf Next sleep(2000) EndFunc ;==>Example As you can read my script loads 500 lines of text, lets say I have a list with 10.000 lines Is there a way to show a progressbar GUI to show how long in a text file I am? I may not know how long a particular .txt file is always so I am thinking I need some sort of algorythm? Thanks in advance. ( I just got unclear if I actually read 500 lines each attempt or if I start with 500 and add 1 to it each time? ) For $i = 1 To UBound($hash) - 500 ; LIke that ^ For $i = 500 To UBound($hash) - 500 ; or like this^ Thanks a lot.
  6. I was having some problems with Progressbar with nested "FOR" Loop but I was using it unnecessarily so I end up with only one "FOR" Loop. Here I'm sharing with you two ways of solve the progressbar problem, this is not for advanced users, this is for reference and newbies like me. And about the progressbar using GUICtrlSetData() with one FOR Loop and variable cicles(for example cicles base of elements on Array with variable size) you can do it as fallow: Note: Does not matter if the Array size is 50 or 5000 the progressbar will work properly. $progress = GUICtrlCreateProgress() Local $count = UBound($Array) Local $imove = ((1 / $count) * 100) ; One is because you will SetData to Progress each 1 cicle. Local $itemp = 0 For $i = 0 To UBound($Array) - 1 ; Your Code could be here $itemp += $imove GUICtrlSetData($progress, $itemp) ; Or your code could be here. Next Another way to do it and I think is more elegant or fancy is like this: $progress = GUICtrlCreateProgress() Local $itemp = 0 Local $count = 0 Local $intcount = Floor(Ubound($Array)/100) For $i = 0 To UBound($Array) - 1 ; Your Code could be here If Mod($i, $intcount) == 0 Then $count = $count+1 GUICtrlSetData($progress, $count) EndIf ; Or your code could be here. Next Kind Regards Alien.
  7. Hello again, my second post in 24 hs! It's my first GUI... and my first progress bar also! Sorry if I make a newbie mistake. I want to configure a GUI Progress Bar by a double "for" loop. Here is my code with a specific annotation with what I want to do: Edit: new problem, I have no idea how can I continue with the next $a as if the current $a, I do not skip it because the line is an element less (I need help with both problems): #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <WinAPI.au3> #include <File.au3> #include <String.au3> #include <Array.au3> Local $idGUI = GUICreate("ProgressBar", 220, 130, 100, 200) Opt("GUIOnEventMode", 1) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEButton") Local $idInput = GUICtrlCreateInput("",80,20,60,20,$ES_NUMBER) Local $idProgressBar = GUICtrlCreateProgress(10, 60, 200, 20) Local $idButton1 = GUICtrlCreateButton("Start",85,100,50) GUICtrlSetOnEvent($idButton1, "StartProgressBar") Local $aFileOpen = _WinAPI_GetOpenFileName("Open a text file", "Text Files (*.txt)") Local $idCountLines = _FileCountLines($aFileOpen[2]) Local $idInputValue, $idSomething, $aFileResult, $idStringBetween GUISetState(@SW_SHOW, $idGUI) While 1 Sleep(20000) WEnd Func StartProgressBar() If StringInStr($aFileOpen[2], ".txt") = True Then $idInputValue = Int(GUICtrlRead($idInput)) If IsFloat($idCountLines/$idInputValue) = 1 Then $idStringBetween = _StringBetween(String($idCountLines/$idInputValue),"", ".") $idSomething = Number($idStringBetween[0]) + 1 Else $idSomething = $idCountLines/$idInputValue EndIf For $i = 1 To $idSomething $aFileResult = @ScriptDir & "\result-" & $i & ".txt" _FileCreate($aFileResult) FileOpen($aFileResult,2) For $a = ( ( ( $i - 1 ) * $idInputValue ) + 1 ) To ( $i * $idInputValue ) If FileReadLine($aFileOpen[2], $a) = "" Then ; Here I have no idea how can I continue with the next $a as if the current $a, I do not skip it because the line is an element less EndIf FileWrite($aFileResult,FileReadLine($aFileOpen[2], $a) & " - ") ;Here I want to set the progress bar value = current percentage (line that it is currently reading) of the 100% (total of lines in the file opened) Next FileClose($aFileResult) Next MsgBox(0,"Done","Done") GUICtrlSetData($idProgressBar,0) Else MsgBox(0,"Hello :)","Please open a file :D") EndIf EndFunc Func CLOSEButton() Exit EndFunc Thanks in advance.
  8. Hello , I am using this code to make a nice progress bar which also tells what is going on: #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= GUICreate("GUI", 294, 69, 192, 124) $idProgressBar = GUICtrlCreateProgress(8, 24, 278, 17) $idLabel = GUICtrlCreateLabel("0", 8, 24, 276, 17, $SS_CENTER) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### For $i = 0 To 10 GUICtrlSetData($idProgressBar, CalcPercent($i, 10)) GUICtrlSetData($idLabel, $i) Sleep(1000) Next While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func CalcPercent($iPartDone, $iTotal, $iRoundToDecimalPlace = 1) Return Round(($iPartDone / $iTotal) * 100, $iRoundToDecimalPlace) EndFuncBut the label hides behind the progress bar when I update it , How can I prevent this? Thanks in Advance, TD
  9. In my programm i need to delete folders/files and show the user about progress. Though it can can easily be done with FileDelete and DirRemove (without progress), the problem comes when the folder/file size is larger.It hanges the main gui completely. I searched the forum and found a script which deletes files one by one. However the script does not work properly. It does not delete all the files and folders. Once the script complete then i have to provide admin rights to delete remaining folder/files. Here is the script i am trying to use:- $DIR = "path\to\folder" If Not @error Then $FILE = _FileListToArray($DIR) If IsArray($FILE) Then Dim $PATH[5] ProgressOn("Removing "& $SEARCH,$DIR) For $INDEX = 1 To $FILE[0] ProgressSet($INDEX*100/$FILE[0],$FILE[$INDEX]) _PathSplit($DIR & "\" & $FILE[$INDEX],$PATH[1],$PATH[2],$PATH[3],$PATH[4]) If $PATH[4] <> "" Then FileDelete($DIR & "\" & $FILE[$INDEX]) Else DirRemove($DIR & "\" & $FILE[$INDEX],1) EndIf Sleep(250) Next ProgressOff() EndIf EndIf I also need to remove the folder where $DIR points to.
  10. Hello everyone, Question 1: How to attach an IE Download to a Progressbar? Question 2: How to make an IE Download like a streaming Download(download can be paused and continued every time)? Question 3: How to do it with my UDF like Code :o? Question 4: How to do add a Label which shows the released time? Question 5: How to show how long it takes also the Connection Speed? Question 6: How to get the Connection Speed to a Server? #include-once #include <MsgBoxConstants.au3> ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Patch ; Description ...: Easy Patch System(unzipping currently not included) ; I could need a bit help for this code ^-^. ; Syntax ........: _Patch($DownloadURL, $DownloadPath) ; Parameters ....: $DownloadURL - URL for the Download. ; $DownloadPath - Where the download file will be installed. ; $Title - Project Name Will be displayed in the MsgBox. ; Return values .: None ; Author ........: RaiNote ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; ===============================================================================================================================Func _Patch($DownloadURL,$DownloadPath) Func _Patch($DownloadURL,$DownloadPath,$Title = "Title") $Byte = InetGetSize($DownloadURL,0);Download Size If $Byte > 1024 Then $Kilobyte = $Byte / 1024;Converting Byte to Kilobytes If $Kilobyte > 1024 Then $Megabyte = $Kilobyte / 1024;Converting Kilobyte to Megabyte If $Megabyte > 1024 Then $Gigabyte = $Megabyte / 1024;Converting Megabyte to Gigabyte If $Gigabyte > 1024 Then $Terabyte = $Gigabyte / 1024;Converting Gigabyte to Terabyte If $Terabyte > 1024 Then $Petabyte = $Terabyte / 1024;Converting Terabyte to Petabyte If $Petabyte > 1024 Then $Exabyte = $Petabyte / 1024;Converting Petabyte to Exabyte $_PATCH_SIZE1 = Round($Exabyte,2) & " EB" ElseIf $Petabyte < 1024 Then $Petabyte = $Terabyte / 1024 $_PATCH_SIZE1 = Round($Petabyte,2) & " PB" EndIf ElseIf $Terabyte < 1024 Then $Terabyte = $Gigabyte / 1024 $_PATCH_SIZE1 = Round($Terabyte,2) & " TB" EndIf ElseIf $Gigabyte < 1024 Then $Gigabyte = $Megabyte / 1024 $_PATCH_SIZE1 = Round($Gigabyte,2) & " GB" EndIf ElseIf $Megabyte < 1024 Then $Megabyte = $Kilobyte / 1024 $_PATCH_SIZE1 = Round($Megabyte,2) & " MB" EndIf ElseIf $Kilobyte < 1024 Then $Kilobyte = $Byte / 1024 $_PATCH_SIZE1 = Round($Kilobyte,2) & " KB" EndIf ElseIf $Byte < 1024 Then $_PATCH_SIZE1 = $Byte & " Bytes" EndIf $_PATCH_INFO = MsgBox(52,$Title,$Title & "needs to be patched. If u want to patch continue" & @CRLF & " if not it will close automaticly.(Size :" & " " & $_PATCH_SIZE1 & ")",0) switch $_PATCH_INFO case 6 ;YES $_Patch_Download = InetGet($DownloadURL,$DownloadPath,0,0) case 7 ;NO Exit endswitch EndFunc ​Thx for this I hope someone could help me :3 also how is this UDF with the FileSizeSystem P.S.: Also a cat can get shy.
  11. When I upgraded from version 3.3.8.1 to the latest 3.3.12.0 I have the included functions _FTP_ProgressDownload and _FTP_ProgressUpload always showing a separate progress window, and not using the progress bar in the main gui. This happens also with the example code from the Help : #include <FTPEx.au3> #include <GUIConstantsEx.au3> #include <Misc.au3> #include <ProgressConstants.au3> Global $g_sRemoteFile = "/pub/software/databases/rt/SRPMS/ucs-local-modperl-2.0.3-1.src.rpm" Global $g_sLocalFile = @TempDir & "\temp.tmp" FileDelete($g_sLocalFile) Local $sServer = 'ftp.csx.cam.ac.uk' Local $sUsername = '' Local $sPass = '' Local $hInternetSession = _FTP_Open('MyFTP Control') ; passive allows most protected FTPs to answer Local $hFTPSession = _FTP_Connect($hInternetSession, $sServer, $sUsername, $sPass, 1) Global $g_idProgressBarCtrl, $g_idBtn_Cancel Example() _FTP_Close($hInternetSession) Func Example() ; create GUI GUICreate("My GUI download Progressbar", 220, 100, 100, 200) GUICtrlCreateLabel($g_sRemoteFile, 10, 10) $g_idProgressBarCtrl = GUICtrlCreateProgress(10, 40, 200, 20, $PBS_SMOOTH) GUICtrlSetColor(-1, 32250); not working with Windows XP Style $g_idBtn_Cancel = GUICtrlCreateButton("Cancel", 75, 70, 70, 20) GUISetState(@SW_SHOW) Local $sFunctionToCall = "_UpdateGUIProgressBar" _FTP_ProgressDownload($hFTPSession, $g_sLocalFile, $g_sRemoteFile, $sFunctionToCall) EndFunc ;==>Example Func _UpdateGUIProgressBar($iPercent) GUICtrlSetData($g_idProgressBarCtrl, $iPercent) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit -1 ; _FTP_DownloadProgress Aborts with -1, so you can exit your app afterwards Case $g_idBtn_Cancel Exit -2 ; Just Cancel, without special Return value EndSwitch Return 1 ; Otherwise continue Download EndFunc ;==>_UpdateGUIProgressBar And #include <FTPEx.au3> is the latest (June 1 2014) In my system the result is like this https://www.dropbox.com/s/kg9q7c4rzhmzrjk/errorFTPprogress.JPG?dl=0 Why ?
  12. This is just a 2014 update of >_InetGetGUI() and >_InetGetProgress(). I have purposely left the original examples untouched just for nostalgic purposes. _InetGetGUI() Example and Function: #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 #include <GUIConstantsEx.au3> #include <InetConstants.au3> #include <MsgBoxConstants.au3> #include <StringConstants.au3> Example() Func Example() Local $hGUI = GUICreate('_InetGetGUI()', 370, 90) Local $iLabel = GUICtrlCreateLabel('Welcome to the simple downloader', 5, 5, 270, 40) Local $iStartClose = GUICtrlCreateButton('&Download', 275, 2.5, 90, 25) Local $iProgressBar = GUICtrlCreateProgress(5, 60, 360, 20) GUISetState(@SW_SHOW, $hGUI) Local $sFilePath = '', $sFilePathURL = 'http://ipv4.download.thinkbroadband.com/5MB.zip' While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $iStartClose $sFilePath = _InetGetGUI($sFilePathURL, $iLabel, $iProgressBar, $iStartClose, @TempDir) Switch @error ; Check what the actual error was. Case 1 ; $INETGET_ERROR_1 MsgBox($MB_SYSTEMMODAL, 'Error', 'Check the URL or your Internet connection is working.') Case 2 ; $INETGET_ERROR_2 MsgBox($MB_SYSTEMMODAL, 'Fail', 'It appears the user interrupted the download.') Case Else MsgBox($MB_SYSTEMMODAL, 'Success', 'Successfully downloaded "' & $sFilePath & '"') EndSwitch EndSwitch WEnd GUIDelete($hGUI) EndFunc ;==>Example ; #FUNCTION# ==================================================================================================================== ; Name ..........: _InetGetGUI ; Description ...: Download a file updating a GUICtrlCreateProgress() ; Syntax ........: _InetGetGUI($sURL, $iLabel, $iProgress, $iButton[, $sDirectory = @ScriptDir]) ; Parameters ....: $sURL - A valid URL that contains the filename too ; $iLabel - ControlID of a GUICtrlCreateLabel comtrol. ; $iProgress - ControlID of a GUICtrlCreateProgress control. ; $iButton - ControlID of a GUICtrlCreateButton control. ; $sDirectory - [optional] Directory of where to download. Default is @ScriptDir. ; Return values .: Success - Downloaded filepath. ; Failure - Blank string & sets @error to non-zero ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func _InetGetGUI($sURL, $iLabel, $iProgress, $iButton, $sDirectory = @ScriptDir) Local Enum $INETGET_ERROR_0, $INETGET_ERROR_1, $INETGET_ERROR_2 Local $sFilePath = StringRegExpReplace($sURL, '^.*/', '') If StringStripWS($sFilePath, $STR_STRIPALL) == '' Then Return SetError($INETGET_ERROR_1, 0, $sFilePath) EndIf $sFilePath = StringRegExpReplace($sDirectory, '[\\/]+$', '') & '\' & $sFilePath Local $iFileSize = InetGetSize($sURL, $INET_FORCERELOAD) Local $hDownload = InetGet($sURL, $sFilePath, $INET_LOCALCACHE, $INET_DOWNLOADBACKGROUND) Local Const $iRound = 0 Local $iBytesRead = 0, $iPercentage = 0, $iSpeed = 0, _ $sProgressText = '', $sSpeed = 'Current speed: ' & _ByteSuffix($iBytesRead - $iSpeed) & '/s' Local $hTimer = TimerInit() Local $iError = $INETGET_ERROR_0, _ $sRead = GUICtrlRead($iButton) GUICtrlSetData($iButton, '&Cancel') While Not InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $iButton GUICtrlSetData($iLabel, 'Download cancelled.') $iError = $INETGET_ERROR_2 ExitLoop EndSwitch $iBytesRead = InetGetInfo($hDownload, $INET_DOWNLOADREAD) $iPercentage = $iBytesRead * 100 / $iFileSize $sProgressText = 'Downloading ' & _ByteSuffix($iBytesRead, $iRound) & ' of ' & _ByteSuffix($iFileSize, $iRound) & @CRLF & $sSpeed GUICtrlSetData($iLabel, $sProgressText) GUICtrlSetData($iProgress, $iPercentage) If TimerDiff($hTimer) >= 1000 Then $sSpeed = 'Current speed: ' & _ByteSuffix($iBytesRead - $iSpeed) & '/s' $iSpeed = $iBytesRead $hTimer = TimerInit() EndIf Sleep(20) WEnd InetClose($hDownload) GUICtrlSetData($iButton, $sRead) If $iError > $INETGET_ERROR_0 Then FileDelete($sFilePath) $sFilePath = '' EndIf Return SetError($iError, 0, $sFilePath) EndFunc ;==>_InetGetGUI Func _ByteSuffix($iBytes, $iRound = 2) ; By Spiff59 Local Const $aArray[9] = [' bytes', ' KB', ' MB', ' GB', ' TB', ' PB', ' EB', ' ZB', ' YB'] Local $iIndex = 0 While $iBytes > 1023 $iIndex += 1 $iBytes /= 1024 WEnd Return Round($iBytes, $iRound) & $aArray[$iIndex] EndFunc ;==>_ByteSuffix _InetGetProgress() Example and Function: #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 #include <InetConstants.au3> #include <MsgBoxConstants.au3> #include <StringConstants.au3> Example() Func Example() Local $sFilePathURL = 'http://ipv4.download.thinkbroadband.com/5MB.zip' Local $sFilePath = _InetGetProgress($sFilePathURL, @TempDir) If @error Then MsgBox($MB_SYSTEMMODAL, 'Error', 'Check the URL or your Internet connection is working.') Else MsgBox($MB_SYSTEMMODAL, 'Success', 'Successfully downloaded "' & $sFilePath & '"') EndIf EndFunc ;==>Example ; #FUNCTION# ==================================================================================================================== ; Name ..........: _InetGetProgress ; Description ...: Download a file showing a progress bar using ProgressOn. ; Syntax ........: _InetGetProgress($sURL[, $sDirectory = @ScriptDir]) ; Parameters ....: $sURL - A valid URL that contains the filename too. ; $sDirectory - [optional] Directory of where to download. Default is @ScriptDir. ; Return values .: Success - Downloaded filepath. ; Failure - Blank string & sets @error to non-zero ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func _InetGetProgress($sURL, $sDirectory = @ScriptDir) Local Const $INETGET_ERROR_1 = 1 Local $sFilePath = StringRegExpReplace($sURL, '^.*/', '') If StringStripWS($sFilePath, $STR_STRIPALL) == '' Then Return SetError($INETGET_ERROR_1, 0, $sFilePath) EndIf $sFilePath = StringRegExpReplace($sDirectory, '[\\/]+$', '') & '\' & $sFilePath Local $iFileSize = InetGetSize($sURL, $INET_FORCERELOAD) Local $hDownload = InetGet($sURL, $sFilePath, $INET_LOCALCACHE, $INET_DOWNLOADBACKGROUND) Local Const $iRound = 0 Local $iBytesRead = 0, $iPercentage = 0, $iSpeed = 0, _ $sProgressText = '', $sSpeed = 'Current speed: ' & _ByteSuffix($iBytesRead - $iSpeed) & '/s' Local $hTimer = TimerInit() ProgressOn('', '') While Not InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE) $iBytesRead = InetGetInfo($hDownload, $INET_DOWNLOADREAD) $iPercentage = $iBytesRead * 100 / $iFileSize $sProgressText = 'Downloading ' & _ByteSuffix($iBytesRead, $iRound) & ' of ' & _ByteSuffix($iFileSize, $iRound) & @CRLF & $sSpeed ProgressSet(Round($iPercentage, $iRound), $sProgressText, 'Downloading: ' & $sFilePath) If TimerDiff($hTimer) >= 1000 Then $sSpeed = 'Current speed: ' & _ByteSuffix($iBytesRead - $iSpeed) & '/s' $iSpeed = $iBytesRead $hTimer = TimerInit() EndIf Sleep(20) WEnd InetClose($hDownload) ProgressOff() Return $sFilePath EndFunc ;==>_InetGetProgress Func _ByteSuffix($iBytes, $iRound = 2) ; By Spiff59 Local Const $aArray[9] = [' bytes', ' KB', ' MB', ' GB', ' TB', ' PB', ' EB', ' ZB', ' YB'] Local $iIndex = 0 While $iBytes > 1023 $iIndex += 1 $iBytes /= 1024 WEnd Return Round($iBytes, $iRound) & $aArray[$iIndex] EndFunc ;==>_ByteSuffix
  13. Hi guys, i have some problem with this ProgressBar. The output of the software: libavutil 51. 39.100 / 51. 39.100 libavcodec 54. 3.100 / 54. 3.100 libavformat 54. 1.100 / 54. 1.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 62.100 / 2. 62.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 libpostproc 52. 0.100 / 52. 0.100 Input #0, flv, from 'C:\Test.flv': Metadata: starttime : 0 totalduration : 262 totaldatarate : 305 bytelength : 9979627 canseekontime : true sourcedata : B9503B12BHH1329724166020683 purl : pmsg : Duration: 00:04:21.95, start: 0.000000, bitrate: 304 kb/s Stream #0:0: Video: flv1, yuv420p, 400x226, 242 kb/s, 29.92 tbr, 1k tbn, 1k tbc Stream #0:1: Audio: mp3, 22050 Hz, stereo, s16, 64 kb/s [buffer @ 022477A0] w:400 h:226 pixfmt:yuv420p tb:1/1000000 sar:0/1 sws_param: Output #0, avi, to 'C:\Test.avi': Metadata: starttime : 0 totalduration : 262 totaldatarate : 305 bytelength : 9979627 canseekontime : true sourcedata : B9503B12BHH1329724166020683 purl : pmsg : ISFT : Lavf54.1.100 Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 400x226, q=2-31, 200 kb/s, 29.92 tbn, 29.92 tbc Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 22050 Hz, stereo, s16, 128 kb /s Stream mapping: Stream #0:0 -> #0:0 (flv -> mpeg4) Stream #0:1 -> #0:1 (mp3 -> libmp3lame) Press [q] to stop, [?] for help frame= 218 fps= 0 q=7.4 size= 416kB time=00:00:07.20 bitrate= 473.2kbits/s frame= 455 fps=454 q=5.8 size= 726kB time=00:00:15.17 bitrate= 392.0kbits/s frame= 687 fps=457 q=9.6 size= 1078kB time=00:00:22.88 bitrate= 385.9kbits/s frame= 927 fps=463 q=17.7 size= 1468kB time=00:00:30.90 bitrate= 389.1kbits/ frame= 1142 fps=456 q=19.2 size= 1786kB time=00:00:38.11 bitrate= 383.9kbits/ frame= 1383 fps=460 q=18.7 size= 2099kB time=00:00:46.18 bitrate= 372.4kbits/ frame= 1632 fps=466 q=21.0 size= 2414kB time=00:00:54.51 bitrate= 362.7kbits/ frame= 1732 fps=340 q=22.8 size= 2543kB time=00:00:57.83 bitrate= 360.2kbits/ frame= 1732 fps= 91 q=22.8 size= 2544kB time=00:00:57.86 bitrate= 360.2kbits/ frame= 1958 fps=101 q=16.3 size= 2866kB time=00:01:05.38 bitrate= 359.1kbits/ frame= 2224 fps=111 q=25.5 size= 3204kB time=00:01:14.29 bitrate= 353.3kbits/ frame= 2484 fps=121 q=13.5 size= 3549kB time=00:01:22.99 bitrate= 350.3kbits/ frame= 2749 fps=131 q=18.1 size= 3892kB time=00:01:31.82 bitrate= 347.2kbits/ frame= 2994 fps=140 q=31.0 size= 4278kB time=00:01:39.99 bitrate= 350.4kbits/ frame= 3237 fps=147 q=28.8 size= 4630kB time=00:01:48.14 bitrate= 350.7kbits/ frame= 3484 fps=155 q=25.7 size= 4941kB time=00:01:56.42 bitrate= 347.6kbits/ frame= 3775 fps=164 q=16.6 size= 5267kB time=00:02:06.11 bitrate= 342.1kbits/ frame= 4065 fps=173 q=14.2 size= 5639kB time=00:02:15.81 bitrate= 340.1kbits/ frame= 4319 fps=180 q=24.0 size= 6008kB time=00:02:24.32 bitrate= 341.0kbits/ frame= 4543 fps=186 q=22.7 size= 6342kB time=00:02:31.79 bitrate= 342.3kbits/ frame= 4786 fps=192 q=28.5 size= 6687kB time=00:02:39.92 bitrate= 342.5kbits/ frame= 5040 fps=198 q=31.0 size= 7075kB time=00:02:48.43 bitrate= 344.1kbits/ frame= 5284 fps=204 q=24.6 size= 7394kB time=00:02:56.58 bitrate= 343.0kbits/ frame= 5516 fps=208 q=31.0 size= 7709kB time=00:03:04.34 bitrate= 342.6kbits/ frame= 5758 fps=214 q=21.2 size= 7995kB time=00:03:12.41 bitrate= 340.4kbits/ frame= 6041 fps=220 q=11.8 size= 8319kB time=00:03:21.84 bitrate= 337.6kbits/ frame= 6279 fps=225 q=31.0 size= 8670kB time=00:03:29.81 bitrate= 338.5kbits/ frame= 6491 fps=228 q=31.0 size= 9071kB time=00:03:36.92 bitrate= 342.6kbits/ frame= 6756 fps=233 q=20.2 size= 9359kB time=00:03:45.77 bitrate= 339.6kbits/ frame= 7004 fps=238 q=18.4 size= 9652kB time=00:03:54.03 bitrate= 337.9kbits/ frame= 7260 fps=242 q=10.3 size= 9940kB time=00:04:02.59 bitrate= 335.7kbits/ frame= 7553 fps=248 q=2.0 size= 10177kB time=00:04:12.42 bitrate= 330.3kbits/s frame= 7838 fps=254 q=1.6 Lsize= 10652kB time=00:04:21.99 bitrate= 333.1kbits/ video:6124kB audio:4095kB global headers:0kB muxing overhead 4.236753% The value for the progress bar are: Duration: 00:04:21.95 --> time=00:04:21.99 The software isn't accurate at 100% but the last line change from: size= --> Lsize= So maybe i can use this for stop the ProgressBar. The script: #include <Constants.au3> Local $line, $fulltime, $lastreturn Local $input = "C:\input.flv" Local $output = "C:\output.avi" Local $soft = "C:\ffmpeg.exe" GUICreate("Progressbar", 220, 100, -1, -1) $process = GUICtrlCreateProgress(10, 10, 200, 20) GUISetState() $CMDDir = $soft & " -i " & $input & " -y " & $output ConsoleWrite($CMDDir) Local $PID = Run(@ComSpec & " /c " & $CMDDir, "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) ;run ffmpeg as stdout child While 1 $line &= StdoutRead($PID) ;read stdout If @error Then ExitLoop ;exit loop when stdout stream ends If Not $fulltime Then ;runs if the total length is unknown $return = StringRegExp($line,"Duration: (\d{2}):(\d{2}):(\d{2})",1) ;get the full length of the file If IsArray($return) Then $fulltime = $return[0]*3600 + $return[1]*60 + $return[2] ;convert the length to seconds. EndIf EndIf $array = StringSplit($line,@CRLF) ;create an array with lines like this: frame= 962 fps=374 q=31.0 size= 2242kB time=40.12 bitrate= 457.7kbits/s $return = StringRegExp($array[$array[0]-1],"time=(\d+)",1) ;grab the amount of seconds from the second to last line. (that one is always complete) If @error Then ContinueLoop If $return[0] <> $lastreturn Then ;if the progress changed this is true $lastreturn = Number($return[0]) GUICtrlSetData($process,Int(($lastreturn/$fulltime)*100)) ;set the processbar EndIf WEnd Not work and i don't know where is the error. Some advice? If someone want to do a test, can find the software here, Thanks
  14. UDF provide graphical control based on static class. Button Progressbar v1.01. Fix on Syntax Error Checking Download Choose server where you will download: fxControl.zip - code.google.com (renamed from zettoControl_v1.02.zip) fxControl.zip - autoitscript.com The next version of this UDF will named as fxControl (Control Framework). Screenshot Sample Application using zettoControl Z-Compressor [link fixed] Clean PC Clean PC Source available in spoiler below 'Codice Sorgente' text, in that page. but download link: dead. Its still useful because at least the source are here while you able replace image file with what you have. zettoControl_v1.02.zip
  15. Hi guys, I'm using the _ProgressMarquee by guinness. Work fine, but i have a little problem. If i remove the style to the GUICtrlCreateProgress, the size of the red element is too little ( i don't know how to call it ) And also i have lost the smooth to the red element. Anyway, how to make it bigger? #include <WinAPI.au3> #include <Constants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> $Form1 = GUICreate("TestProgress", 370, 101, 192, 124) $Button1 = GUICtrlCreateButton("Start", 8, 8, 65, 33) $Button2 = GUICtrlCreateButton("Stop", 80, 8, 57, 33) $Progress = GUICtrlCreateProgress(8, 48, 353, 33) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Progress), "wstr", 0, "wstr", 0) GUICtrlSetColor(-1, 0xFF0000) GUISetBkColor(0x000000) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _ProgressMarquee_Start($Progress) Case $Button2 _ProgressMarquee_Stop($Progress, 1) EndSwitch WEnd Func _ProgressMarquee_Start($iControlID = -1) Local $aArray = GUICtrlGetStyle($iControlID) If Not BitAND($PBS_MARQUEE, $aArray[0]) Then GUICtrlSetStyle($iControlID, $PBS_MARQUEE) EndIf Return GUICtrlSendMsg($iControlID, $PBM_SETMARQUEE, 1, 50) EndFunc ;==>_ProgressMarquee_Start Func _ProgressMarquee_Stop($iControlID = -1, $iReset = 0) If $iReset Then Return GUICtrlSetStyle($iControlID, 0) EndIf Return GUICtrlSendMsg($iControlID, $PBM_SETMARQUEE, 0, 50) EndFunc ;==>_ProgressMarquee_Stop Func GUICtrlGetStyle($iControlID) Local $aArray[2] = [-1, -1], $hControl = GUICtrlGetHandle($iControlID) $aArray[0] = _WinAPI_GetWindowLong($hControl, $GWL_STYLE) $aArray[1] = _WinAPI_GetWindowLong($hControl, $GWL_EXSTYLE) Return $aArray EndFunc ;==>GUICtrlGetStyle
  16. Hi Guys, I made a script that runs a loop through an excel sheet, extracts info, fills in a web page, submits. Then it extracts the results and puts it back into the spreadsheet. I tried adding a progress bar, and it seems to update only through 100. Meaning, if I input 5 rows, it will only show ~5% of the progress bar. If I do 300 rows, it fills the bar and continues working. Seems like I didn't give GUICtrlSetData the right parameters. Any suggestions is greatly appreciated. #Obfuscator_Parameters=/mergeonly #include <Excel.au3> #include <IE.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <ProgressConstants.au3> $Form1 = GUICreate("TaxCodes", 316, 200, -1, -1, -1, BitOR($WS_EX_ACCEPTFILES, $WS_EX_WINDOWEDGE)) $Label1 = GUICtrlCreateLabel("Tax Code Retriever", 16, 16, 283, 20) GUICtrlSetFont(-1, 12, 800, 4, "MingLiU") $file = GUICtrlCreateInput("", 16, 56, 225, 21) $Input2 = GUICtrlCreateInput("", 16, 107, 49, 21) $Label2 = GUICtrlCreateLabel("Source file", 16, 39, 54, 17) $Label3 = GUICtrlCreateLabel("Amount of rows", 17, 88, 77, 17) $Button1 = GUICtrlCreateButton("Browse", 256, 56, 49, 25) $Button2 = GUICtrlCreateButton("Process", 113, 105, 89, 25) $prgrs = GUICtrlCreateProgress(20, 138, 275, 20, $PBS_SMOOTH) $Label4 = GUICtrlCreateLabel("Tzvi Spitz - v1 - July '12", 100, 178, 115, 17) GUICtrlSetFont(-1, 5, 400, 0, "MS Sans Serif") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit ;Browse to select excel sheet Case $Button1 $sfile = FileOpenDialog("Select enrollment file..", @WindowsDir & "\", "Excel File (*.csv;*.xlsx)", 1 + 4) GUICtrlSetData($file, $sfile) Case $Button2 FileCopy($sfile, $sfile & ".bak", 1) $oIE = _IECreate(0, 0, 0) If $sfile = "" Then MsgBox(0, "", "Error!" & @CRLF & "You need to input the proper info!") Exit Else ;open sheet read info to vars Local $oExcel = _ExcelBookOpen($sfile, 0) For $row = 2 To GUICtrlRead($Input2) GUICtrlSetData($prgrs, $row) Local $strt = _ExcelReadCell($oExcel, $row, 3) Local $zip = _ExcelReadCell($oExcel, $row, 6) Local $type = _ExcelReadCell($oExcel, $row, 16) ;Open IE instance, get elements _IENavigate($oIE, "http://www8.tax.ny.gov/UTLR/utlrHome") $o_form = _IEFormGetObjByName($oIE, "UTLRForm") $o_addr = _IEFormElementGetObjByName($o_form, "UTLR_STREETADDRESS_KEY") $o_zip = _IEFormElementGetObjByName($o_form, "UTLR_ZIPCODE_KEY") $o_type = _IEFormElementGetObjByName($o_form, "UTLR_SERVICETYPE_KEY") ; Set IE field values and submit the form _IEFormElementSetValue($o_addr, $strt) _IEFormElementSetValue($o_zip, $zip) If $type = "Commercial" Then _IEFormElementSetValue($o_type, "Commercial energy services") Else _IEFormElementSetValue($o_type, "Residential energy services") EndIf _IEFormSubmit($o_form) _IELoadWait($oIE) ;if not successfull If StringRegExp(_IEBodyReadText($oIE), 'No matches were found for the address you entered.') Then _ExcelWriteCell($oExcel, "ERROR", $row, 23) Else ;if succesfull write output to excel $aJurisdictionCodes = StringRegExp(_IEBodyReadText($oIE), 'Jurisdiction code:(.*)', 1) _ExcelWriteArray($oExcel, $row, 23, $aJurisdictionCodes, 1, 0) $o_form2 = _IEFormGetObjByName($oIE, "utlrHome") _IEFormSubmit($o_form2) EndIf Next _ExcelBookSave($oExcel) _ExcelBookClose($oExcel) _IEQuit($oIE) EndIf MsgBox(0, "yawn", "All done here, G'nite!") Exit EndSwitch WEnd
  17. The progressbar starts counting down when the autoit-window has NO focus. (The autoit-window is not active, another window is active) When the autoit-window get the focus (Window is activated) the progressbar start all over (Starts from 100% again) The progressbar changes color when : higher than 66% : green between 33% and 66% : yellow lower than 33% : red The window flashes 3 times when passing 66% and 33% The autoit-window closes when it reaches 0 % #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.4.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; #include <GUIConstantsEx.au3> Global Const $GUI_HIDE = 32 Global Const $GUI_SHOW = 16 Global Const $GUI_EVENT_CLOSE = -3 ; #include <ProgressConstants.au3> Global Const $PBS_VERTICAL = 0x04 Global Const $PBM_SETSTATE = 0x0410 ; #Include <WinAPI.au3> Global Const $tagFLASHWINFO = "uint Size;hwnd hWnd;dword Flags;uint Count;dword TimeOut" Global Const $__WINAPICONSTANT_FLASHW_CAPTION = 0x00000001 Global Const $__WINAPICONSTANT_FLASHW_TRAY = 0x00000002 Global Const $__WINAPICONSTANT_FLASHW_TIMER = 0x00000004 Global Const $__WINAPICONSTANT_FLASHW_TIMERNOFG = 0x0000000C Dim $o_Percentage $Form1 = GUICreate("Progress Bar Exemple", 150, 450, -1, -1) $Progress1 = GUICtrlCreateProgress(10, 10, 10, 400, $PBS_VERTICAL) $Label1 = GUICtrlCreateLabel ( "---------------", 50, 225) GUICtrlSetFont ($Label1, 12, 600) GUISetState(@SW_SHOW) GUICtrlSetState($Progress1, $GUI_HIDE) $Start_Time = TimerInit() $Time_To_Wait = 30000 ; miliseconden GUICtrlSetData($Progress1, 100) Sleep(500) GUICtrlSetState($Progress1, $GUI_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch Sleep(10) If WinActive($Form1) Then $Start_Time = TimerInit() EndIf $Current_Time_Difference = TimerDiff($Start_Time) If $Current_Time_Difference > $Time_To_Wait Then ;ProgressSet(100, "Done!") Sleep(750) ;ProgressOff() Exit Else $Percentage = 100 - Round((100/$Time_To_Wait) * $Current_Time_Difference) GuiCtrlSetData($Label1, String($Percentage) & " %") GUICtrlSetData($Progress1, $Percentage) If $o_Percentage >= 100 Then _SendMessage(GUICtrlGetHandle($Progress1), $PBM_SETSTATE, 1) ; green EndIf If $o_Percentage >= 66 and $Percentage < 66 Then _SendMessage(GUICtrlGetHandle($Progress1), $PBM_SETSTATE, 3) ; yellow _WinAPI_FlashWindowEx($Form1, 3, 3, 200) EndIf If $o_Percentage >= 33 and $Percentage < 33 Then _SendMessage(GUICtrlGetHandle($Progress1), $PBM_SETSTATE, 2) ; red _WinAPI_FlashWindowEx($Form1, 3, 3, 100) EndIf $o_Percentage = $Percentage EndIf WEnd Func _SendMessage($hWnd, $iMsg, $wParam = 0, $lParam = 0, $iReturn = 0, $wParamType = "wparam", $lParamType = "lparam", $sReturnType = "lresult") Local $aResult = DllCall("user32.dll", $sReturnType, "SendMessageW", "hwnd", $hWnd, "uint", $iMsg, $wParamType, $wParam, $lParamType, $lParam) If @error Then Return SetError(@error, @extended, "") If $iReturn >= 0 And $iReturn <= 4 Then Return $aResult[$iReturn] Return $aResult EndFunc ;==>_SendMessage ; #FUNCTION# ==================================================================================================================== ; Name...........: _WinAPI_FlashWindowEx ; Description ...: Flashes the specified window ; Syntax.........: _WinAPI_FlashWindowEx($hWnd[, $iFlags = 3[, $iCount = 3[, $iTimeout = 0]]]) ; Parameters ....: $hWnd - Handle to the window to be flashed. The window can be either open or minimized. ; $iFlags - The flash status. Can be one or more of the following values: ; |0 - Stop flashing. The system restores the window to its original state. ; |1 - Flash the window caption ; |2 - Flash the taskbar button ; |4 - Flash continuously until stopped ; |8 - Flash continuously until the window comes to the foreground ; $iCount - The number of times to flash the window ; $iTimeout - The rate at which the window is to be flashed, in milliseconds. If 0, the function uses the ; +default cursor blink rate. ; Return values .: Success - True ; Failure - False ; Author ........: Yoan Roblet (arcker) ; Modified.......: ; Remarks .......: Typically, you flash a window to inform the user that the window requires attention but does not currently ; have the keyboard focus. When a window flashes, it appears to change from inactive to active status. An ; inactive caption bar changes to an active caption bar; an active caption bar changes to an inactive caption ; bar. ; Related .......: _WinAPI_FlashWindow ; Link ..........: @@MsdnLink@@ FlashWindowEx ; Example .......: Yes ; =============================================================================================================================== Func _WinAPI_FlashWindowEx($hWnd, $iFlags = 3, $iCount = 3, $iTimeout = 0) Local $tFlash = DllStructCreate($tagFLASHWINFO) Local $pFlash = DllStructGetPtr($tFlash) Local $iFlash = DllStructGetSize($tFlash) Local $iMode = 0 If BitAND($iFlags, 1) <> 0 Then $iMode = BitOR($iMode, $__WINAPICONSTANT_FLASHW_CAPTION) If BitAND($iFlags, 2) <> 0 Then $iMode = BitOR($iMode, $__WINAPICONSTANT_FLASHW_TRAY) If BitAND($iFlags, 4) <> 0 Then $iMode = BitOR($iMode, $__WINAPICONSTANT_FLASHW_TIMER) If BitAND($iFlags, 8) <> 0 Then $iMode = BitOR($iMode, $__WINAPICONSTANT_FLASHW_TIMERNOFG) DllStructSetData($tFlash, "Size", $iFlash) DllStructSetData($tFlash, "hWnd", $hWnd) DllStructSetData($tFlash, "Flags", $iMode) DllStructSetData($tFlash, "Count", $iCount) DllStructSetData($tFlash, "Timeout", $iTimeout) Local $aResult = DllCall("user32.dll", "bool", "FlashWindowEx", "ptr", $pFlash) If @error Then Return SetError(@error, @extended, False) Return $aResult[0] EndFunc ;==>_WinAPI_FlashWindowEx I use indeed Windows 7 and the progressbar changes color ! @fett8802 and wakillon : Which OS do you use ?
  18. Hi guys, i have ther two script made with a help of some forumer The GUI $GUI = GUICreate("Test", 545, 267, -1, -1) $ProgressBar = GUICtrlCreateProgress(16, 226, 512, 25) $ProgressLabel = GUICtrlCreateLabel("Status: Ready", 16, 211, 511, 17) The working script: Func _FileDelete() For $I = 1 To $List[0] $ProgressSet = Int($I / ($List[0]) * 100) GUICtrlSetData($ProgressBar, $ProgressSet) FileDelete($List[$I]) GUICtrlSetData($ProgressLabel, "Status: Files deleting... " & $List[0] - $I) Next GUICtrlSetData($ProgressLabel, "Status: Ready") GUICtrlSetData($ProgressBar, 0) EndFunc The script not working Func _FileMove() $Destination = FileSelectFolder("Select folder...", "", 0, @WorkingDir) If @error Then MsgBox(16, "Error", "No folder") Return EndIf For $I = 1 To $List[0] $ProgressSet = Int($I / ($List[0]) * 100) FileMove($List[$I],$Destination) GUICtrlSetData($ProgressLabel, "Status: Files moving... " & $List[0] - $I) Next GUICtrlSetData($ProgressLabel, "Status: Ready") GUICtrlSetData($ProgressBar, 0) EndFunc The first work the progressbar an the label update with decreasing number. The second only decreasing number, progressbar don't working I don't understand why, FileDelete is not comparable to FileMove? If i move or delete from the array file is not the same for the script? Thanks for support
×
×
  • Create New...