MAIN FEATURES
Scripting
Restrict "Language" to JScript and VBScript to prevent unexpected behavior.
Add popup menu, blur, timer and more operations to images.
Add support to run main menu and context menu command.
Editor Window
Add support to pseudo transparent, syntax highlighting for JScript and VBScript, Import/Outport scripts, customizable font style and miscellaneous UI improvements.
Screenshot:

Shortcuts:
- Ctrl+F: Find
- Ctrl+H: Replace
- Ctrl+G: Goto
- Ctrl+S: Apply
- If anything goes wrong, check the console first.
- gdi.Font() is fully changed: gdi.Font(name, pxSize, style);
- Don't call repaint functions such as window.Repaint() in callback function on_size() {}, especially in pseudo transparent mode.
- Don't try to assign parameter "gr" from function on_paint(gr) {} with other value, nor try to store "gr" in another variable.
CollectGarbage()is useful in JScript when you want to free memory immediately.(See #12)- It's better to retrieve window width and height in callback function on_size(), it's not necessary to retrieve them during startup.
- It's not recommended to create objects in callback function on_paint(), since it's called frenquently.
- Since v1.1.0, functions /methods which use IFbFileInfo Interface is replaced with IFbMetadbHandle Inferface.
- Do NOT update tags in global callbacks, see Callbacks.txt for details.
- jsbeautifier.org is a good site for formatting your JScript files.
- Don't forget that error handling (JScript, VBScript) helps to create more stable scripts.
- Consider using Dispose() method instead of CollectGarbage() function.
- DO NOT try to call playback control methods such as fb.Play(), fb.Next() and fb.RunMainMenuCommand("Stop"), or you will make foobar2000 crash.
CHANGELOG
CODE
v1.1.11
- ADD: window.SetCursor() method.
- CHG: Improvements for ApplyMask.
- CHG: Enhanced editor (autocompletion and calltips).
- FIX: Stack overflow in property editor.
- FIX: Fix crashes while trying to import invalid properties setting.
- FIX: Fix crashes due to GDI+ bug.
v1.1.10
- ADD: GdiAlphaBlend() method to IGdiGraphics interface, see Interfaces.txt for more details.
- ADD: Dispose() method to various classes, so now avoid using CollectGarbage(), see Interfaces.txt for more details.
- ADD: Reize() method to IGdiBitmap interface.
- ADD: ApplyMask() method to IGdiBitmap interface.
- ADD: utils.GetAlbumArtAsync() method and on_get_album_art_done() callback for getting album art asynchronously.
- ADD: window.ID() property, for now only used in utils.GetAlbumArtAsync().
- ADD: window.GetBackgroundImage() and on_refresh_background_done() callback to retrieve pseudo transparent bakground image.
- ADD: MetaRemoveField(), MetaAdd() and MetaInsertValue() methods for IFbFileInfo interface.
- ADD: on_item_played() callback.
- ADD: Edge style.
- CHG: UpdateFileInfoSimple() method of IFbMetadbHandle interface now supports multivalue field, see Interfaces.txt for more details.
- CHG: Set timeout to 0 now means disabling script hangs check.
- CHG: Updated Samples.
- FIX: Misc bugs and crashes fixed.
v1.1.9
- ADD: Re-added ability to check script hangs with customizable timeout.
- ADD: Add "safe mode" in order to prevent scripts using unsafe COM/ActiveX Objects.
- FIX: Possible crashes while editing scripts and other cleanups.
v1.1.8
- ADD: utils.PathWildcardMatch(pattern, str).
- ADD: IContextMenuManager.InitContext(metadb) method.
- ADD: New Callbacks: on_mouse_lbtn_dblclk, - ADD: New Callbacks: on_mouse_mbtn_down, on_mouse_mbtn_up, on_mouse_mbtn_dblclk, on_mouse_lbtn_dblclk and on_mouse_rbtn_dblclk.
- DEL: No check for script hangs any more.
- CHG: Change implementation of pseudo transparent background.
- CHG: Methods related to gdi+ objects creation won't throw errors anymore, only return NULL if failed.
- FIX: UpdateFileInfo() and UpdateFileInfoSimple() now throw an error if it's not executed in main thread.
- FIX: IMenuObject.ID property was broken.
- FIX: Crash when invalid index passed into InfoName()/InfoValue()/MetaName()/MetaValue().
- FIX: Rare crashes and minor cleanups.
v1.1.7
- ADD: Check for script hangs.
- ADD: window.GetProperty() and window.SetProperty().
- ADD: window.ShowConfigure() and window.ShowProperties();
- ADD: fb.IsMetadbInMediaLibrary() method.
- ADD: utils.IsKeyPressed() method.
- ADD: utils.GetAlbumArtEmbedded() method.
- CHG: utils.GetAlbumArt() now support artist image (See flags.txt).
- CHG: Gain default config value on panel creation, for panel stack splitter and dockable panels.
- FIX: Crash while passing a invalid value to IFbFileInfo.InfoValue() or IFbFileInfo.MetaValue().
- FIX: A rare crash when closing foobar2000 and other cleanups.
v1.1.6
- ADD: Add method SetMaxWidth(width) to IFbTooltip interface, note that this should be called at least once to enbale multiline or long string support.
- FIX: No length restriction for tooltip text now.
- FIX: Fix a crash when try to apply script in editor window whose corresponding panel is closed (Thanks Peter).
v1.1.5
- ADD: Add two new methods: MetaFind(name) and InfoFind(name) to IFbFileInfo interface.
- ADD: Add DrawEllipse(), FillEllipse(), DrawRoundRect() and FillRoundRect() to IGdiGraphics interface.
- DEL: Remove broken method Rotate() from IGdiBitmap interface.
- ADD: window.CreateTooltip().
- ADD: IFbTooltip interface, check Interfaces.txt for details.
- CHG: Change behavior of shortcuts in editor.
v1.1.4
- CHG: fb.trace() now accept variable number of arguments, and all arguments are converted to string automatically, e.g: fb.trace("Numbers:", 1, 2, 3) will output "Numbers 1 2 3".
- ADD: New "Time" property to "IFbProfiler" interface.
- ADD: Two new methods: utils.ReadINI() and utils.WriteINI()
- ADD: In the preferences window of editor properties, add serveral new styles customizable.
- FIX: Some UI glitches about syntax highlighting after editing styles.
- FIX: Some fixes to prevent potential crash.
v1.1.3
- ADD: New methods: window.WatchMetadb(metadb) and window.UnWatchMetadb(), in order to watch metadb changes.
- ADD: New callback function on_metadb_change(metadb, fromhook) is added in cooperation with two new methods above.
- ADD: New sample: "Watch Metadb Change (Base)".
- CHG: Names of editor properties are changes, and add serveral new styles customizable.
- ADD: Import / Export support for editor properties.
- ADD: New "Apply" button in Preferences, WSH Panel Mod, in order to apply editor properties immediately.
- FIX: Minor UI fixes/improvements to editor window.
- FIX: Misc fixes/changes in source code.
v1.1.2
- FIX: A crash while using utils.GetAlbumArt() if there are not album art present.
- CHG: IFbTitleFormat.Eval() is now IFbTitleFormat.Eval(force = false) (Backward compatible).
- ADD: fb.RunContextCommandWithMetadb(metadb);
- ADD: Much improvements about editor window, you now can set style (font, size, fore/bakground color, etc) in foobar2000 Preferences, WSH Panel Mod. Note these setting will take effect after reopening editor window.
- CHG: Content of popup error message is more friendly.
v1.1.1
- FIX: fb.ShowConsole() doesn't work due to wrong GUID in fb2k SDK.
- FIX: fb.RunContextCommand() is broken since v1.1.0.
- FIX: Memory leak in IGdiBitmap.CreateRawBitmap().
- ADD: New properties: fb.CursorFollowPlayback and fb.PlaybackFollowCursor.
- ADD: New "NotifyOthers" property to "window" interface.
- ADD: New callbacks: on_playlist_stop_after_current_changed(state), on_cursor_follow_playback_changed(state), on_playback_follow_cursor_changed(state) and on_notify_data(name, info).
- FIX: "on_item_focus_change" is suddenly wrong documented as "on_items_focus_change".
v1.1.0
- ADD: IFbMetadbHandle, refer to Interface.txt for more information.
- CHG: (ATTENTION) fb.GetNowPlaying(), fb.GetFocusItem() now return IFbMetadbHandle, instead of IFbFileInfo.
- CHG: (ATTENTION) on_playback_new_track(metadb) call back now use IFbMetadbHandle as parameter, instead of IFbFileInfo.
- ADD: Method MetaSet() to IFbFileInfo interface.
- ADD: Ability to update file info: IFbMetadbHandle.UpdateFileInfo() and IFbMetadbHandle.UpdateFileInfoSimple().
- ADD: New interface utils: utils.CheckComponent(), utils.CheckFont() and utils.GetAlbumArt().
- ADD: IFbTitleFormat.EvalWithMetadb().
- FIX: fb.RunMainMenuCommand() handles menu display string which contains '/' character correctly.
- DEL: Remove EvalPlaylist() from "fb" interface.
- CHG: Eval() will execute some base functions/variables even fb2k is not playing or playlist is empty.
- CHG: Callback "on_items_selection_change" is now "on_items_focus_change".
- ADD: New samples: "GetAlbumArt" and "SimpleFollowCursor".
- FIX: Some problems may cause memory leak.
v1.0.4
- ADD: Two new callbacks: on_mouse_rbtn_down(x, y, vkey) and on_mouse_rbtn_up(x, y, vkey).
- ADD: "ShowPopupMessage" method to "fb" interface.
v1.0.3
- FIX: Crash while using fb.RunMainMenuCommand().
v1.0.2
- ADD: "StopAfterCurrent" property to "fb" interface.
- FIX: Minor bug fixes to configuration window.
v1.0.1
- First public release.
DOWNLOAD
Binaries, Samples, References and Source:
LINK (GoogleCode)




(In Foobar/Images directory)