AZJIO Posted January 1, 2011 Share Posted January 1, 2011 (edited) Text Progress Bar Using symbols as a progress bar example expandcollapse popup#NoTrayIcon Opt("GUIResizeMode", 802) Opt("GUIDataSeparatorChar", ChrW('0x00A4')) Global $Color=0x00ccff, $BkColor=0xf7f7f7 ; En $Lng1='Used symbol :' $LngSt='Start' $LngSz='Size :' $LngDl='Delay :' $LngSty='Style :' $LngSel='Choose' $LngAdd='Add' ; Ru If @OSLang = 0419 Then $Lng1='Используемый символ :' $LngSt='Старт' $LngSz='Размер бара (кол. симв.) :' $LngDl='Задержка :' $LngSty='Стиль :' $LngSel='Выбрать' $LngAdd='Добавить' EndIf $hForm = GUICreate("Text Progress Bar", 380, 160+30, -1, -1, 0x00040000) $hButton1 = GUICtrlCreateButton($LngSt, 260,115, 80, 30) GUICtrlCreateLabel($Lng1, 10, 43, 130, 17) $symbol = GUICtrlCreateCombo('', 140,40, 60) GUICtrlSetData(-1,' '&ChrW('0x2588')&'¤|¤/¤\¤*¤(¤)¤'&ChrW('0x25CF')&'¤'&ChrW('0x25AA')&'¤'&ChrW('0x2022')&'¤'&ChrW('0x2039')&'¤'&ChrW('0x203A')&'¤'&ChrW('0x2206')&'¤'&ChrW('0x20AC')&'¤!¤.', ' '&ChrW('0x2588')) GUICtrlCreateLabel($LngSz, 10, 73, 130, 17) $kol_sim = GUICtrlCreateCombo('', 140,70, 60) GUICtrlSetData(-1,'20¤30¤50¤100¤120¤200', '20') GUICtrlCreateLabel($LngDl, 10, 103, 130, 17) $Delay = GUICtrlCreateCombo('', 140,100, 60) GUICtrlSetData(-1,'10¤20¤50¤100¤200', '20') GUICtrlCreateLabel($LngSty, 10, 133, 130, 17) $Style= GUICtrlCreateCombo('', 140,130, 60) GUICtrlSetData(-1,'1¤2¤3¤4¤5', '1') GUICtrlCreateGroup('', 205, 28, 160, 72) $hSelect = GUICtrlCreateButton($LngSel, 210, 40, 60, 25) $hAdd = GUICtrlCreateButton($LngAdd, 210, 70, 60, 25) $Un = GUICtrlCreateCombo('', 280,40, 60) GUICtrlSetData(-1,'2588¤25A0¤F031¤25B2¤25BA¤25BC¤2590¤2666¤25D8¤263B', '2588') GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $hButton1 $symbol0 = GUICtrlRead($symbol) $Delay0 = GUICtrlRead($Delay) $kol_sim0 = GUICtrlRead($kol_sim) $aStartTPB=_TPB_ProgressOn(10, 5, $kol_sim0, 21, $symbol0) For $i = 0 To 100 Sleep($Delay0) _TPB_ProgressSet($aStartTPB, $i) ; GUICtrlSetData($hButton1, $i & " %") Next ; GUICtrlDelete($aStartTPB[0]) ; _TPB_ProgressClose($aStartTPB) Case $hSelect Run('charmap.exe') Case $hAdd, $Un $Un0 = ChrW('0x'&GUICtrlRead($Un)) GUICtrlSetData($symbol, $Un0, $Un0) Case $Style Switch GUICtrlRead($Style) Case 1 $Color=0x00CCFF $BkColor=0xF7F7F7 Case 2 $Color=0xFF8700 $BkColor=0xFFFF8D Case 3 $Color=0xFF0361 $BkColor=0xFFDEDA Case 4 $Color=0x00A272 $BkColor=0xE8EED8 Case 5 $Color=0x515151 $BkColor=0xF1F1F1 Case Else $Color=0x00CCFF $BkColor=0xF7F7F7 EndSwitch EndSwitch WEnd Func _TPB_ProgressOn($left, $top, $amount, $height, $symbol) If IsDeclared('aStartTPB') And IsArray($aStartTPB) Then GUICtrlDelete($aStartTPB[0]) ; Delete Local $aStartTPB[3], $String=' ' For $i = 1 to $amount $String&=$symbol Next GUISetFont (12, 700) $aStartTPB[0] = GUICtrlCreateLabel($String, $left, $top, -1, $height) GUICtrlSetData(-1, '') GUICtrlSetColor(-1, $Color) GUICtrlSetBkColor(-1, $BkColor) ; GUICtrlSetColor(-1, 0xff8700) ; GUICtrlSetBkColor(-1, 0xffff8d) $aStartTPB[1] = $amount $aStartTPB[2] = $symbol Return $aStartTPB EndFunc Func _TPB_ProgressSet($aStartTPB, $Prosent = 0) If $Prosent < 0 Or $Prosent > 100 Then Return SetError(1, 0, 0) Local $kol=Int($Prosent*($aStartTPB[1]/100)), $String=' ' For $i = 1 to $kol $String&=$aStartTPB[2] Next If GUICtrlRead($aStartTPB[0])=$String Then Return GUICtrlSetData($aStartTPB[0], $String) EndFunc ; Func _TPB_ProgressClose($aStartTPB) ; GUICtrlDelete($aStartTPB[0]) ; EndFunc Edited January 1, 2011 by AZJIO numdig and luger 2 My other projects or all Link to comment Share on other sites More sharing options...
wakillon Posted January 1, 2011 Share Posted January 1, 2011 Nicely done ! But I would have rather called your Topic : Characters Progress Bar .Thanks ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
mesale0077 Posted January 1, 2011 Share Posted January 1, 2011 (edited) hi nice code thank you Melba23 for the suit symbols Edited March 6, 2011 by mesale0077 Link to comment Share on other sites More sharing options...
mesale0077 Posted January 1, 2011 Share Posted January 1, 2011 (edited) hi thank you Edited March 6, 2011 by mesale0077 Link to comment Share on other sites More sharing options...
mesale0077 Posted January 1, 2011 Share Posted January 1, 2011 (edited) hi thank you Edited March 6, 2011 by mesale0077 Link to comment Share on other sites More sharing options...
mesale0077 Posted January 2, 2011 Share Posted January 2, 2011 (edited) hi thank you AZJIO and Melba23 Edited March 6, 2011 by mesale0077 Link to comment Share on other sites More sharing options...
mesale0077 Posted January 2, 2011 Share Posted January 2, 2011 (edited) hi thank you Edited March 6, 2011 by mesale0077 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 2, 2011 Moderators Share Posted January 2, 2011 (edited) mesale0077,Stop cluttering the forum and use the Edit button to add to, or replace, the code to your earlier posts. M23Edit:Apologies if, as wakillon suggests below, you cannot edit your posts - like this! Edited January 2, 2011 by Melba23 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...
wakillon Posted January 2, 2011 Share Posted January 2, 2011 mesale0077,Stop cluttering the forum and use the Edit button to add to, or replace, the code to your earlier posts. M23@melba You're right ! but since last update of the forums some topics or posts can't be edited !with always the error message : "you must enter a post"And deleting post is impossible ! So... AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
AZJIO Posted January 2, 2011 Author Share Posted January 2, 2011 When the code is sent, then add the code description, then a post is editable. At a certain ratio of "Size Description / size code" editing is available. Or put an attached file. My other projects or all Link to comment Share on other sites More sharing options...
wakillon Posted January 3, 2011 Share Posted January 3, 2011 When the code is sent, then add the code description, then a post is editable. At a certain ratio of "Size Description / size code" editing is available. Or put an attached file.I don't know if talking here about this, is the best way, but before the posts were editable with or without description.what's the ratio value ?Recently two times I was forced to put an attached file instead of code... If there is new Editing rules, where can I find them ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
D00M4N Posted June 11, 2013 Share Posted June 11, 2013 Great program Link to comment Share on other sites More sharing options...
AZJIO Posted August 26, 2013 Author Share Posted August 26, 2013 ListView - diagram / Progress Bar expandcollapse popup#include <ListViewConstants.au3> $hGUI = GUICreate("ListView - diagram", 440, 410, 150, 250) GUISetBkColor(0xECE9D8) ; устанавливает цвет фона Gui $s = '' For $i = 1 To 10 $s &= ChrW(0x2588) Next $ListView = GUICtrlCreateListView("1|2|3 ", 10, 10, 420, 350) GUICtrlSetColor($ListView, 0x00A272) GUICtrlSetBkColor($ListView, 0xE8EED8) Local $id_item[18] For $i = 1 To 17 $item = '' For $j = 1 To 3 $item &= StringTrimRight($s, Random(0, 9, 1)) & '|' Next $item = StringTrimRight($item, 1) $id_item[$i] = GUICtrlCreateListViewItem($item, $ListView) Next For $i = 0 To 2 GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, $i, 135) ; GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, $i, -1) ; GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, $i, -2) Next $button = GUICtrlCreateButton("Start changes", 145, 370, 150, 25) GUISetState() While 1 Switch GUIGetMsg() Case $button Switch Random(1, 5, 1) Case 2 $Color = 0xFF8700 $BkColor = 0xFFFF8D Case 3 $Color = 0xFF0361 $BkColor = 0xFFDEDA Case 4 $Color = 0x00A272 $BkColor = 0xE8EED8 Case 5 $Color = 0x515151 $BkColor = 0xF1F1F1 Case Else $Color = 0x00CCFF $BkColor = 0xF7F7F7 EndSwitch GUICtrlSetColor($ListView, $Color) GUICtrlSetBkColor($ListView, $BkColor) $rnd = Random(1, 17, 1) $w = Random(1, 10, 1) $s = '' For $i = 1 To $w $s &= ChrW(0x2588) GUICtrlSetData($id_item[$rnd], $s & '|' & $s & '|' & $s) Sleep(200) Next Case -3 Exit EndSwitch WEnd My other projects or all Link to comment Share on other sites More sharing options...
luger Posted February 14, 2016 Share Posted February 14, 2016 Hi, Thank you.. It is nice 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