|
Get Plugin (its id) that miniwindow was created from
|
Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Bast
(76 posts) bio
|
| Date |
Wed 08 Feb 2012 03:31 PM (UTC) [ quote
] Amended on Wed 08 Feb 2012 03:33 PM (UTC) by Bast
|
| Message |
Could we get it added it to WindowInfo please. I am currently working on a plugin that will save window states (position,size,etc) and would like to be able to find which plugin created a window.
Unless there is some other way to get this?
Bast |
Bast
Scripts: http://bastmush.googlecode.com | top |
|
| Posted by |
Kevnuke
USA (83 posts) bio
|
| Date |
Reply #1 on Wed 08 Feb 2012 06:44 PM (UTC) [ quote
] |
| Message |
I haven't personally made any miniwindows, but from what I've seen experienced plugin writers assign things like that to a variable and then use the variables as arguments to the function they are using, WindowCreate, for example. If the plugin itself saves it's state this shouldn't be needed. If it doesn't, the value of these variables can be saved in client variables and retrieved later by the plugin.
How are you planning to use this information once you get it?
I'm curious because I'm putting everything for my curing system into one plugin. | top |
|
| Posted by |
Nick Gammon
Australia (18,770 posts) bio
Forum Administrator |
| Date |
Reply #2 on Wed 08 Feb 2012 07:25 PM (UTC) [ quote
] |
| Message |
The plugin ID, by convention, is supposed to be part of the miniwindow ID, to avoid clashes with other plugins. However it possibly would not be the first or last part of the name.
I've added selector 23 to WindowInfo for version 4.82 which will have this information. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
| Posted by |
Bast
(76 posts) bio
|
| Date |
Reply #3 on Thu 09 Feb 2012 03:22 PM (UTC) [ quote
] |
| Message |
Yes, I will use the plugin id. The plan is to query the plugins for certain functions and if those functions exist, call those functions with the new states. For example, if the plugin is using Nick's movewindow.lua, I will call movewindow.save_state(windowid) and it will save the new coords. There will be similar functionality for plugins that I write.
Bast
|
Bast
Scripts: http://bastmush.googlecode.com | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
804 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )