fetush Posted November 21, 2012 Share Posted November 21, 2012 main.au3 #include <GUIConstantsEx.au3> #include <GUIConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Demo1", 640, 480) $ListView1 = GUICtrlCreateProgress(100, 100, 300, 200) $button = GUICtrlCreateButton("test", 0, 0, 200, 20) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $button Run("demoloadvalues.exe") EndSwitch WEnd updater.au3 #include <GUIConstantsEx.au3> #include <GuiListView.au3> #Include <SendMessage.au3> $handle = ControlGetHandle("test", "", "[CLASS:Static; INSTANCE:1]") GUICtrlSetData($handle, 50) so one is GUI with progressBar and 2nd script is just to update progressbar and whatnot in the first main script now strangely progressbar doesnt get udated. been searching and trying different stuff like _sendmessage() and so on but nothing helped. Link to comment Share on other sites More sharing options...
JohnOne Posted November 21, 2012 Share Posted November 21, 2012 Are you sure thr progress bar is a static control? 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...
fetush Posted November 21, 2012 Author Share Posted November 21, 2012 autoit info tools shows this info class;msctls_progress32 instance:1 i dont know what else? Link to comment Share on other sites More sharing options...
kylomas Posted November 21, 2012 Share Posted November 21, 2012 fetush, Look again at the help file for controlgethandle. You are not providing the name of the window with the control. kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
fetush Posted November 21, 2012 Author Share Posted November 21, 2012 (edited) tryed and still wont update the progress bar. ill update first post too now edit : cant edit first post o.o Edited November 21, 2012 by fetush Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 21, 2012 Moderators Share Posted November 21, 2012 fetush, Try this: Main script: #include <GUIConstantsEx.au3> $hGUI = GUICreate("Demo1", 640, 480) GUICtrlCreateProgress(100, 100, 300, 200) $cButton = GUICtrlCreateButton("Test", 0, 0, 200, 20) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cButton Run("updater.exe") EndSwitch WEnd Updater - compile and name "updater.exe" #Include <SendMessage.au3> #include <ProgressConstants.au3> $hHandle = ControlGetHandle("Demo1", "", "[CLASS:msctls_progress32; INSTANCE:1]") _SendMessage($hHandle, $PBM_SETPOS, 50, 0) That works for me. 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...
fetush Posted November 21, 2012 Author Share Posted November 21, 2012 thanks melba works just fine , and how about updating labels with that? im not sure what to put instead of $PBM_SETPOS just looked in msdn library but , not sure. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 21, 2012 Moderators Share Posted November 21, 2012 fetush,No need to send a message directly - ControlSetText will work for that: ; Main GUI #include <GUIConstantsEx.au3> $hGUI = GUICreate("Demo1", 640, 480) GUICtrlCreateProgress(100, 100, 300, 200) $cButton = GUICtrlCreateButton("Test", 0, 0, 200, 20) GUICtrlCreateLabel("Starting position", 10, 450, 200, 20) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cButton Run("updater.exe") EndSwitch WEnd; Updater - compile as updater.exe #Include <SendMessage.au3> #include <ProgressConstants.au3> $hHandle = ControlGetHandle("Demo1", "", "[CLASS:msctls_progress32; INSTANCE:1]") _SendMessage($hHandle, $PBM_SETPOS, 50, 0) $hHandle = ControlGetHandle("Demo1", "", "[CLASS:Static; INSTANCE:1]") ControlSetText("Demo1", "", $hHandle, "Progress set")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...
fetush Posted November 21, 2012 Author Share Posted November 21, 2012 thanks once again but when i tested controlsettext() it doesnt remove the text that is currently on that label instead it like "Paints Over" maybe im missing out on something? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 21, 2012 Moderators Share Posted November 21, 2012 fetush, Unsurprisingly it works perfectly for me or I would not have posted it. Are you using the exactly the same scripts as I posted? Can you post an image of the result on your machine? 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...
fetush Posted November 22, 2012 Author Share Posted November 22, 2012 sorry couldnt reply ... lol 5 posts a day but anyway i fixed the problem just setting in controlsettext() 1 on last call argument to redraw the gui.. which makes main gui flashy no matter how much delay i put on the updater but its ok . thnx for help the pic with problem btw il put too 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