AuToItItAlIaNlOv3R Posted September 5, 2009 Posted September 5, 2009 Hi forum,today I asked to me when i write i ProgressBar...It's possible to write into a progressbar, for esample :I would like to write in the progress bar, i've try with GuiCtrlSetData function but don't work.Hello
PsaltyDS Posted September 5, 2009 Posted September 5, 2009 Hi forum,today I asked to me when i write i ProgressBar...It's possible to write into a progressbar, for esample :I would like to write in the progress bar, i've try with GuiCtrlSetData function but don't work.Hello Write what? Post a short demo script that shows what doesn't work for you. GuiCtrlSetData() works fine to write the percentage to a progress bar created with GuiCtrlCreateProgress(). Use ProgressSet() if you created it with ProgressOn(). If it's from a foreign window's controls then it depends on how that app drew the progress bar. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Zedna Posted September 5, 2009 Posted September 5, 2009 He probably mean write text over progressbar. Try to use label with transparent background. Resources UDF ResourcesEx UDF AutoIt Forum Search
AuToItItAlIaNlOv3R Posted September 5, 2009 Author Posted September 5, 2009 I would write text in progressbar...how to do this? Thank's for help.
Medic84 Posted September 5, 2009 Posted September 5, 2009 GuiCtrlSetData used for set percents in the progress bar. How write text in the progress bar I don't know No good in English :( If I write with errors, excuse me...
Medic84 Posted September 5, 2009 Posted September 5, 2009 Try to use ProgressOn and ProgressOff No good in English :( If I write with errors, excuse me...
GEOSoft Posted September 5, 2009 Posted September 5, 2009 Hi forum,today I asked to me when i write i ProgressBar...It's possible to write into a progressbar, for esample :I would like to write in the progress bar, i've try with GuiCtrlSetData function but don't work.Hello That looks like you are using the standard progressbar and not GUICtrlCreateProgress() so the short answer to your question is "no". Not to mention that the GUICtrlSetdata() function only works with GUI Controls in an AutoIt GUI that was created using GUICreate(). George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Yashied Posted September 5, 2009 Posted September 5, 2009 It`s very easy to do. #Include <GUIConstantsEx.au3> #Include <StaticConstants.au3> GUICreate('MyGUI', 400, 101) $Progress = GUICtrlCreateProgress(20, 40, 360, 21) $Label = GUICtrlCreateLabel('100%', 170, 43, 60, 14, $SS_CENTER) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1, 9, 800) GUISetState() $Percent = 0 $Timer = TimerInit() While 1 If TimerDiff($Timer) > 150 Then $Timer = TimerInit() $Percent += 5 If $Percent > 100 Then $Percent = 0 EndIf GUICtrlSetData($Progress, $Percent) GUICtrlSetData($Label, $Percent & '%') EndIf $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
GEOSoft Posted September 5, 2009 Posted September 5, 2009 Again, look at the image. That appears to be a standard progress dialog created with ProgressOn() not GUICtrlCreateProgress(). George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Yashied Posted September 5, 2009 Posted September 5, 2009 (edited) Again, look at the image. That appears to be a standard progress dialog created with ProgressOn() not GUICtrlCreateProgress().What prevents OP to write your own ProgressBar. Edited September 5, 2009 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
Medic84 Posted September 5, 2009 Posted September 5, 2009 ProgressOn() created the window with no Icon in Heading No good in English :( If I write with errors, excuse me...
Yashied Posted September 5, 2009 Posted September 5, 2009 ProgressOn() created the window with no Icon in Heading Yes, you're right. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
GEOSoft Posted September 5, 2009 Posted September 5, 2009 What prevents OP to write your own ProgressBar.Absolutly nothing. I was just refering to the image in his first post where a bit of code would have provided the direction to take to solve the problem. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
andygo Posted September 5, 2009 Posted September 5, 2009 i tryed a little bit around: expandcollapse popup#include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> Opt('MustDeclareVars', 1) Example() Func Example() Local $progressbar1, $progressbar2, $button, $wait, $s, $msg, $m, $p1 GUICreate("My GUI Progressbar", 220, 100, 100, 200) $progressbar1 = GUICtrlCreateProgress(10, 10, 200, 20) $p1 = GUICtrlCreateLabel ("test", 10, 10, 200, 20, $SS_CENTER ) GUICtrlSetBkColor ( -1, $GUI_BKCOLOR_TRANSPARENT) $button = GUICtrlCreateButton("Start", 75, 70, 70, 20) GUISetState() $wait = 20; wait 20ms for next progressstep $s = 0; progressbar-saveposition Do $msg = GUIGetMsg() If $msg = $button Then GUICtrlSetData($button, "Stop") For $i = $s To 100 $m = GUIGetMsg() If $m = -3 Then ExitLoop If $m = $button Then GUICtrlSetData($button, "Next") $s = $i;save the current bar-position to $s ExitLoop Else $s = 0 GUICtrlSetData($progressbar1, $i) GUICtrlSetData ( $p1, "test") Sleep($wait) EndIf Next If $i > 100 Then GUICtrlSetData($button, "Start") GUICtrlSetData ( $p1, "test") endif EndIf Until $msg = $GUI_EVENT_CLOSE EndFunc at the end the "test" label is gone. dont know why....
Zedna Posted September 5, 2009 Posted September 5, 2009 It`s very easy to do. #Include <GUIConstantsEx.au3> #Include <StaticConstants.au3> GUICreate('MyGUI', 400, 101) $Progress = GUICtrlCreateProgress(20, 40, 360, 21) $Label = GUICtrlCreateLabel('100%', 170, 43, 60, 14, $SS_CENTER) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1, 9, 800) GUISetState() $Percent = 0 $Timer = TimerInit() While 1 If TimerDiff($Timer) > 150 Then $Timer = TimerInit() $Percent += 5 If $Percent > 100 Then $Percent = 0 EndIf GUICtrlSetData($Progress, $Percent) GUICtrlSetData($Label, $Percent & '%') EndIf $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Is it possible to draw text by opaque color to its background? Something like progressbar component from Delphi. You can see it in Total Commander's file copy dialog. Resources UDF ResourcesEx UDF AutoIt Forum Search
AuToItItAlIaNlOv3R Posted September 5, 2009 Author Posted September 5, 2009 I've fix the problem, thank's to all!
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