Help - Search - Members - Calendar
Full Version: Track Info Panel with ability to change font
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24
Bellfazar
I'm trying to figure out two things. First, I'd like to create a button that toggles a dockable panel but I'm not quite sure how to do it. I want to be able to test for whether or not the panel is activated and if it is, have it so the button closes the panel. If the panel isn't activated, I want to be able to open it via the button.

This same sort of thing applies to my other question. I want to create a button that toggles between shuffling tracks and the default track order. Again, I want to be able to test the state of the track order so that I can have the correct button display. It was easy enough to do it for a play/pause button using $ispaused and $not(%isplaying%), but I can't figure out how to do it for track order.

Anyone have any ideas?
wraithdu
QUOTE(GreenSmurf @ Jan 23 2007, 02:10) *
I've moved it below the // PerSecond thing and it does nothing but make the button disappear.

Buttons must go in the // PerTrack section. If it's under // PerSecond, that's not // PerTrack anymore.

QUOTE(Bellfazar @ Jan 23 2007, 03:16) *

I'm trying to figure out two things. First, I'd like to create a button that toggles a dockable panel but I'm not quite sure how to do it. I want to be able to test for whether or not the panel is activated and if it is, have it so the button closes the panel. If the panel isn't activated, I want to be able to open it via the button.

This same sort of thing applies to my other question. I want to create a button that toggles between shuffling tracks and the default track order. Again, I want to be able to test the state of the track order so that I can have the correct button display. It was easy enough to do it for a play/pause button using $ispaused and $not(%isplaying%), but I can't figure out how to do it for track order.

Anyone have any ideas?


From the wiki -

"The following returns a sort index of the field, ie if the playlist is sorted first by genre, then artist, then by album, $sorted(artist) will return 3. If the playlist is not sorted by 'field' through the SORT command described above, then $sorted(field) will be evaluated as false and produce '[UNKNOWN FUNCTION]' as text output.

$sorted(field)"

Using $sorted() you can test if the playlist uses a certain sort string, ie $if($sorted(Artist),....,.....). Bear in mind that $sorted() test for the NAME, not the VALUE in name_1|value_1.
GreenSmurf
If the button is in per track how do I get it to update immediatly after clicking the button. My playback button doesn't update until track change and I want it to toggle the playback continuously until the esired playback is found.
Bellfazar
QUOTE(wraithdu @ Jan 23 2007, 09:38) *

From the wiki -

"The following returns a sort index of the field, ie if the playlist is sorted first by genre, then artist, then by album, $sorted(artist) will return 3. If the playlist is not sorted by 'field' through the SORT command described above, then $sorted(field) will be evaluated as false and produce '[UNKNOWN FUNCTION]' as text output.

$sorted(field)"

Using $sorted() you can test if the playlist uses a certain sort string, ie $if($sorted(Artist),....,.....). Bear in mind that $sorted() test for the NAME, not the VALUE in name_1|value_1.


I have absolutely no idea what this means.
wraithdu
QUOTE(Bellfazar @ Jan 23 2007, 12:36) *
I have absolutely no idea what this means.

My mistake. I thought you were talking about sorting your playlist. You meant changing the playback order.

I think what you need is -

CODE
$button2(DstX,DstY,X,Y,W,H,TEXT,HOVER TEXT,COMMAND,OPTIONS)


where COMMAND is anything from this list - http://wiki.hydrogenaudio.org/index.php?ti...Main_Menu_Items

# Playback/Order/Default
# Playback/Order/Random
# Playback/Order/Repeat
# Playback/Order/Repeat One
# Playback/Order/Shuffle
# Playback/Order/Shuffle album
# Playback/Order/Shuffle album 2
# Playback/Order/Shuffle tag set

For example
CODE
$button2(DstX,DstY,X,Y,W,H,TEXT,HOVER TEXT,'Shuffle (tracks)',)


You can use %cwb_playback_order% to return what the current playback order is (available with foo_cwb_hooks, and only returns a value while a song is playing).

EDIT - it seems some of the commands in the list are out of date with foobar 0.9. Basically just look in the menu, and the command should have the same syntax, ie 'Shuffle (tracks)'.
wraithdu
QUOTE(GreenSmurf @ Jan 23 2007, 12:08) *

If the button is in per track how do I get it to update immediatly after clicking the button. My playback button doesn't update until track change and I want it to toggle the playback continuously until the esired playback is found.

