Help - Search - Members - Calendar
Full Version: Status bar progress bar
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
khiloa
Hi guys.

I found the following code here and it works ok except for the progress bar stays greyish for about two seconds then it turns all black instead of doing what its supposed to do. I'm using 0.8.3.

CODE
// *****************************************
// foobarXP
// SatCP's foobar2000 Status Bar configuration
// Version: 1.22 (2003-12-18)
// Contact: satcp@pi.be
// *****************************************

// Parts of this script were taken from examples posted on the foobar2000 forum
// Credits go to the respective owners
// This script requires foobar2000 0.7 or higher

// *****************************************
// CONFIGURATION
// *****************************************

// Width of the progressbar [default: 50]
$puts(progress_width,50)

// Display full bar progress or single dot [on: 1 (default), off: 0]
// Full bar: #####===============
// Single dot: ====#===============
$puts(progress_fullbar,1)

// Character used to display elapsed time (full bar) or current time (single dot) [default: '|']
$puts(progress_char_elapsed,'|')

// Character used to display remaing time (full bar) or background (single dot) [default: '|']
$puts(progress_char_remaing,'|')

// Character in front of the progress bar [default: '[']
$puts(progress_begin_char,'[')

// Character at the end of the progress bar [default: ']']
$puts(progress_end_char,']')

// Status bar text color [default: 000000]
$puts(col_text,000000)

// Progress elapsed time color (full bar) or current time (single dot) [default: 000000]
$puts(col_elapsed,000000)

// Progress remaing time (full bar) or background (single dot) [default: B2B2B2]
$puts(col_remaining,B2B2B2)

// Show remaining time [on: 1, off: 0 (default)]
$puts(display_remaining,0)

// Show time labels (Elapsed, Remaining, Total) [on: 1, off: 0 (default)]
$puts(display_labels,0)

// Show status [on: 1, off: 0 (default)]
$puts(display_status,0)

// *****************************************
// ADDITIONAL INFO & TIPS
// *****************************************

// * The font to use in foobar2000 (to match with the default script) is:
//    - status bar font: Tahoma - Regular - 8

// *****************************************
// CORE
// *****************************************

// Wrap colors around progressbar characters
$puts(progress_begin,$get(col_text)$get(progress_begin_char))
$puts(progress_elapsed,$get(col_played)$get(progress_char_elapsed))
$puts(progress_remaining,$get(col_remaining)$get(progress_char_remaing))
$puts(progress_end,$get(col_text)$get(progress_end_char))

// Construction of the progressbar
$puts(progressbar,$get(progress_begin)$if(%_time_total%,$if($strcmp($get(progress_fullbar),1),$progress2(%_time_elapsed_seconds%,%_time_total_seconds%,$get(progress_width),$get(progress_elapsed),$get(progress_remaining)),$progress(%_time_elapsed_seconds%,%_time_total_seconds%,$get(progress_width),$get(progress_elapsed),$get(progress_remaining))),$get(col_text)Total Time Unavailable)$get(progress_end))

// Build time
$puts(time,$get(col_text) [$if($strcmp($get(display_labels),1),Elapsed: ,)%_time_elapsed%]$if(%_time_total%,$if($strcmp($get(display_remaining),1), / [$if($strcmp($get(display_labels),1),Remaining: ,)-%_time_remaining%],) / [$if($strcmp($get(display_labels),1),Total: ,)%_time_total%],))

// Build status
$puts(status,$if($strcmp($get(display_status),1),     $if(%_ispaused%,Paused.,Playing.),))

// Build file info
$puts(file_info,$if($strcmp(%__bitrate_dynamic%,?),%__bitrate%,%__bitrate_dynamic%) kbps %__samplerate% Hz $if($strcmp(%__channels%,1),Mono)$if($strcmp(%__channels%,2),Stereo) )

// *****************************************
// OUTPUT
// *****************************************

// Display progressbar
$get(progressbar)

// Display time
$get(time)

// Display status
$get(status)

// Right align
$char(9)

// Display file info
$get(file_info)

// EOF


Any suggestions? I'm using a basically stock foobar other than a change of playlist color and font.
Ruby
Works for me with both the default and columns ui.
khiloa
QUOTE(Golly @ Mar 15 2003, 08:08 PM)
Actually, here u go dude, i made for u, just change the top 4 vars to customise

$puts(PB_LEN,16)
$puts(PB_C1,x)
$puts(PB_C2,-)
$puts(PB_CP,>)

//Display Progressbar
$puts(GOLLY,$progress(%_time_elapsed_seconds%,%_time_total_seconds%,$get(PB_LEN),$get(PB_CP),$get(PB_C1)))
$puts(GOLLY2,$strchr($get(GOLLY),$get(PB_CP)))
$substr($get(GOLLY),1,$get(GOLLY2))
$puts(GOLLY3,$add($get(GOLLY2),1))
$ifgreater($get(GOLLY3),$get(PB_LEN),,$replace($substr($get(GOLLY),$get(GOLLY3),$get(PB_LEN)),$get(PB_C1),$get(PB_C2)))
*



I found that on this tread here and it works fine and with a little tweaking it looks just like the other one. smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.