Skip to main content

Topic: foo_run 0.3.7 (Read 446247 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • bsw11
  • [*][*][*]
foo_run 0.3.7
Reply #375
This plugin is FANTASTIC!!

I am just one step away from total success.

I am using AutoIt to get around FB2K's limitation on not being able to change the output device - that works perfectly (if anyone is interested in the scripts let me know) assigned to function keys.

What I need to complete the deal is a way to query the current song automatically as it starts up and based on if the song is 2 or multi channel run one of my 2 scripts.  If anyone know how to make this work, please provide me the needed scripting.

One other tweak needed is a way to only make the call if the channels are changed from the last track to the current otherwise there will be a small drop out in the sound.

Thanks!
  • Last Edit: 13 December, 2010, 06:58:06 PM by bsw11

  • lee321987
  • [*]
foo_run 0.3.7
Reply #376
You probably want Foobar to run the apps, which I don't know how to do, but a dirtier way would be to use AutoIt...
In Foobar2000:
  File > Preferences > Display > Default User Interface > ---- the text box called "Status Bar"
What you type here effects the bottom "status bar" of Foobars' window.
Add a few very rare characters, and "%channels%" like:
Code: [Select]
▲▲▲%channels%

Then use "WinGetText" in AutoIt.
Oh, and the AutoIt code for those three triangles is:
Code: [Select]
$MyString = ChrW(9650) & ChrW(9650) & ChrW(9650)
  • Last Edit: 14 December, 2010, 04:02:44 AM by lee321987

  • bsw11
  • [*][*][*]
foo_run 0.3.7
Reply #377
YES!  After I did the post that is exactly what I was thinking - pass the channels into autoit and do all the logic in there.  Can't I just pass %channels% on the command line?  If not can you tell me how to type in those special characters in FB2K?

I am not very script code oriented - any way you could give me the autoit script as well?

I have already made the device change work from autoit - all I need is the code to do the logic as in:

load last_channel file
If channels = last_channels exit
If channels = 2 then
    (code to set device to 2 ch which I have)
else
    (code to set device to multich which I have)
endif
save last_channels to a file.

Also what code do I need to make this execute at the start of each track?  Should I use foo_schedule or can it be done by foo_run?


THANKS!!!
  • Last Edit: 14 December, 2010, 11:51:54 AM by bsw11

  • bsw11
  • [*][*][*]
foo_run 0.3.7
Reply #378
Edit - I got it working !!!  I just used "| 6ch |" as the match and it works! 

So I am using foo_scheduler to fire off the script at the start of each play - is that the way to do this?

Also I tired using %channels% on the command line but all I ever got was Stereo no matter what the source - seems like a bug of some type in foo_run.  This would have been easier to do.

  • Last Edit: 14 December, 2010, 04:18:11 PM by bsw11

  • lee321987
  • [*]
foo_run 0.3.7
Reply #379
To type those chars  into foobar, you could copy+paste them from this page, or in AutoIt:
Code: [Select]
Clipput(ChrW(9650) & ChrW(9650) & ChrW(9650))

will put them in your clipboard.

foo_scheduler seems like the perfect way to do it.  I didn't even know it existed.
I figured out a way to do it from command line:
Foobar2000 for some reason (?) won't run the context commands created by "foo_run", but the component "foo_runcmd" will:
http://www.hydrogenaudio.org/forums/index....showtopic=46852
or
http://foosion.foobar2000.org/components/
it's called "Run Command" on that page.  Install it, and restart Foobar.

Create a new foo_run Service, (I'll "Lable" it NumChan), and set the "path" to:
Code: [Select]
"<path to your AutoIt script>" %channels%


Set your Scheduler command to:
Code: [Select]
<path to foobar2000.exe> /runcmd-playing="Run service/NumChan"


Question:
How were you getting %channels% to pass to anything from command line?
  • Last Edit: 15 December, 2010, 03:15:58 AM by lee321987

  • lee321987
  • [*]
foo_run 0.3.7
Reply #380
The AutoIt script would be something like this:
Code: [Select]
$numchan = $cmdline[1]

$historyFile = @ScriptDir & '\lastChannels.txt'
$fileHandle = FileOpen($historyFile, 0)
$lastChans = FileRead($fileHandle)
FileClose($fileHandle)

If $lastChans = $numchan Then
Exit
ElseIf $numchan = 'Stereo' Then
;put under here what happens if the current track is stereo

ElseIf $numchan = '6ch' Then
;put under here what happens if it's 6 channel

EndIf

$fileHandle = FileOpen($historyFile, 2)
FileWrite($fileHandle, $numchan)
FileClose($fileHandle)
To keep track of last_channels, it will create and use a file called "lastChannels.txt" in the dir the script is run from.
You may want to add some more "ElseIf" statements especially one for if the result is "mono", and maybe one for "2ch" (if that's ever even a possible value of %channels%).
  • Last Edit: 15 December, 2010, 05:23:55 AM by lee321987

  • Porcus
  • [*][*][*][*][*]
foo_run 0.3.7
Reply #381
So I am using foo_scheduler to fire off the script at the start of each play - is that the way to do this?


Well, I only just downloaded  foo_default_videoplayer, which -- when it encounters a filetype you specify -- will run an external file.
That means it is possible to retrieve this information from foobar2000. Don't ask me how.

A suggestion could be to save the 6chs in a different format (if they are FLAC you could probably only rename to .FLA? If they are lossy, do they fit a Matroska container?), and -- whichever way it is done -- take action based on filetype.

Or, if the 6ch audio is the only oddballs you have in your collection: configure a default "videoplayer" to play these -- this could merely be another foobar2000.exe!
Problem: Tell foobar to resume playback with next item when done with this.
  • Last Edit: 15 December, 2010, 07:30:04 AM by Porcus

  • zucca
  • [*]
foo_run 0.3.7
Reply #382
for Wikipedia Discography

Code: [Select]
"http://en.wikipedia.org/wiki/Special:Search?search=%artist% discography"

  • djphatic
  • [*]
foo_run 0.3.7
Reply #383
I currently have 2 services mp3brfix and pcutmp3 as follows;

mp3brfix
Code: [Select]
cmd /c "java.exe -jar "C:\pcutmp3\mp3brfix.jar" -f "$directory_path(%path%)\%filename%.mp3"


pcutmp3
Code: [Select]
cmd /c "java.exe -jar "C:\pcutmp3\pcutmp3.jar" --cue "%path%" "$directory_path(%path%)\%__referenced_file%" --dir "$directory_path(%path%)\%album artist% - %album%" --out "%%n %%p - %%t"


Does anyone know how I could combine the 2 into one service so that mp3brfix will run first, fix the mp3 and the when finished pcutmp3 will run and split the file accordingly?
  • Last Edit: 21 January, 2011, 02:18:00 PM by djphatic

  • d_A_y
  • [*]
foo_run 0.3.7
Reply #384
i got an error on 64bit windows - for example, service "C:\Program Files (x86)\Mp3tag\Mp3tag.exe" isn't executing, log says
Quote
Run: Cannot execute "C:\Program Files "

double quoting the command just adds an extra quote in log:
Quote
Run: Cannot execute ""C:\Program Files "


it seems "(" is to blame - for example, service "C:\Program kinda files\Mp3tag\Mp3tag.exe" executing ok.
is there any way to fix that?

  • marc2003
  • [*][*][*][*][*]
foo_run 0.3.7
Reply #385
"C:\Program Files '('x86')'\Mp3tag\Mp3tag.exe"

  • lvqcl
  • [*][*][*][*][*]
  • Developer
foo_run 0.3.7
Reply #386
"C:\Program Files '('x86')'\Mp3tag\Mp3tag.exe"

added: %$^$&  !
  • Last Edit: 27 February, 2011, 04:38:57 AM by lvqcl

  • Bryter
  • [*][*][*]
foo_run 0.3.7
Reply #387
Is there any way to create a button inside Columns UI and link it to a foo_run command? I am interested in having a discogs button which will help me tag files easier.
I read (almost  ) all the pages of this thread, and i could not find an answer.

foo_run 0.3.7
Reply #388
Can anyone help get foo_run to launch a search on beatport for the artist name?

foo_run 0.3.7
Reply #389
It doesn't look like that is possible since that site is completely flash (ugh!), with no URL search patterns as far as I can tell.

But there is one for the mobile site, although that might not be much use:
Code: [Select]
http://m.beatport.com/search/?query=$replace(%artist%, ,+)

foo_run 0.3.7
Reply #390
Thanks Purple Monkey, I didn't think of using the mobile site. Serves its purpose for me, because I am just using Beatport to find the full release date of albums and eps.

foo_run 0.3.7
Reply #391
@Purple Monkey: cool, tried to find a solution, but didn't think of the mobile version. So, thanks for apple for not accepting FLASH

  • Ringo78
  • [*]
foo_run 0.3.7
Reply #392
discogs Artist  Album
Code: [Select]
http://www.discogs.com/search?type=all&q=$replace(%artist%, ,+)&btn=Search
http://www.discogs.com/search?type=releases&q=$replace(%album%, ,+)&btn=Search


I'm looking for some help with Run Service scripts to search Discogs. The above quote is almost there but not quite.

What I'm trying to do is use foo_discogs to tag Year, Genre and Style - where musicbrainz is lacking. However while using the 'Find Release' interface is fine 95% of the time, sometimes theres a problem and I need a url from the site itself. For example with various artist compilations, odd characters, etc.

So I'd like to search for the following;

1. 'Album Artist' only
2. 'Album' only
3. 'Album Artist' + 'Album'

Also I'd like if 'Album Artist' is 'Various Artists', for this search string to be changed to 'Various'. Unfortunately searching for 'Various Artists - Scott Pilgrim' won't work, while 'Various Scott Pilgrim' will.



(Actually... I'd also quite like the above parameters for searching Album Art Exchange and Allmusic.)

Thanks for any advice

  • JJForums
  • [*][*]
foo_run 0.3.7
Reply #393
help with foo_run and mp3 tag, i use this to open files in fb2k with mp3tag, and it opens the folder of the file: "C:\Program Files '('x86')'\Mp3tag\Mp3tag.exe" "$directory_path(%path%)" but when it is opened in mp3tag, the files are unselected, is possible auto select the openend files in mp3tag? thanks!

  • tpijag
  • [*][*][*][*][*]
foo_run 0.3.7
Reply #394
Do you mean that mp3tag opens and nothing else or that the files are in mp3tag but unselected.
Assuming the first, this works for me
Quote
"C:\Program Files\Mp3tag\Mp3tag.exe" "$replace(%_path%,%_filename_ext%,)"

  • JJForums
  • [*][*]
foo_run 0.3.7
Reply #395
yes, it works, but the mp3tag doesn't select the files, they go to mp3tag but unselected, so, i have to select to do something, i want to know if is possible to mp3tag open with files just selected.

  • tpijag
  • [*][*][*][*][*]
foo_run 0.3.7
Reply #396
Have no idea. The mp3tag forum is pretty active, maybe they can be of assistance.
For me, Ctrl-A is not too taxing

  • Bryter
  • [*][*][*]
foo_run 0.3.7
Reply #397
I just figured that i can add custom buttons to foobar that will run foo_run programs/websites. How did i miss this before? 
Anyway, i would really appreciate if someone could help me to make a command that will open what.cd's artist page. This is what the search engine looks like in Chrome:

Code: [Select]
http://what.cd/artist.php?artistname=%s


Anyway to make compatible with foo_run?

  • tnnds
  • [*]
foo_run 0.3.7
Reply #398

  • Bryter
  • [*][*][*]
foo_run 0.3.7
Reply #399
^Perfect! Thank you so much