This works for me, as long as a song is playing or paused. If it is stopped, then %cwb_playback_order% has no value. But when playing, the button updates as it should.
CODE
// Global
// Background
// PerTrack
$if($strcmp(%cwb_playback_order%,'Default'),
$button2(5,5,0,0,50,20,'shuffle','SHUFFLE','Shuffle (tracks)',)
,
$button2(5,5,0,0,50,20,'default','DEFAULT','Default',)
)

// PerSecond
$alignabs(5,30,500,20,left,middle)
%cwb_playback_order%

Bellfazar
QUOTE(wraithdu @ Jan 23 2007, 12:06) *

You can use %cwb_playback_order% to return what the current playback order is (available with foo_cwb_hooks, and only returns a value while a song is playing).


That's exactly what I was looking for. Thanks!

Now that I've got that done, I have one last thing I'm trying to figure out, but it may be impossible. I want to test whether or not an item in the menus is selected. For example, foo_dockable_panels has a submenu in the View menu that allows you to activate and collapse panels. I want to be able to toggle it open and closed with a button. Luckily, it turns out this doesn't require any iterative statements to determine whether the panel is open or not, I just have to figure out how to actually activate this particular menu option. Does anyone know what I'm talking about? (I had trouble explaining it well) And if so, any advice?

Edit: I was able to create a keyboard shortcut for this action, I just can't figure out how to tie it to a button. I feel like this should be easier than I'm making it.
GreenSmurf
QUOTE(wraithdu @ Jan 23 2007, 13:06) *

You can use %cwb_playback_order% to return what the current playback order is (available with foo_cwb_hooks, and only returns a value while a song is playing).


That is exactly what I needed too. Thank you.

Is there a way to make scrolling lyrics in the track panel? I have been experiemnting for some time without actually getting them to scroll with the song similar to the actual lyrics panel. Thanks for any help.
GreenSmurf
CODE
$puts(percent,$muldiv(%_time_elapsed_seconds%,100,
%_time_total_seconds%))
$puts(hgt,$calcheight(%lyrics%))
$if($meta_test(lyrics),
$alignabs(0,$div($sub(%_height%,$muldiv($get(percent),%_height%,50)),3),%_width%,$mul($get(hgt),96),center,top)
$font(Calibri,$sub(24,$get(hgt)),,)
%lyrics%,
$align(center,middle)
%artist% - %title%)


I have scrolling lyrics working for the most part I have only tested it with one album and it paces itself relativly well with the song but its not quite perfect.
GreenSmurf
I just realized that in oder to make the lyrics to scroll properly I need a function that can either get the number of lines in a given field or return the total number of pixels a particular text has. Pixels would be preferrable.
something like:

$textPx(text)
$textPy(text)
or
$lines(text)

That way I can Identify the bottom of the lyrics by the number of pixles or lines it has in order to make it move at that particular rate.
wraithdu
QUOTE(GreenSmurf @ Jan 23 2007, 20:44) *

I just realized that in oder to make the lyrics to scroll properly I need a function that can either get the number of lines in a given field or return the total number of pixels a particular text has. Pixels would be preferrable.
something like:

$textPx(text)
$textPy(text)
or
$lines(text)

That way I can Identify the bottom of the lyrics by the number of pixles or lines it has in order to make it move at that particular rate.

$calcwidth(text) and $calcheight(text) do return the width and height in pixels. $len(text) will return the length of a string in characters. But I don't think there is a function to return the number of lines a paragraph takes up.
GreenSmurf
QUOTE(wraithdu @ Jan 23 2007, 20:40) *

QUOTE(GreenSmurf @ Jan 23 2007, 20:44) *

I just realized that in oder to make the lyrics to scroll properly I need a function that can either get the number of lines in a given field or return the total number of pixels a particular text has. Pixels would be preferrable.
something like:

$textPx(text)
$textPy(text)
or
$lines(text)

That way I can Identify the bottom of the lyrics by the number of pixles or lines it has in order to make it move at that particular rate.

$calcwidth(text) and $calcheight(text) do return the width and height in pixels. $len(text) will return the length of a string in characters. But I don't think there is a function to return the number of lines a paragraph takes up.


I noticed that but its not helping the situation. $calcheight() and $calcwidth() both give you the pixles but only for the pt size of the font.
thelightguy
Hmmm... The wiki says that you can use "PVAR:SET:variable:value" in a button to set globals, but I can't seem to get it to work. I'm trying to make an info-panel that can be toggled on and off.

Sample:
CODE

