Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
Collin Chaffin
69 discussion posts
Starting a separate thread for feature requests related to the BFS API.

I'll start with:

1. "Get" calls to match the existing "Set" calls (ie. BFS.Audio.SetDefaultPlaybackSounds). There really needs to be a BFS.Audio.GetDefaultPlaybackSounds in this case to be able to use logic (ie. toggling between 2 needs a if/get/speakers then set/headphones)

2. Either under BFS.DisplayFusion or BFS.General a few calls relating to the active DF installation. Calls that return the install path, version, and perhaps whether under admin policy control (enterprise), islicensed, installDateTime, etc.

3. Triggers. This is one of the biggest and since it sounds like it's in the works I won't elaborate other than trigger/eventing is crucial to taking the scripting/macro abilities to a whole new level (ie. Most likely default - when active window handle changes - when new active window becomes "xyz", fire off a whole bunch of code).

4. BFS.Clipboard could really use a BFS.Clipboard.Save as well as perhaps a BFS.Clipboard.GetType to determine txt/image/etc.

5. A new BFS.Image set of class methods would be nice to allow easier DF image manipulation/resizing and then getting/setting wallpaper via the image class as well.

6. BFS.Monitor methods could have some of the functionality my scripts using nirsoft incorporated for settting individual monitor sleep states, etc. (ie. BFS.Monitor.Sleep(<monitornum>,<passwordrequiredforwake>))

Just some initial ideas. I think the ability for the community to expand the product using your own API clearly puts the potential feature list substantially ahead of your competition. Looking at multimon or other products I can already say "neither product natively upon a hotkey or button will blank my wallpaper, save all window positions, minimize them all, mute my audio, sleep all my monitors, and lock my workstation.....but only with DisplayFusion can I write a simple C# function to do it all at once".
Collin Chaffin's profile on WallpaperFusion.com
Dec 26, 2014  • #1
User Image
Collin Chaffin
69 discussion posts
Don't allow people to use the flag: WS_Disabled with BFS.Window.SetWindowStyle or they will be left with frozen locked out windows unable to re-enable using current API/scripting.

Since this below isn't apparently currently allowed and I find no exposed call in BFS to allow calling required EnableWindow to re-enable any window disabled with the above flag, once you set WS_Disabled you cannot touch the window again without using other means/code!

[DllImport("user32.dll")]
private static extern bool EnableWindow(IntPtr hwnd, bool enable);

Are there plans to allow calling native API like above in the future? Are external dotnet assemblies currently fully supported with no restrictions? If I were to compile a separate C# assembly dll to enable windows for instance, could I currently call it with the DF script compiler?
Collin Chaffin's profile on WallpaperFusion.com
Dec 27, 2014  • #2
User Image
Collin Chaffin
69 discussion posts
In fact, this might be a good proof of concept if Keith could confirm how I should reference my dll assembly to call my own function to enablewindow as an example? Also, do I need to keep my assembly in the BFS namespace etc for it to be allowed or can I utilize any extern namespace?
Collin Chaffin's profile on WallpaperFusion.com
Dec 27, 2014  • #3
Jon Tackabury (BFS)'s profile on WallpaperFusion.com
These are excellent ideas! We're back in the office on Monday, I'll make sure this gets added to our tracking system so we can include them (or most of them) in the next version. As for external functions (through p/invoke) you can do that already in 7.0. Take a look at the "Stop All Taskbar Button Flashing" downloaded function. We will put a better example in when we're back in the office next week, but this should get you started. :)
Dec 28, 2014  • #4
User Image
Collin Chaffin
69 discussion posts
Awesome, looking at it now Jon, thanks!
Collin Chaffin's profile on WallpaperFusion.com
Dec 28, 2014  • #5
User Image
Collin Chaffin
69 discussion posts
Hey quick question if you're still online - are there any examples in v7 of referencing an external/3rd party dotnet dll assembly? I assume it's possible and then does BF allow (or thought about) folks also being able to submit compiled "helper" dll assemblies to go with the functions and perhaps replace need for calling 3rd party stuff like nirsoft exe's?
Collin Chaffin's profile on WallpaperFusion.com
Dec 28, 2014  • #6
Jon Tackabury (BFS)'s profile on WallpaperFusion.com
I just wanted to let you know that 7.1 Beta 1 is now available:
http://www.displayfusion.com/Download/Beta/

