Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

User Image
Law Legge
7 discussion posts
Hi folks,

I'm working with Spotify and Musixmatch.

What I want to do is - when I start Spotify from the Spotify taskbar shortcut - to automatically run Musixmatch, and then automatically close Musixmatch when I close Spotify.

I have the first part - run Musixmatch automatically when I start Spotify - using a custom "Run Function" but can't figure out how to automatically close Musixmatch when I close Spotify.

I also have Spotify open on monitor 4 and Musixmatch open on monitor 3, which I do through the "Trigger - Actions" settings...

BF monitors.JPG

What is the best way to accomplish all this...
• Attachment [protected]: BF monitors.JPG [109,198 bytes]
Dec 21, 2016  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
You should be able to do this using a "Window Destroyed" Trigger for Spotify that runs a Scripted Function that closes Musixmatch. If you can attach a copy of your troubleshooting info (copied while Musixmatch is running), I can give you a sample Scripted Function that will close Musixmatch.
  • Open the Settings > Troubleshooting tab
  • Click the "Copy to Clipboard" button
  • Paste the text into a text file (please don't paste the text directly into your reply, the formatting gets garbled and makes it difficult to parse)
  • Reply with the file attached
Dec 21, 2016  • #2
User Image
Law Legge
7 discussion posts
Thanks Keith,

You have/give the best support...file attached...
• Attachment [protected]: BF Troubleshoot.txt [111,452 bytes]
Dec 22, 2016  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks! Ok, try this out:
  • Add a new Trigger
  • Choose the "Window Destroyed" Trigger Event
  • Choose the Spotify process in the Match Conditions
  • Click Add > New Scripted Function
  • Delete the default code and paste in the code from below
  • Click OK to save the Scripted Function, OK to save the Trigger, and Apply to apply the Settings
  • Exit Spotify and it should also run that Scripted Function to close Musixmatch

Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
windowHandle = BFS.Window.GetWindowByText("*Musixmatch*");
BFS.Window.Close(windowHandle);
}
}
Dec 22, 2016  • #4
User Image
Law Legge
7 discussion posts
Absolutely perfect.

This also gives me a better understanding of how to use triggers in general.
DisplayFusion automation, here we come...

Thanks Keith
Dec 23, 2016  • #5
Keith Lammers (BFS)'s profile on WallpaperFusion.com
No worries, glad I could help!
Dec 23, 2016  • #6
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)