$if($get(ShowDetails,
$button2(4,4,0,0,100,50,'$font(,24pt,,192-0-0)Details','$font(,24pt,,255-255-255)Details','PVAR:SET:ShowDetails:0',)
Genre: %genre%[and so on...],
$button2(4,4,0,0,100,50,'$font(,24pt,,192-0-0)Details','$font(,24pt,,255-255-255)Details','PVAR:SET:ShowDetails:1',))


Even doing something as simple as setting the button to assign a value to any variable, and then using $get() to read it returns null every time.
Cyex
QUOTE(Bellfazar @ Jan 23 2007, 23:36) *

foo_dockable_panels has a submenu in the View menu that allows you to activate and collapse panels. I want to be able to toggle it open and closed with a button

CODE
$button(4,32,0,0,7,7,/images\switch_01.png,/images\switch_02.png,collapse,)
wraithdu
QUOTE(thelightguy @ Jan 24 2007, 03:46) *

Hmmm... The wiki says that you can use "PVAR:SET:variable:value" in a button to set globals, but I can't seem to get it to work. I'm trying to make an info-panel that can be toggled on and off.

Sample:
CODE

$if($get(ShowDetails,
$button2(4,4,0,0,100,50,'$font(,24pt,,192-0-0)Details','$font(,24pt,,255-255-255)Details','PVAR:SET:ShowDetails:0',)
Genre: %genre%[and so on...],
$button2(4,4,0,0,100,50,'$font(,24pt,,192-0-0)Details','$font(,24pt,,255-255-255)Details','PVAR:SET:ShowDetails:1',))


Even doing something as simple as setting the button to assign a value to any variable, and then using $get() to read it returns null every time.

I see two things right off. Your first line $get() function needs a close parenthesis - $get(ShowDetails)

Second, the wiki says -
"Sets a persistent variable - a variable that is recognized throughout the Trackinfo pannel mod and can be changed through buttons."
It seems to me this is a variable just for the Trackinfo panel mod, not a true ColumnsUI global variable.
thelightguy
QUOTE(wraithdu @ Jan 24 2007, 11:47) *


I see two things right off. Your first line $get() function needs a close parenthesis - $get(ShowDetails)

Second, the wiki says -
"Sets a persistent variable - a variable that is recognized throughout the Trackinfo pannel mod and can be changed through buttons."
It seems to me this is a variable just for the Trackinfo panel mod, not a true ColumnsUI global variable.


Oops... I must have deleted that parenthesis while I was cutting and pasting... it's in my actual config.

And I'm just looking to pick it up in various (1 or 2) spots within trackinfo_mod... I could care less if it shows up in SCP or anywhere else in columnsUI, it's just supposed to toggle a details display within the trackinfo panel, yet I can't read the variable anywhere... unless I'm using the wrong function?
wraithdu
QUOTE(thelightguy @ Jan 24 2007, 03:46) *

And I'm just looking to pick it up in various (1 or 2) spots within trackinfo_mod... I could care less if it shows up in SCP or anywhere else in columnsUI, it's just supposed to toggle a details display within the trackinfo panel, yet I can't read the variable anywhere... unless I'm using the wrong function?

Try this -
CODE
// Global
// Background

// PerTrack


$ifequal($getpvar(ShowDetails),1,
$button2(4,4,0,0,100,50,'$font(,24,,192-0-0)Details','$font(,24,,255-255-255)Details','PVAR:SET:ShowDetails:0',)
$alignabs(4,75,%_width%,%_height%,left,top)$font(calibri,12,bold,255-255-255)'DETAILS TEXT',
$button2(4,4,0,0,100,50,'$font(,24,,192-0-0)Details','$font(,24,,255-255-255)Details','PVAR:SET:ShowDetails:1',))
$align(left,bottom)'ShowDetails = '$getpvar(ShowDetails)

// PerSecond


The functions $get() and $getpvar() are separate and exclusive. PVAR:SET change the $getpvar() function. I'll have to edit the wiki when I get a chance, but this is from the release notes in the latest version of trackinfo_mod -
CODE
+ Persistant variables & button to set values PVAR:SET:name:val : (example)
    $puts(val,$if2($getpvar(val),0))
    $align(left,bottom)$get(val)
    $button2(20,50,0,0,50,10,Add,Add,PVAR:SET:val:$add($get(val),1),)
Gretchen_Ross
QUOTE(wraithdu @ Jan 11 2007, 08:18) *
(moderation: removed unnecessary full quote)



HELLO

Is there a way to add a heading for Composer to song info that would only show when then composer is different than the artist?
shakey_snake
yes. It's called an $if() statement.
c0utta
Hi guys,

I'm not sure whether this has already been done by someone else, but I wanted to implement horizontal scrolling of text and have come up with a method. Essentially, it uses the fact that alignabs() can take negative values.

As the time elapses, the "left" value in alignabs() becomes more (or is that less?) negative and gives the appearance of scrolling across. One of the tricks is to repeat the desired string so it's long enough to allow scrolling for the entire length of the song.

For example, Rock & Rock Aint' Noise Pollution would become:

Rock & Rock Aint' Noise Pollution Rock & Rock Aint' Noise Pollution Rock & Rock Aint' Noise Pollution

and would give the appearance of scrolling across, pixel by pixel.

The limitation is that it will scroll across the entire width of the track info - this is what I wanted anyway.

Apologies to anyone who has already described this, but I couldn't find anything using the search. I'm sure someone more adept at track info design will be able to extend this.

Cheers,

c0utta

CODE

// make sure you've set your font beforehand so measurements are correct
// put your text you want to scroll here
$puts(txt,"$meta(title)")
// put the rate of scrolling here
$puts(rate,3)

$ifgreater($calcwidth($get(txt)),%_width%,
$puts(tot,$add(%_width%,$mul(%_time_total_seconds%,$get(rate))))
$puts(txt,$repeat($get(txt)'     ',$add(1,$div($get(tot),$calcwidth($get(txt))))))
$alignabs($sub(0,$mul(%_time_elapsed_seconds%,$get(rate))),6,$add(%_width%,$calcwidth($get(txt))),30,left,)
,$alignabs(0,6,%_width%,30,center,))
[$get(txt)]
wraithdu
QUOTE(c0utta @ Jan 24 2007, 18:09) *
The limitation is that it will scroll across the entire width of the track info - this is what I wanted anyway.

You could get around this by covering whatever portion of the trackinfo panel you don't want to see the scrolling text with a $drawrect() the color of your background. That way the text scrolls behind the rectangle and disappears. If you really want to get fancy you could position a PNG graphic that fades from transparent to solid at the edges of the scrolling text so it fades away all cool like. Nice code.
thelightguy
QUOTE(wraithdu @ Jan 24 2007, 16:41) *


Try this -


The functions $get() and $getpvar() are separate and exclusive. PVAR:SET change the $getpvar() function. I'll have to edit the wiki when I get a chance, but this is from the release notes in the latest version of trackinfo_mod -



Ah, thanks! That explains it.
Erich w/ an h
Some quick questions. Im working on a layout, and Ive had a few things come up:

1> I have a progress bar that works well. What I want to do with it, though, is put an overlapping text to it. Thats easy, but I want to make the text change color at the same time as the progress bar. The code I have, in theory, should work, but trackinfo_mod seems to clip text that doesnt fit within its defined box. Is there a way to define a containing box for text thats smaller than the text itself, yet still show the partial text? Here's my code:

CODE

// Global

$puts(color1,105-9-10)
$puts(color2,229-151-149)
$puts(color3,247-247-247)

$puts(proglen,162)
$puts(progcalc,$left($num($div($mul(%_time_elapsed_seconds%,$mul($get(proglen),10)),%length_seconds%),4),3))
$ifgreater(1,$get(progcalc),$puts(progcalc,1),)

$puts(prog1,$drawrect(0,0,$get(proglen),16,pencolor-0-0-0 brushcolor-$get(color3) width-1))
$puts(prog2,$drawrect(0,0,$get(progcalc),16,pencolor-0-0-0 brushcolor-$get(color1) width-1))
$puts(prog3,$alignabs(0,0,$get(proglen),16,$get(proglen),16)$font(verdana,8,,$get(color1))Progress)
$puts(prog4,$alignabs(0,0,$get(progcalc),16,0,0)$font(verdana,8,,$get(color2))Progress)

// PerTrack


// PerSecond

$get(prog1)$get(prog3)
$get(prog2)$get(prog4)


$get(prog3) stays hidden until its the length of the string "Progress", and I want to circumvent that.

PS - I scripted that progress bar myself. Did I use any extraneous code that can be consolidated? Thx

2> $button2 doesnt seem to want to work with my panels. If I use the example code on hydrogen's wiki page for info_mod:

CODE

// Global

$button2(0,0,0,0,30,13,$font(tahoma,8,,0-0-0)Forward,$font(tahoma,8,underline,0-0-0)Forward,'Seek ahead by 10 seconds',)


I get this:

IPB Image

needless to say, the button doesnt work either. If i remove the font tags, sometimes it works with plain text, other times the text is hidden but the button works if you find it through blind clicking (default text black, white background). Can someone tell me what Im doing wrong? I got the img buttons to work fine, but I want text buttons for certain things and its not exactly working for me.

3> Not all the button commands seem to want to work for me. I must be doing something wrong here. For example, my playback order buttons. Default works, but Repeat doesnt, and either does Repeat one or 'Repeat one'.

works:

$button(13,175,0,0,21,17,D:\Erich\mugglenet\poll1.gif,D:\Erich\mugglenet\poll2.gif,Default,)
$alignabs(35,177,162,16,162,16)$font(verdana,8,,247-247-247)Default

Doesnt work:

$button(13,195,0,0,21,17,D:\Erich\mugglenet\poll1.gif,D:\Erich\mugglenet\poll2.gif,'Repeat playlist',)
$alignabs(35,197,162,16,162,16)$font(verdana,8,,247-247-247)Repeat

The buttons show, and the mouseover works fine, but the command does nothing. Any help?

anyone reading this, thank you kindly for your time.

~E
wraithdu
QUOTE(Erich w/ an h @ Jan 25 2007, 16:08) *

2> $button2 doesnt seem to want to work with my panels. If I use the example code on hydrogen's wiki page for info_mod:

CODE

// Global

$button2(0,0,0,0,30,13,$font(tahoma,8,,0-0-0)Forward,$font(tahoma,8,underline,0-0-0)Forward,'Seek ahead by 10 seconds',)



You need single quotes around the font and text statement -
CODE
$button2(0,0,0,0,30,13,'$font(tahoma,8,,0-0-0)Forward','$font(tahoma,8,underline,0-0-0)Forward','Seek ahead by 10 seconds',)


QUOTE(Erich w/ an h @ Jan 25 2007, 16:08) *

3> Not all the button commands seem to want to work for me. I must be doing something wrong here. For example, my playback order buttons. Default works, but Repeat doesnt, and either does Repeat one or 'Repeat one'.


Your commands must match exactly what you see in the foobar context or main menus. For example -
CODE
'Repeat (playlist)'
'Repeat (track)'
'Shuffle (tracks)'
'Shuffle (albums)'
wraithdu
QUOTE(Erich w/ an h @ Jan 25 2007, 16:08) *

1> I have a progress bar that works well. What I want to do with it, though, is put an overlapping text to it. Thats easy, but I want to make the text change color at the same time as the progress bar. The code I have, in theory, should work, but trackinfo_mod seems to clip text that doesnt fit within its defined box. Is there a way to define a containing box for text thats smaller than the text itself, yet still show the partial text? Here's my code:

$get(prog3) stays hidden until its the length of the string "Progress", and I want to circumvent that.


I've been racking my brain on this one, and I can't figure a solution using text and $drawrect().

But you could use images to accomplish this. Make your first and last state progress bar images, then use $imageabs2() to crop the top image accordingly to reveal it as the song progresses. This also gives you the flexibility to use something flashier than text in your progress bar - gradients, background images, etc. Sorry I don't have a better solution for you.
Erich w/ an h
I'll get back to you on everything later today, but for now, thank you kindly smile.gif
Crusoli
I'm using %cwb_systemdatetime% in one of my trackinfo panels. Unfortunately it doesnt update the time if playback is paused. Is that problem related to Trackinfo_mod or cwb_hooks?
shakey_snake
Hi.
two pages ago
Please search the topic before asking questions. It makes life easier for everyone. emot-cop.gif
nate
apologies if this has been answered here before, but is it possible to have trackinfo mode (Follow cursor vs. Now Playing) controlled by a button as opposed to the right-click menu? I had gotten used to doing that by doubleclicking the panel, and now that I've updated my dll that behavior is gone sad.gif

-Nate
metal_termite
A serious suggestion to improve the Trakinfo configuration window: The inclusion of a simple drop down list that contains ALL Trackinfo_mod functions
  • It would be a simple and efficient way to help users keep up with added features and to familiarize themselves with all the functions and syntax. I know someone will say "thats what the Wiki is for," "just read the changelog." Both of which are quite tedious in comparison when all you need is a reference to a list of functions.
  • How would this drop down list work? Well, the list of functions could be sorted in alphabetical order. On selection and click of an 'Insert' button, the function is added by the cursor position in the formatting string window. The selected function would be added with its parameters defined. For example, if a user selected $font from the drop-down list, the following would be added to the formatting strong window: $font(NAME,SIZE,OPTIONS,COLOR)
  • Pictures are worth a thousand words so here is what the proposed config would look like...
    IPB Image

That's it. Hope it is taken into consideration.
mil3s
^I think that configuration window looks great. There is still room for more improvement though. The color code stuff and the Edit button could be removed imo.
Crusoli
QUOTE(shakey_snake @ Jan 26 2007, 15:41) *

Hi.
two pages ago
Please search the topic before asking questions. It makes life easier for everyone. emot-cop.gif


Oops, sorry. Thanks for the link.

Any chance of getting a "real" per-second in one of the next versions?
drake
hey,firstoff...myspacebar'sbroken.sorryaboutthat.


anyway,.how.would.i.be.able.to.make.backgroundimages.in.
trackinfo.mod.change.when.the.song.changes?
how.do.i.make.it.take.random.images.from.a.specified.folder.without.
specifying.the.name.of.each.image?
Garfield4
My idea is to have blank space at the bottom of the panel which when hovered over shows selected info - here's my code:
QUOTE
$if(%rating%,
$button2(120,20,0,0,110,50,'$font(tahoma,18,,235-235-235) ','$font(tahoma star,18,,235-235-235)%rating%',,))


what I'd like to do replace the number that appears on mouse over with a star from the tahoma star font i'm using - here is that code:

CODE
$if(%rating%,
$rgb(235,235,235))
$select(%rating%,
★,
★★,
★★★,
★★★★,
★★★★★)
)
)


