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

Notification

Icon
Error

Options
Go to last post Go to first unread
soooulp  
#1 Posted : Tuesday, February 8, 2022 2:28:29 PM(UTC)
soooulp

Rank: Advanced Member

Reputation:

Groups: Moderators, Approved
Joined: 4/23/2020(UTC)
Posts: 161
China

Thanks: 46 times
Was thanked: 23 time(s) in 17 post(s)
It will popup a Showbox near the mouse to preview the selected picture like PNG, JPG, BMP, GIF on the Explorer or Desktop.

There is no border, and you can drag to move, scroll to zoom in/out, and it will auto close when you click the left button at the blank area or double left click the image Showbox.

Then auto previews the next picture if you select another one.

There are two versions.
The first Updated one keeps the focus on the Explorer of the selected picture, and you can copy, cut or rename it for free, also it will show the Max Width 450 of the picture in the Showbox and within the screen.
The second Old one uses the LostFocus method to the Showbox to close it, and there are some inconveniences.

Update:
1. Fix the Showbox will not auto close when without selecting on the Desktop.
2. Fix drag the Showbox will auto close.

Put one of the two versions code into Global Actions-Load/Unload

UserPostedImage

1. Updated



2. Old

Edited by user Sunday, March 6, 2022 7:34:57 AM(UTC)  | Reason: Not specified

thanks 3 users thanked soooulp for this useful post.
Rob on 2/8/2022(UTC), randomConstant on 2/9/2022(UTC), Ola Boga on 3/2/2022(UTC)
randomConstant  
#2 Posted : Wednesday, February 9, 2022 12:51:45 PM(UTC)
randomConstant

Rank: Advanced Member

Reputation:

Groups: Translators, Approved
Joined: 7/17/2021(UTC)
Posts: 135

Thanks: 35 times
Was thanked: 18 time(s) in 15 post(s)
Thanks a lot for the script soooulp Laugh

I have seen some of your other scripts using timers such as this one and Cross the mouse to four bounds of the screen and also A script close to WinXcorners program. All of these are great scripts but I hesitate while using them because they use timers which fire off frequently, like every 1/10th of a second.

I am currently using a 5 second timer on Windows Laptop Charging Level Alert script which makes S+ take about 0.1% of my CPU resource every 4 to 5 seconds.

When I use this script, S+ is almost always using 0.1% to 0.3% of my CPU.
When I use this script and WinXcorners script, S+ is almost always using 0.3% to 0.5% of my CPU.
When I use this script, WinXcorners script and also Cross Monitor Bounds script, S+ is almost always using 0.6% to 0.8% of my CPU.

The actual usage is small and ignorable but since the timer is getting fired frequently I get worried about battery drainage being faster using such timers.

I would appreciate if someone can clarify the impact of these frequent checker-type timers on performance of a machine. I've noticed sometimes I get a runtime error when I run a shortcut and a timer was just about to run, so maybe running multiple timers can cause process scheduling issues and deadlocks? I'm not sure.

These scripts are really handy and I'd like to use them but hesitant because of resource usage.

Again, very nice and handy scripts, Thanks
soooulp  
#3 Posted : Wednesday, February 9, 2022 1:27:26 PM(UTC)
soooulp

Rank: Advanced Member

Reputation:

Groups: Moderators, Approved
Joined: 4/23/2020(UTC)
Posts: 161
China

Thanks: 46 times
Was thanked: 23 time(s) in 17 post(s)
Originally Posted by: randomConstant Go to Quoted Post
The actual usage is small and ignorable but since the timer is getting fired frequently I get worried about battery drainage being faster using such timers.


Aha, it is really a problem for the growing use of CPU and RAM, and these functions are mostly based on other programs that even use less CPU and RAM and I don't know whether they monitor the window or the mouse change.

It is not serious and worth attention for 8% of the CPU and 100M RAM(total 8G) of my Macbook Air for me, because I don't need to do the high-performance work instead of avoiding computer freezes, but it will be nice if there is a way to improve it.

