Open a config panel from another config panel

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Open a config panel from another config panel

Post by Pako » Tue Feb 10, 2009 5:59 pm

I got an idea how to improve the plugin Multitap. I found, that very often must be the obtained string to send to a window using emulation keystrokes. I would like that the user can also choose this option (instead of the event triggering). I need from the dialogue "Key" to open the dialogue "Find Window" (for example, using the button). It is possible to do so, not to copy the entire contents of the file FindWindow.py from the folder "Window" to a file __init__.py from the Multitap folder?
I do not know if you understand, what I ask.
Pako

User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Open a config panel from another config panel

Post by Bitmonster » Wed Feb 11, 2009 2:43 pm

No, this is not possible as it is now.
And I'm not sure if there is really a need to do so. If you integrate the target for keystrokes in the Multitap action, it would be hard to make such configuration usable with more than one context/target.

I just found a problem with the Multitapper:

Configuration:
"Single Key" mode with time-out and action1 set to "a,b,c" and action2 to "d,e,f".

Situation:
If you execute action1 twice (so you are on "b") and then action2 before time-out, you don't get an event with the "b" as suffix/payload (that should get triggered immediately after the execution of action2). The "d" that should come after the time-out also doesn't get triggered. So this is not the expected behaviour for a SMS-like single key mode.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Open a config panel from another config panel

Post by Pako » Wed Feb 11, 2009 7:29 pm

Bitmonster wrote:No, this is not possible as it is now.
And I'm not sure if there is really a need to do so. If you integrate the target for keystrokes in the Multitap action, it would be hard to make such configuration usable with more than one context/target.
Maybe this is not a good idea, but certainly this should go some way to simplify. I still do not know how.
Bitmonster wrote:I just found a problem with the Multitapper:

Configuration:
"Single Key" mode with time-out and action1 set to "a,b,c" and action2 to "d,e,f".

Situation:
If you execute action1 twice (so you are on "b") and then action2 before time-out, you don't get an event with the "b" as suffix/payload (that should get triggered immediately after the execution of action2). The "d" that should come after the time-out also doesn't get triggered. So this is not the expected behaviour for a SMS-like single key mode.
Yes, it is a bug. I'm going to do fix.
Pako

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Open a config panel from another config panel

Post by Pako » Wed Feb 11, 2009 8:55 pm

Fixed, but I still speculate about the original problem of how to combine a Multitap and SendKeys.
Pako

User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Open a config panel from another config panel

Post by Bitmonster » Wed Feb 11, 2009 9:19 pm

Well, using an event with payload and assigning it to a SendKey action with {eg.event.payload} works fine so far for me. Sometimes it is better to write a small HOWTO (for a SMS setup for example) with some XML the user can copy&paste, than to add too many options to a single action.

One further improvement request I have:
The GetLabel() of the "Key" action isn't very informative for "Single Key" mode. I would suggest that it should return something like:
Multitap: MySMS: Key: a, b, c, 2
or
Multitap: MySMS: Key: "a", "b", "c", "2"
when the configuration is called "MySMS"
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Open a config panel from another config panel

Post by Pako » Wed Feb 11, 2009 9:59 pm

Bitmonster wrote:Well, using an event with payload and assigning it to a SendKey action with {eg.event.payload} works fine so far for me. Sometimes it is better to write a small HOWTO (for a SMS setup for example) with some XML the user can copy&paste, than to add too many options to a single action.
Yes, I can do it. But where it is an appropriate place, where "how-to" put? The best would probably be in the description or help string of Key action.
I have but two problems:
1) My weak English will depreciate this great program :) :(
2) This bug: http://www.eventghost.org/forum/viewtop ... f=4&t=1166 has been fixed only in SVN, but not in the installation program.
Bitmonster wrote:One further improvement request I have:
The GetLabel() of the "Key" action isn't very informative for "Single Key" mode. I would suggest that it should return something like:
Multitap: MySMS: Key: a, b, c, 2
or
Multitap: MySMS: Key: "a", "b", "c", "2"
when the configuration is called "MySMS"
Well, I do it. This is a little thing.
Pako

User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Open a config panel from another config panel

Post by Bitmonster » Wed Feb 11, 2009 10:16 pm

I currently wait for a wxPython version for Python 2.6, that actually works without crashes under Vista. I don't want to go back to Python 2.5 because the current trunk is only tested against Python 2.6. But I hope it will not take to long now, as there are already some wxPython pre-releases that look promising.

Documentation will also change in the future. The new system will use reStructuredText through Sphinx as it allows to create HTML pages like this and also "CHM Windows Help Files". And I hope that we can get a MoinMoin-Wiki someday, as it can also use reStructuredText.

Currently I would recommend to start a new page about it in the current Wiki, as this would allow others to easily correct the spelling. And it's no big deal to convert it to reStructuredText later.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Open a config panel from another config panel

Post by Pako » Thu Feb 12, 2009 11:16 am

Bitmonster wrote:Multitap: Key: MySMS: a, b, c, 2
It's done.
And now I go to study how to make a wiki page.

Pako

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Open a config panel from another config panel

Post by Pako » Thu Feb 12, 2009 1:26 pm

Pako wrote:And now I go to study how to make a wiki page.
So I began. You can look here: http://www.eventghost.org/wiki/Multitap
Pako

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Open a config panel from another config panel

Post by Pako » Sat Feb 14, 2009 9:31 pm

In my first attempts I have pages in addition to "Multitap" has also created a page "Multitap_plugin". I wanted to propose to the speedy deletion by using the template {{prod}}. But found that the template does not exist. Therefore, I created it (based on the template in Wikipedia). However, this template refers to another template "Dated_prod". Then I found that this way does not lead the way. Please cleanup after my attempts. I promise, that nevermore I will not do it. :(
Pako

Post Reply