But can't figure how to get the two pieces of code to talk to each other- so that it works...

Thanks in advance
Insolent
QUOTE(metal_termite @ Jan 27 2007, 06:21) *

A serious suggestion to improve the Trakinfo configuration window: The inclusion of a simple drop down list that contains ALL Trackinfo_mod functions
  • It would be a simple and efficient way to help users keep up with added features and to familiarize themselves with all the functions and syntax. I know someone will say "thats what the Wiki is for," "just read the changelog." Both of which are quite tedious in comparison when all you need is a reference to a list of functions.
  • How would this drop down list work? Well, the list of functions could be sorted in alphabetical order. On selection and click of an 'Insert' button, the function is added by the cursor position in the formatting string window. The selected function would be added with its parameters defined. For example, if a user selected $font from the drop-down list, the following would be added to the formatting strong window: $font(NAME,SIZE,OPTIONS,COLOR)
  • Pictures are worth a thousand words so here is what the proposed config would look like...
That's it. Hope it is taken into consideration.

Hmm, good idea. I think, like mil3s said, the Edit button and Colour code stuff can be scrapped. I think another nice addition would be separate tabs for each redraw type.

IPB Image
thelightguy
QUOTE(Insolent @ Jan 27 2007, 00:43) *

Hmm, good idea. I think, like mil3s said, the Edit button and Colour code stuff can be scrapped. I think another nice addition would be separate tabs for each redraw type.