As for the script, there is a not fundamental way but to put them all in a Timer and need to consider the different timers.

randomConstant  
#4 Posted : Wednesday, February 9, 2022 1:31:17 PM(UTC)
randomConstant

Rank: Advanced Member

Reputation:

Groups: Translators, Approved
Joined: 7/17/2021(UTC)
Posts: 135

Thanks: 35 times
Was thanked: 18 time(s) in 15 post(s)
True, even the 0.8% CPU usage is not that big of a deal considering some miscellaneous services such as corsair headphones service uses 0.2% of CPU all the time.

And yes, we could theoretically put all timer required tasks in a single timer and adjust the steps of execution in that timer.

Still I thought it would be great to know how much (or how far) we can take S+ performance wise. Laugh

randomConstant  
#5 Posted : Wednesday, February 9, 2022 1:37:42 PM(UTC)
randomConstant

Rank: Advanced Member

Reputation:

Groups: Translators, Approved
Joined: 7/17/2021(UTC)
Posts: 135

Thanks: 35 times
Was thanked: 18 time(s) in 15 post(s)
Wait, did you say 8%? Blink

So S+ is constantly using almost 8% of your CPU? I'm no expert and have never used Macbook Air but even browsers use less than 8% CPU on my laptop. Intel Core i5 10300H @2.5GHz
soooulp  
#6 Posted : Wednesday, February 9, 2022 1:40:49 PM(UTC)
soooulp

Rank: Advanced Member

Reputation:

Groups: Moderators, Approved
Joined: 4/23/2020(UTC)
Posts: 161
China

Thanks: 46 times
Was thanked: 23 time(s) in 17 post(s)
Originally Posted by: randomConstant Go to Quoted Post
Still I thought it would be great to know how much (or how far) we can take S+ performance wise. Laugh



Hmmm, I just take a look at the scripts in my S+ Load/Unload, and there are almost 10 scripts.

Recognize the input method, the Capslock or Escape key down, Auto launch the program at 8 am, Mouse corners and cross the screen, Restrict the mouse at the point, Preview the selected picture, Auto resize the explorer window, etc.
randomConstant  
#7 Posted : Wednesday, February 9, 2022 1:46:39 PM(UTC)
randomConstant

Rank: Advanced Member

Reputation:

Groups: Translators, Approved
Joined: 7/17/2021(UTC)
Posts: 135

Thanks: 35 times
Was thanked: 18 time(s) in 15 post(s)
I think some of these scripts you mentioned such as Restrict the mouse at the point are function definitions and not timers(time based). Correct me if I'm wrong please.

and I also have a lot of functions defined in Load/Unload section to save redundancy in overall S+ usage. (I can just call the function in my scripts later on instead of writing them again)

But these function definitions do not really make S+ use more resources as far as I know, S+ knows about the existence of such functions and it only uses resources for them when we call them later in our code. (Timers are a different story and they fire off frequently)
soooulp  
#8 Posted : Wednesday, February 9, 2022 1:53:50 PM(UTC)
soooulp

Rank: Advanced Member

Reputation:

Groups: Moderators, Approved
Joined: 4/23/2020(UTC)
Posts: 161
China

Thanks: 46 times
Was thanked: 23 time(s) in 17 post(s)
I try to close the Load/Unload, and the CPU of S+ is 0.3%.

Restrict the mouse at the point is used for the mouse that doesn't move in 30s then auto restricts it to avoid it moving to the corner by mistake, even I rarely use the mouse and instead by the touchpad to run the shortcuts from the S+.
randomConstant  
#9 Posted : Wednesday, February 9, 2022 1:55:46 PM(UTC)
randomConstant

Rank: Advanced Member

Reputation:

Groups: Translators, Approved
Joined: 7/17/2021(UTC)
Posts: 135

Thanks: 35 times
Was thanked: 18 time(s) in 15 post(s)
Oh I see, makes sense, nice Laugh
Users browsing this topic
Guest
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.