Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
Kenneth Kornblum
2 discussion posts
I bought the Pro/Personal license for the whole package of BF products. This is like my new toy. I am addicted to customizing everything in the universe.

Scripting languages, C# and Visual Basic, no problem. Been writing in those and other languages for years. The thing I cannot figure out is how to get back into an edit session to continue editing an existing script.

Example, I have a function which positions my MS Outlook window where I want it on my LG Ultra Wide monitor. Today I take my laptop out on the patio and the trigger fires. Hmm, bad idea. So, I wrote a script to detect the monitor size using a VB script containing the following in part:

dim monBnds as string
dim isUltraWide as boolean
isUltraWide = False

' get monitor size. if Ultra Wide then customize it
monBnds = BFS.Monitor.GetMonitorBoundsByWindow(windowHandle).ToString

' Test for Ultra Wide resolution
if monBnds = "{X=0,Y=0,Width=3440,Height=1980}" then isUltraWide = True

if isUltraWide then
' do stuff for this monitor
else
' do stuff for Laptop monitor
end if

Love it. It works. Saved it. Now I want to edit it again. I highlight the action, click edit, it pops up a dialog where I can pick the name of my scripted function. I select it and click OK. The dialog closes. Nothing else happens. How on earth do I re-edit my script??

I know this was verbose. I posted the script (from memory) seeking feedback on that while I am at it. But the primary thing I need to know is how to get back into a saved script for edit.

Thanks all.
Oct 7, 2017  • #1
User Image
Kenneth Kornblum
2 discussion posts
Never Mind.

The answer is to look in the Functions tab / Custom Functions and then double-click on your function name.
Oct 9, 2017  • #2
Joe B.'s profile on WallpaperFusion.com
I lost my function when I upgraded. Presently running 9.7.1 ( Beta 4 )
When I open Functions, "Custom Function is a drop down button with only 3 options: Add Custom Function, Export Function, Import Function.

I had the function: Move Mouse Pointer in Circle by Thomas Malloch (BFS)
https://www.displayfusion.com/ScriptedFunctions/View/?ID=23e9ace2-f10e-42ea-ae8b-543270d50cd4

After import, the function shows up under "Custom Functions", but I can only assign a key Combination to it. I can't see where to edit the script code. I know I did this once from the DisplayFusion interface, and not with an external editor.

The rest of the Edit Function dialog has these drop down lists.
Function Actions: drop down list.
Customer Function Actions:
Windows Alignment:
Window Width Change:
Window Height Change:

There is an Edit button, which only changes the Key Combo.
Sep 4, 2020  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
If you select the "Move Mouse Pointer in Circle" in the list, then click the Edit Function button, that should do it.

You can also double-click the "Move Mouse Pointer in Circle" function to open it's script edit window.
Sep 4, 2020  • #4
Joe B.'s profile on WallpaperFusion.com
My confusion was between "Custom Functions" and "Scripted Functions"
When I added Move Mouse Pointer in a Circle as a Scripted Function, it worked and
I can return to edit it. If I import it as a Custom Function, the application does not report any error, but I cannot edit it, nor did it work.

So can you compare/contrast a Custom Function vs. a Scripted Function for me?
Sep 4, 2020  • #5
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Custom Functions allow you to create certain limited functions, mostly sizing/moving windows.

Scripted Functions allow you to create anything you can using our built-in scripting namespace (https://www.displayfusion.com/ScriptedFunctions/Help/) and you can also use regular C# code in them as well.
Sep 9, 2020  • #6
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(3)  Login to Vote(-)