http://img254.imageshack.us/img254/9708/tr...ockupcf4ab0.png


No love for the edit button? sad.gif I've been using it to launch textpad so I can use the syntax higlighting to make sure I closed all my functions and what not. Oh well, I can always just cut and paste, but that's an extra step.
Yotsuya
QUOTE(drake @ Jan 26 2007, 18:42) *
anyway,.how.would.i.be.able.to.make.backgroundimages.in.
trackinfo.mod.change.when.the.song.changes?
how.do.i.make.it.take.random.images.from.a.specified.folder.without.
specifying.the.name.of.each.image?


First you would need to move the code for your background images under a // PerTrack header, but to continue to appear in the background they will need to be toward the top of your code. Now, to make the images "random" you will need to come up with a naming scheme for your images that can be referenced with a $rand() command. For example:

CODE
// PerTrack
$imageabs2(%_width%,%_height%,,,,,0,0,/images\background$rand(9).*,)

With images named background0.jpg, background1.gif, background9.png, etc. placed in your foobar images directory.

QUOTE(thelightguy @ Jan 27 2007, 02:53) *
No love for the edit button? :( I've been using it to launch textpad so I can use the syntax higlighting to make sure I closed all my functions and what not. Oh well, I can always just cut and paste, but that's an extra step.

I too find the color code box and edit button rather worthless. I tend to use the colors in $font() instead of $rgb(), and the edit button doesn't import the notepad document when you are done so you have to copy/paste anyway.

I do, however, very much like the idea of having separate tabs for // Background, // PerTrack, // PerSecond, etc. but how do you dictate which code is processed in what order? Sometimes I want // PerSecond code to be rendered before // PerTrack code and visa versa. However I think the separate tabs would make things much more intuitive and could easily adapt. Since we are on the topic of redesigning the configuration window can we pretty please with sugar on top have a resizable window? The window is so tiny on my 2048x1536 display and the ability to stretch the window from the corner like most other windows to reveal more edit space would be lovely.
thelightguy
Actually, saving it in notepad updates it in the edit box when you press apply. But yeah, I'll second the resizeable window... and the colour button is basically useless for me.
Decuman
Hey guys!

I have a context menu item Edit Other > Insert into Playlist > Playlist_Name
where Playlist_Name is the name of any existing playlist. When i'm trying to create a button to move currently playing track into a playlist the following code doesn't work at all:

$button($sub(%_width%,35),70,0,0,32,32,c:\Program Files\foobar2000\images\move2pl.png,c:\Program Files\foobar2000\images\move2pl_.png,'Edit Other/Insert into Playlist/Playlist_Name',)

... however I have some other buttons which run the commands from context menu with no problem i.e. some commands form it work OK.


Thanks in advance!


UPDATE: Just found a post regarding it two pages back... so it is not really possible to do sad.gif
drake
why do none of these awesome trackinfo-mod codes work for me?

is 0.8.0 beta the latest version or not?
honza
Hi,
I'm new to Foobar, so I have to ask.
I have several panels in Tabbed panel stack mod.
I'd like to create "switching tab button".
I expect something like this, but I'm not sure with syntax and so on.

CODE
$if (Single viev,
$button(150,1,0,0,22,21,image,hover, Album View,),
$button(150,1,0,0,22,21,image,hover, Single View,)
)


I've tried to serch solution, or some good reference manual but without succes.
Thanks for help....

Garfield4
QUOTE(drake @ Jan 28 2007, 12:32) *

why do none of these awesome trackinfo-mod codes work for me?

is 0.8.0 beta the latest version or not?


Yes it is the latest version - do you have MS Visual C++ 2005 Runtime Library installed? ( link on 1st post)

Perhaps post the code your working with & we can help you from there...
drake
i figured it out
zhdali
Hi, i'm new, in these days i'm still configuring my foobar and do some test on trackinfomod panel.

I want emulate the "playback order bar" in trackinfo panel, but i have some problems:

If i use the $button2() function i can't write any name containing parenthesis, for example 'shuffle (tracks)' or

use $get() for some variables on the contrary if i write the code without the button function i not have problems.

Not know how explain exactly my problem (not speak english very well), perhaps i not write the correct syntax

i need help.

I put the two examples:

1) working but i not can use parenthesis
2) Working (not complete, only for test) without $button use

