Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Suggestions
➜ Triggers, idle time, scripting, and screen focus
Triggers, idle time, scripting, and screen focus
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Vaejor
(120 posts) Bio
|
Date
| Sat 18 May 2002 05:25 PM (UTC) |
Message
| Sorry to throw this all in one item, but here's a few things that may be useful for others as well.
There are times when I rather a trigger be disabled if I am inactive at my keyboard/mouse for a general amount of time. This could be implemented in two seperate locations to allow for the most flexibility. The first location would be in the trigger(and timer?) GUI input forms. A checkbox for 'Only process when active'. Also, a scripting function such as: world.IdleTime() would allow additional flexibility for more complex users. In order to determine idleness, a global variable(per mud) allowing input of a number from 0-1800(1 hour should be enough) for the number of seconds until a character is considered idle by MushClient. This can also be used to work with the current 'Trigger - Sound - Only if Inactive' setting.
A small secondary request contains 1 new script function and altering 1 current script function. A new function would return a string containing the name of the current window in MushClient that currently has focus, including world windows, notepads, etc. The altered function would be for world.Activate in order to use this information. It would work similar to ActivateNotepad(and actually could make it obselete) and would bring the window requested to the foreground of all others. | Top |
|
Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sat 18 May 2002 10:56 PM (UTC) |
Message
|
Quote:
It would work similar to ActivateNotepad(and actually could make it obselete) and would bring the window requested to the foreground of all others.
Isn't the window with the focus, by definition, at the foreground? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Vaejor
(120 posts) Bio
|
Date
| Reply #2 on Sat 18 May 2002 11:45 PM (UTC) |
Message
| My apologies, I should have been a bit more clear.
The request for windowing scripting functions should be as follows:
1) Create a new script function, world.ActiveWindow which returns a string from the titlebar of the window which has focus currently.
2) Alter a current script function, world.Activate, to accept a string containing the titlebar of any screen in Mushclient, so that it can cause that screen to come to the foreground.
*Note*
The above can use numbers corresponding to the window # as per their identification in the toolbar, as long as both functions use the same data references. This would limit Activate to only working with world windows though. It could be nice to add the ActivateNotepad functionality into Activate to give it a single function call to work with all window focus in Mushclient.
Real world concept:
Primary mud sends data to a notepad as specific triggers activate it. When it sends data to the notepad, it would be useful to make sure that the notepad attempts to come to the front of the screen; however, whichever window had focus before that point should regain its focus immediately. As long as the first window is the one being worked on, everything goes fine. But if you are working in an alternate window in Mushclient, the script will cause the focus to be reset incorrectly.
Alternate usage: Triggers can cause their own windows to forcefully get focus. | Top |
|
Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
Date
| Reply #3 on Mon 20 May 2002 01:00 AM (UTC) |
Message
|
Quote:
When it sends data to the notepad, it would be useful to make sure that the notepad attempts to come to the front of the screen; however, whichever window had focus before that point should regain its focus immediately.
How is that useful? The notepad window will just flicker into view for a moment.
Anyway, most of that functionality is there now. You can use "ActivateNotepad" to activate a notepad, knowing its title. The title is based on the trigger label.
You can use "Activate" to activate the world window.
You can use "GetWorld" to find a world by name. Thus, to activate a particular world you could do something like this:
sub ActivateWorld (name)
dim otherworld
set otherworld = world.getworld (name)
if otherworld is nothing then
world.note "World " + name + " is not open"
exit sub
end if
otherworld.activate
end sub
|
- Nick Gammon
www.gammon.com.au, www.mushclient.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.
14,713 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top