Jump to content



Photo

Text Progress Bar


  • Please log in to reply
11 replies to this topic

#1 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,081 posts

Posted 01 January 2011 - 06:55 AM

Text Progress Bar
Using symbols as a progress bar


example
Plain Text         
#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 by AZJIO, 01 January 2011 - 06:56 AM.








#2 wakillon

wakillon

    Tiny Tools Coder

  • Active Members
  • PipPipPipPipPipPip
  • 2,496 posts

Posted 01 January 2011 - 08:26 AM

Nicely done !

But I would have rather called your Topic : Characters Progress Bar .Posted Image

Thanks !

  AutoIt Version : 3.3.8.1/3.3.9.4 SciTE 3.3.0 Language:040C OS:WIN_7/ CPU:X64 OS:X64 

  Last updated Scripts and executables with full embedded files are available on : GoogleCode 


#3 mesale0077

mesale0077

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 366 posts

Posted 01 January 2011 - 11:15 AM

hi
nice code
thank you Melba23 for the suit symbols

Edited by mesale0077, 06 March 2011 - 04:08 PM.


#4 mesale0077

mesale0077

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 366 posts

Posted 01 January 2011 - 12:00 PM

hi


thank you

Edited by mesale0077, 06 March 2011 - 04:08 PM.


#5 mesale0077

mesale0077

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 366 posts

Posted 01 January 2011 - 01:11 PM

hi
thank you

Edited by mesale0077, 06 March 2011 - 04:09 PM.


#6 mesale0077

mesale0077

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 366 posts

Posted 02 January 2011 - 03:30 PM

hi
thank you
AZJIO and Melba23

Edited by mesale0077, 06 March 2011 - 04:09 PM.


#7 mesale0077

mesale0077

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 366 posts

Posted 02 January 2011 - 05:21 PM

hi
thank you

Edited by mesale0077, 06 March 2011 - 04:09 PM.


#8 Melba23

Melba23

    Yes, me!

  • Moderators
  • 15,752 posts

Posted 02 January 2011 - 05:24 PM

mesale0077,

Stop cluttering the forum and use the Edit button to add to, or replace, the code to your earlier posts. :x

M23

Edit:

Apologies if, as wakillon suggests below, you cannot edit your posts - like this! :P

Edited by Melba23, 02 January 2011 - 05:54 PM.

StringSize - Automatically size controls to fit text                                                               ExtMsgBox - A user customisable replacement for MsgBox
Toast - Small GUIs which pop out of the Systray                                                                Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command                                   GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI                                      NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure      Notify - Small notifications on the edge of the display
RecFileListToArray- An alternative to _FileListToArray with user-defined include/exclude masks, maximum recursion level, sorting and displayed path options
GUIListViewEx - Insert, delete, move, drag and sort ListView items

#9 wakillon

wakillon

    Tiny Tools Coder

  • Active Members
  • PipPipPipPipPipPip
  • 2,496 posts

Posted 02 January 2011 - 05:39 PM

mesale0077,

Stop cluttering the forum and use the Edit button to add to, or replace, the code to your earlier posts. :x

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 ! Posted Image
So...

  AutoIt Version : 3.3.8.1/3.3.9.4 SciTE 3.3.0 Language:040C OS:WIN_7/ CPU:X64 OS:X64 

  Last updated Scripts and executables with full embedded files are available on : GoogleCode 


#10 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,081 posts

Posted 02 January 2011 - 11:54 PM

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.

#11 wakillon

wakillon

    Tiny Tools Coder

  • Active Members
  • PipPipPipPipPipPip
  • 2,496 posts

Posted 03 January 2011 - 08:04 AM

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 ? Posted Image

  AutoIt Version : 3.3.8.1/3.3.9.4 SciTE 3.3.0 Language:040C OS:WIN_7/ CPU:X64 OS:X64 

  Last updated Scripts and executables with full embedded files are available on : GoogleCode 


#12 D00M4N

D00M4N

    Seeker

  • Normal Members
  • 7 posts

Posted 11 June 2013 - 07:25 AM

Great program






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users