CODE

///////////1

$button2(5,150,0,0,200,40,
'$font(lcd2 bold,10,,255-167-47)$upper(%cwb_playback_order%)',
$if($strcmp(%cwb_playback_order%,'Default'),
    '$font(lcd2 bold,10,,128-0-255)REPEAT PLAYLIST',
    $if($strcmp(%cwb_playback_order%,'Repeat (playlist)'),
        '$font(lcd2 bold,10,,128-0-255)'REPEAT TRACK'',
        $if($strcmp(%cwb_playback_order%,'Repeat (track)'),
            '$font(lcd2 bold,10,,128-0-255)'SHUFFLE ALBUMS'',
            $if($strcmp(%cwb_playback_order%,'Shuffle (albums)'),
                '$font(lcd2 bold,10,,128-0-255)'SHUFFLE DIRECTORIES'',
                $if($strcmp(%cwb_playback_order%,'Shuffle (directories)'),
                    '$font(lcd2 bold,10,,128-0-255)'SHUFFLE TRACKS'',
                    $if($strcmp(%cwb_playback_order%,'Shuffle (tracks)'),
                        '$font(lcd2 bold,10,,128-0-255)'DEFAULT'',
                    )
                )
            )
        )
    )
),
$if($strcmp(%cwb_playback_order%,'Default'),
    'Repeat (playlist)',
    $if($strcmp(%cwb_playback_order%,'Repeat (playlist)'),
        'Repeat (track)',
            $if($strcmp(%cwb_playback_order%,'Repeat (track)'),
            'Shuffle (albums)',
                $if($strcmp(%cwb_playback_order%,'Shuffle (albums)'),
                'Shuffle (directories)',
                    $if($strcmp(%cwb_playback_order%,'Shuffle (directories)'),
                    'Shuffle (tracks)',
                        $if($strcmp(%cwb_playback_order%,'Shuffle (tracks)'),
                        'Default',
                        )
                    )
                )
            )
    )
)
,
)


