StrokesPlus.net
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
2014218866  
#1 Posted : Sunday, June 23, 2019 5:31:40 AM(UTC)
2014218866

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 5/6/2019(UTC)
Posts: 50
China

Thanks: 9 times
Dear Rob,
when I switch from the current window to the minimized window by "sp. LastApplication", the minimized window cannot be displayed.
If it is not a Bug, when I switch to the minimized window, can you use some scripts to help me display the minimized window?
Thank you.
Rob  
#2 Posted : Sunday, June 23, 2019 8:38:35 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 401
United States

Thanks: 5 times
Was thanked: 78 time(s) in 68 post(s)
This is a bug, kind of...

I had logic in there to exclude non-minimized windows for which the window's rectangle was empty. However, this had the unintended consequence of also excluding all minimized windows.

I've removed the minimized part of that condition for the next release, I'm going to release that soon.
Rob  
#3 Posted : Sunday, June 23, 2019 8:45:34 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 401
United States

Thanks: 5 times
Was thanked: 78 time(s) in 68 post(s)
However: Windows moves minimized windows toward the bottom of the window stack, so sp.LastApplication() still doesn't behave as you'd expect.

This function ultimately calls sp.AllWindows() internally, which just asks Windows for all of the application windows in their current Z-Order, and since minimized windows are pushed down toward the bottom of the stack, it doesn't activate the actual last window, rather only the next window below the current window in the window stack.

You'd probably be better suited to use Alt+Tab instead, at least for now.

Code:
sp.SendModifiedVKeys([vk.LMENU], [vk.TAB]);

I'm going to look at LastApplication some more to see if there's a way I can have that function behave as you would expect. But I'm still leaving the fix for AllWindows() in place as I don't feel it should be excluding minimized windows.
Rob  
#4 Posted : Sunday, June 23, 2019 9:29:39 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 401
United States

Thanks: 5 times
Was thanked: 78 time(s) in 68 post(s)
Okay, in 0.3.1.6 sp.LastApplication() will behave as you would expect, with some caveats.

See the Change Log for details.
2014218866  
#5 Posted : Sunday, June 23, 2019 9:56:06 PM(UTC)
2014218866

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 5/6/2019(UTC)
Posts: 50
China

Thanks: 9 times

Dear Rob,

thank you for your improvement. Is “sp.LastApplication()” replaced by “sp.LastApplication(true)” ? No other operation required?
If so, it has a problem at present. When you open more than three programs, then minimize one of them and execute the script (sp.LastApplication(true)”),
it will ignore the minimized window and switch to another program.
Rob  
#6 Posted : Sunday, June 23, 2019 10:39:20 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 401
United States

Thanks: 5 times
Was thanked: 78 time(s) in 68 post(s)
No, sp.LastApplication(true) is to use it the OLD way (to provide a fallback method if someone didn't like the change).

Just call it as sp.LastApplication().

Or you can pass false (instead of true), which is the default.
2014218866  
#7 Posted : Monday, June 24, 2019 4:15:32 AM(UTC)
2014218866

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 5/6/2019(UTC)
Posts: 50
China

Thanks: 9 times
Hi, Rob,
Hmm... For example, after opening a new folder, it can not switch to the previous window, but the old version does not have this problem.
Another problem is that sometimes you need to click on the window you want to switch with your mouse (similar to activating the window),
and then it can switch between the two windows.


UserPostedImage
Rob  
#8 Posted : Monday, June 24, 2019 11:41:42 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 401
United States

Thanks: 5 times
Was thanked: 78 time(s) in 68 post(s)
Yeah, this is why I only had it working with the established EnumWindows API call...trying to keep track of things like this is very complicated and full of exceptions.

I think I'm going to roll back this change as it's simply prone to problems.

I should probably change the name of LastApplication and NextApplication to indicate they just return the next window below in the window stack; maybe ApplicationAbove() and ApplicationBelow(), I don't know yet I will have to think about this some more.

Sending Alt+Tab is the most reliable method and will work across all versions of Windows.
2014218866  
#9 Posted : Tuesday, June 25, 2019 4:01:30 AM(UTC)
2014218866

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 5/6/2019(UTC)
Posts: 50
China

Thanks: 9 times
Thank you for bringing us different experiences, Rob.
By the way, I would like to make a suggestion about hotkeys.
When using S+, hotkeys are always prompted to be registered, and we need to click to confirm the end of the prompt.
Whether it can automatically close the bullet window after each prompt, or only when it is first used, the prompt will never appear again.
Because it's really troublesome to click to confirm the cancellation prompt every time.
Rob  
#10 Posted : Tuesday, June 25, 2019 5:54:52 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 401
United States

Thanks: 5 times
Was thanked: 78 time(s) in 68 post(s)
Quote:
When using S+, hotkeys are always prompted to be registered, and we need to click to confirm the end of the prompt.


I do not know what you're referring to here, I don't receive these prompts. What is prompting you? Is it a StrokesPlus.net prompt? Windows? Something else?
2014218866  
#11 Posted : Tuesday, June 25, 2019 7:50:03 AM(UTC)
2014218866

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 5/6/2019(UTC)
Posts: 50
China

Thanks: 9 times
Almost all the hotkeys that I can think of are occupied by other software. So there's always this prompt. Whenever it comes up, I'll Click to make sure to close the window. So I suggest that the window should appear only the first time it's used, and then it won't be prompted again. Or it can automatically close the prompt after staying for a few seconds. Of course, this is just an experience that affects S + and it doesn't matter.

UserPostedImage
Rob  
#12 Posted : Tuesday, June 25, 2019 9:29:14 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 401
United States

Thanks: 5 times
Was thanked: 78 time(s) in 68 post(s)
Okay, I see what you mean.

Hmm, that's a difficult one.

On one had, I can see how this could be annoying.
But on the other, I want to make sure it's very clear that the user knows very clearly that S+ isn't having a "problem" with hotkeys not working, that another program is the culprit.

That message comes from the single place where hotkeys are registered, so it's a global message. Meaning, there isn't separate logic just in the Settings screen or something. So I would need to carefully consider how this is handled. Plus, someone could perform an import of settings or download synchronized settings, etc. There are a lot of ways this message could appear which all need to be considered.

I will think about this some. So is the main issue when you're trying to setup hotkeys with the Settings window open?
I could see perhaps having a check for that and maybe displaying something in the Settings window (not a popup messagebox), otherwise it will show like it does now.
Rob  
#13 Posted : Tuesday, June 25, 2019 10:53:28 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 401
United States

Thanks: 5 times
Was thanked: 78 time(s) in 68 post(s)
In 0.3.1.7 I changed it to a balloon/toast window if the tray icon is visible, as that's a requirement to be able to show one of those types of notifications.

So except for when S+ is starting or if you're toggled the tray icon off, you will see a notification instead of a popup message.
2014218866  
#14 Posted : Tuesday, June 25, 2019 9:34:49 PM(UTC)
2014218866

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 5/6/2019(UTC)
Posts: 50
China

Thanks: 9 times
Rob, thank you very much. S + has become more perfect
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.