photools.com Community

IMatch Bug Reports and Feature Requests => Feature Requests => Archive (Feature Requests) => Topic started by: monochrome on April 04, 2016, 10:42:08 PM

Title: Fire script event when workspace changes / has changed
Post by: monochrome on April 04, 2016, 10:42:08 PM
I'd like for events to be fired when the user selects a different workspace is selected.

1. Fired before the current workspace is disposed. This would enable the script to store any persistent data between workspaces. If possible, include the name of the workspace that is being switched to in the event.

2. Fired after the new workspace has started. (It can also be fired whenever the IMatch UI has started.) This would enable a script that stored persistent state in (1) to reload that state.
Title: Re: Fire script event when workspace changes / has changed
Post by: ubacher on April 05, 2016, 11:31:59 AM
Good idea!
I have two scripts I use before and after I switch work spaces: to save and restore the current working directory.
This because switching work spaces also switches directories. I don't do this often enough to justify an event script though.
What is you purpose?



Title: Re: Fire script event when workspace changes / has changed
Post by: monochrome on April 05, 2016, 03:06:19 PM
That's pretty much my reason for wanting this. Since it's very difficult to keep a script running across a workspace switch, I came up with this.

(I'm assuming that the cost of adding an event firing at a fairly well-defined point in IMatch's execution is small.)