///////////2
$puts(Evidenziato,$font(lcd2 bold,10,,128-0-255))

$alignabs(10,250,150,25,,)
$if($strcmp(%cwb_playback_order%,'Default'),
    $get(evidenziato)'REPEAT (PLAYLIST)',
        $if($strcmp(%cwb_playback_order%,'Repeat (playlist)'),
        $get(evidenziato)'REPEAT (TRACK)',
            $if($strcmp(%cwb_playback_order%,'repeat (track)'),
            $get(evidenziato)'SHUFFLE (ALBUMS)',
            )
        )
    )
)


wraithdu
It seems like these lines -
CODE
'$font(lcd2 bold,10,,128-0-255)'REPEAT TRACK'',

have 2 extra ' . It should be -
CODE
'$font(lcd2 bold,10,,128-0-255)REPEAT TRACK',
Yotsuya
QUOTE(honza @ Jan 28 2007, 13:55) *

Hi,
I'm new to Foobar, so I have to ask.
I have several panels in Tabbed panel stack mod.
I'd like to create "switching tab button".
I expect something like this, but I'm not sure with syntax and so on.

CODE
$if (Single viev,
$button(150,1,0,0,22,21,image,hover, Album View,),
$button(150,1,0,0,22,21,image,hover, Single View,)
)


