fisheronline Posted August 17, 2013 Share Posted August 17, 2013 (edited) Just got auto it, I have a form and I want to add a progress bar which fills up to 100% when a button is pressed, how do I make it so when a button is used the progress bar fills in an "X" amount of time? Edited August 17, 2013 by fisheronline Link to comment Share on other sites More sharing options...
fisheronline Posted August 17, 2013 Author Share Posted August 17, 2013 no one? Link to comment Share on other sites More sharing options...
Developers Jos Posted August 17, 2013 Developers Share Posted August 17, 2013 You are kidding right? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
fisheronline Posted August 17, 2013 Author Share Posted August 17, 2013 why would I be kidding, all I want to know is how to implement my progress bar to take an X amount of time to fill when a button is pressed Link to comment Share on other sites More sharing options...
FireFox Posted August 17, 2013 Share Posted August 17, 2013 You would be kidding to remove the keygen word from your topic's title. Link to comment Share on other sites More sharing options...
Developers Jos Posted August 17, 2013 Developers Share Posted August 17, 2013 So you feel it is reasonable to bump a post after 19 minutes? Maybe you need to start reading our Forumrules and show a little effort first. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
fisheronline Posted August 17, 2013 Author Share Posted August 17, 2013 or maybe someone could point me in the right direction rather than replying and criticizing someone looking for a tip Link to comment Share on other sites More sharing options...
JohnOne Posted August 17, 2013 Share Posted August 17, 2013 Look in help file at GUICtrlCreateProgress() It has example. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
fisheronline Posted August 17, 2013 Author Share Posted August 17, 2013 Look in help file at GUICtrlCreateProgress() It has example. I have literally just got this programme, I have no idea what to type, the example is alone is longer than my whole script. :S Link to comment Share on other sites More sharing options...
Edano Posted August 17, 2013 Share Posted August 17, 2013 you say you have a form and a script. please post it so we can help. [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
fisheronline Posted August 18, 2013 Author Share Posted August 18, 2013 you say you have a form and a script. please post it so we can help. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=form2.kxf $form2 = GUICreate("form2", 621, 251, 204, 205) $Pic1 = GUICtrlCreatePic("C:\Users\Jack\Desktop\PPD Files\Skin.jpg", 0, 0, 620, 124) $Radio1 = GUICtrlCreateRadio("option 1", 20, 150, 113, 17) $Radio2 = GUICtrlCreateRadio("option 2", 160, 150, 113, 17) $Radio3 = GUICtrlCreateRadio("option 3", 20, 180, 113, 17) $Radio4 = GUICtrlCreateRadio("option 4", 160, 180, 113, 17) $Radio5 = GUICtrlCreateRadio("option 5", 20, 210, 113, 17) $Radio6 = GUICtrlCreateRadio("option 6", 160, 210, 113, 17) $Button1 = GUICtrlCreateButton("Generate", 360, 144, 187, 57) $Progress1 = GUICtrlCreateProgress(360, 210, 187, 17, BitOR($PBS_SMOOTH,$WS_BORDER)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $form2 EndSwitch WEnd ok that is my code, it has just basic radio buttons as options and a button, I wanted to know how to make it so when the button is pressed the progress bar I have will take an X amount of time to fill and then once done pop up with a message of my choice. this is my first code and I made it using Koda so if you tell me the script I need to add into it please show me where Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 18, 2013 Moderators Share Posted August 18, 2013 fisheronline, I would do it like this: #include <GUIConstantsEx.au3> #include <Constants.au3> #include <WindowsConstants.au3> #include <ProgressConstants.au3> $form2 = GUICreate("form2", 621, 251, 204, 205) $Radio1 = GUICtrlCreateRadio("option 1", 20, 150, 113, 17) $Radio2 = GUICtrlCreateRadio("option 2", 160, 150, 113, 17) $Radio3 = GUICtrlCreateRadio("option 3", 20, 180, 113, 17) $Radio4 = GUICtrlCreateRadio("option 4", 160, 180, 113, 17) $Radio5 = GUICtrlCreateRadio("option 5", 20, 210, 113, 17) $Radio6 = GUICtrlCreateRadio("option 6", 160, 210, 113, 17) $Button1 = GUICtrlCreateButton("Generate", 360, 144, 187, 57) $Progress1 = GUICtrlCreateProgress(360, 210, 187, 17, BitOR($PBS_SMOOTH,$WS_BORDER)) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 ; Start a loop For $i = 1 To 100 ; Increase the progress bar GUICtrlSetData($Progress1, $i + 1) ; I find this gives a better response GUICtrlSetData($Progress1, $i) ; Wait a bit Sleep(100) Next ; Show the MsgBox MsgBox($MB_SYSTEMMODAL, "Hi", "Generated whatever it is!") ; Reset the progress bar GUICtrlSetData($Progress1, 0) EndSwitch WEnd All clear? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
fisheronline Posted August 18, 2013 Author Share Posted August 18, 2013 ok so I just go into edit script and replace it with all of that and then add labels? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 18, 2013 Moderators Share Posted August 18, 2013 fisheronline,I would suggest that you make sure you undrstand what is going on in the script I posted before just pasting it into your own version or you will be back here in no time saying it does not work. For example, you will need to add code to do whatever it is happens when the "Generate" button is pressed, determine how long you want the progress bar to take to fill, and to read the option radios (otherwise why are they there?). If this is your first script, just take it slowly and make sure you know why you are using certain code elements rather then just pasting chunks of other people's code into yours and expecting it to integrate without problem. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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