Let me see if I've covered all of your requests:

- I've included a list of the new functions below
- If you want to save the clipboard text for use later, you can use the BFS.ScriptSettings.ReadValue and BFS.ScriptSettings.WriteValue functions to save string values
- I'm going to add examples for p/invoke and external assemblies later today
- For an external assembly, you just need to put the .DLL in the DisplayFusion folder, then in the references field just add "myassembly.dll", then add your namespace to the usings at the top and it should work

If I missed anything from your posts please let me know. Thanks!

New scripting functions:
BFS.Clipboard:
- bool HasText()
- bool HasImage()

BFS.General:
- bool LockDesktop()
- bool IsDesktopLockeded()
- string GetAppVersion()
- string GetAppInstallPath()
- string GetAppExecutable()
- bool GetAppIsProVersion()
- bool SleepMonitors()
- bool WakeMonitors()

BFS.Audio:
- bool GetDefaultPlaybackSounds()
- bool GetDefaultPlaybackCommunications()
- bool GetDefaultRecordingSounds()
- bool GetDefaultRecordingCommunications()

BFS.Window:
- bool EnableWindow(IntPtr windowHandle)
- bool DisableWindow(IntPtr windowHandle)
- bool IsWindowRolledUpToTitleBar(IntPtr windowHandle)
- bool RollupWindowToTitleBar(IntPtr windowHandle)
- bool UnrollWindowFromTitleBar(IntPtr windowHandle)
- bool IsWindowRolledUpToIcon(IntPtr windowHandle)
- bool RollupWindowToIcon(IntPtr windowHandle)
- bool UnrollWindowFromIcon(IntPtr windowHandle)
- bool IsWindowRolledUpToHat(IntPtr windowHandle)
- bool RollupWindowToHat(IntPtr windowHandle)
- bool UnrollWindowFromHat(IntPtr windowHandle)
Dec 30, 2014  • #7
Jon Tackabury (BFS)'s profile on WallpaperFusion.com
There are 2 new functions you can download in DisplayFusion now that show how to reference external assemblies and functions:

How To: Custom External Assemblies
How To: P/Invoke External Win32 Functions
Dec 30, 2014 (modified Dec 30, 2014)  • #8
User Image
Collin Chaffin
69 discussion posts
Hey Jon,

This is AWESOME work! Can't tell you how unbelievable you guys are! That covers my current suggestions but I'm hoping to return to this thread and perhaps others might chime in spurring dev interest!

I'm going to have to play with the examples right away!

Thanks again!

Collin
Collin Chaffin's profile on WallpaperFusion.com
Dec 31, 2014  • #9
User Image
Collin Chaffin
69 discussion posts
Hey Jon,

The only suggestion is on the 1st example for assemblies it refers to adding to the reference section "below", yet you didn't add it in. Just wanted you to be aware in case you intended to add the reference section below as it stated.

-Collin
Collin Chaffin's profile on WallpaperFusion.com
Dec 31, 2014  • #10
Jon Tackabury (BFS)'s profile on WallpaperFusion.com
Sorry, the "below" part is referencing the code editor window that has a "References" box. :)
Dec 31, 2014  • #11
User Image
Collin Chaffin
69 discussion posts
Hey Jon,

Doh! I should have read and looked a little more closely!

Again....can't say enough how awesome you guys are at keeping your finger on the pulse of your customer base and adding features/enhancements!

Thanks again!

Collin
Collin Chaffin's profile on WallpaperFusion.com
Jan 5, 2015  • #12
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)