I've tried to serch solution, or some good reference manual but without succes.
Thanks for help....


This is a tricky one. I know of no programmatic way to test if a given tab is active, or what the currently active tab is named. Theoretically you should be able to do something like this:
$button(150,1,0,0,22,21,image,hover,Panel #0 Cycle Forward,)
however the # is an invalid character and it wont work even if you surround it in single quotes or change it to $char(35). So unless things change I do not think your wish to have a toggle button will work. You can however create two separate buttons next to each other in your layout like this:
$button(150,1,0,0,22,21,image,hover,Album View,)
$button(172,1,0,0,22,21,image,hover,Single View,)
honza
QUOTE(Yotsuya @ Jan 29 2007, 10:04) *

QUOTE(honza @ Jan 28 2007, 13:55) *

Hi,
I'm new to Foobar, so I have to ask.
I have several panels in Tabbed panel stack mod.
I'd like to create "switching tab button".
I expect something like this, but I'm not sure with syntax and so on.

CODE
$if (Single viev,
$button(150,1,0,0,22,21,image,hover, Album View,),
$button(150,1,0,0,22,21,image,hover, Single View,)
)


I've tried to serch solution, or some good reference manual but without succes.
Thanks for help....


This is a tricky one. I know of no programmatic way to test if a given tab is active, or what the currently active tab is named. Theoretically you should be able to do something like this:
$button(150,1,0,0,22,21,image,hover,Panel #0 Cycle Forward,)
however the # is an invalid character and it wont work even if you surround it in single quotes or change it to $char(35). So unless things change I do not think your wish to have a toggle button will work. You can however create two separate buttons next to each other in your layout like this:
$button(150,1,0,0,22,21,image,hover,Album View,)
$button(172,1,0,0,22,21,image,hover,Single View,)


Thank you for explanation. I think I will use two buttons.
Exist there some reference of possible button commands? I didn't find it anywhere.
stampgevaar
$imageabs2(200,200,,,,,155,50,$get(cover1),nokeepaspect)
$imageabs2(200,200,,,,,155,50,$get(cover2),nokeepaspect)

$imageabs2(200,200,,,,,155,253,$get(cover1),nokeepaspectROTATEFLIP-6)
$imageabs2(200,200,,,,,155,253,$get(cover2),nokeepaspectROTATEFLIP-6)

My rotated covers don't resize if there smaller than 200 by 200. It's only the rotated ones...

What's wrong with my code or is this a bug? can please somebody help me
thanks in advance
wraithdu
QUOTE(stampgevaar @ Jan 29 2007, 06:00) *

$imageabs2(200,200,,,,,155,50,$get(cover1),nokeepaspect)
$imageabs2(200,200,,,,,155,50,$get(cover2),nokeepaspect)

$imageabs2(200,200,,,,,155,253,$get(cover1),nokeepaspectROTATEFLIP-6)
$imageabs2(200,200,,,,,155,253,$get(cover2),nokeepaspectROTATEFLIP-6)

My rotated covers don't resize if there smaller than 200 by 200. It's only the rotated ones...

What's wrong with my code or is this a bug? can please somebody help me
thanks in advance

You need a space between your options -
CODE
,nokeepaspect ROTATEFLIP-6)
GreenSmurf
Has anyone figured out how to make scrolling lyrics in the info panel yet?
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.