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

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
zzm  
#1 Posted : Monday, May 6, 2019 2:24:40 AM(UTC)
zzm

Rank: Member

Reputation:

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

Thanks: 6 times
Is it possible to achieve what is shown below?
If so, how can it be modified?


UserPostedImage


Thank you very much and apologize for my poor English!

Edited by user Monday, May 6, 2019 12:28:18 PM(UTC)  | Reason: Not specified

Rob  
#2 Posted : Monday, May 6, 2019 7:16:43 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
What is this screenshot from? Is this another program? What exactly is it doing, detecting text from the image?
zzm  
#3 Posted : Tuesday, May 7, 2019 1:38:33 AM(UTC)
zzm

Rank: Member

Reputation:

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

Thanks: 6 times
This is another program,the name is mouseInc.
https://shuax.com/project/mouseinc/

Just like default script Snip Screen Area,Copies the area within the square gesture area to the clipboard.
The program mouseInc display area within the square gesture area on the screen.

How to modify the script(Snip Screen Area) to display the area on the screen?

Thanks a lot!

Edited by user Tuesday, May 7, 2019 1:41:49 AM(UTC)  | Reason: Not specified

Rob  
#4 Posted : Wednesday, May 8, 2019 12:51:44 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
I will have to take a look at that, but it's not simple with what S+.net has built in. To display something on the screen requires a window, and the only windows in S+.net are used for other purposes.

A plug-in could likely accomplish this, but would require some development.
zzm  
#5 Posted : Wednesday, May 8, 2019 2:07:32 AM(UTC)
zzm

Rank: Member

Reputation:

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

Thanks: 6 times
Thank you. I look forward to it
Rob  
#6 Posted : Monday, May 27, 2019 2:18:40 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
Added a simple display image form in version 0.3.0.5.

Add this to the bottom of the Snip Screen Area script:

Code:
sp.DisplayImage(clip.GetImage());


Note that I'm having it use the image from the clipboard as that is safer, since the snip script disposes the memoryImage object, which will lead to a crash (handled in code, but no image will appear since it no longer exists).

Click and hold to drag the window around, double-click or press Escape to close the window.

This does not have any OCR (optical character recognition) to read the text inside the image like mouseInc does. Maybe someday I will make an OCR plug-in....
thanks 1 user thanked Rob for this useful post.
zzm on 6/16/2019(UTC)
zzm  
#7 Posted : Monday, May 27, 2019 3:10:21 PM(UTC)
zzm

Rank: Member

Reputation:

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

Thanks: 6 times
I am very glad to receive the update.
Thank you for your selfless dedication,Rob!
Rob  
#8 Posted : Tuesday, May 28, 2019 12:48:07 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
I've used this several times just today! It was something I didn't know that I needed :)
zyxi  
#9 Posted : Tuesday, May 28, 2019 10:36:56 AM(UTC)
zyxi

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 3/30/2019(UTC)
Posts: 74
China

Thanks: 8 times
Was thanked: 1 time(s) in 1 post(s)
Hello, Rob, if you want to make an OCR plug-in, you can refer to this software, it is a very good software.
Links are as follows:

https://github.com/AnyListen/tianruoocr/releases

https://github.com/AnyListen/tianruoocr


I hope this suggestion will help you.
2014218866  
#10 Posted : Friday, April 17, 2020 1:11:31 PM(UTC)
2014218866

Rank: Advanced Member

Reputation:

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

Thanks: 19 times
Was thanked: 1 time(s) in 1 post(s)
Can S + change the size of the window where the picture is located. For example, you can adjust the size of the picture by dragging the bottom right of the picture with the left mouse button? It is expected that S + can adjust the size of the picture instead of the size of the pasted picture.Love
liuxilu  
#11 Posted : Saturday, April 18, 2020 6:52:20 AM(UTC)
liuxilu

Rank: Advanced Member

Reputation:

Groups: Translators, Moderators, Approved
Joined: 4/6/2020(UTC)
Posts: 79
China

Thanks: 1 times
Was thanked: 21 time(s) in 21 post(s)
A temporary solution. It will stuck a script engine until you close it.
Code:
function ShowImage(img, pt) {
    if (img == null) return;

    var HD = sp.GetSystemMetricsByIndex(5) + sp.GetSystemMetricsByIndex(32);
    HD *= 4; HD += sp.GetSystemMetricsByIndex(4);
    var WD = sp.GetSystemMetricsByIndex(6) + sp.GetSystemMetricsByIndex(33);
    WD *= 4;

    var form = new forms.System.Windows.Forms.Form;
    form.StartPosition = forms.System.Windows.Forms.FormStartPosition.Manual;
    form.FormBorderStyle = forms.System.Windows.Forms.FormBorderStyle.SizableToolWindow;
    form.TopMost = true;
    form.ShowInTaskbar = false;
    form.Location = pt;
    form.Width = img.Width + WD;
    form.Height = img.Height + HD;

    var pic = new forms.System.Windows.Forms.PictureBox;
    pic.SizeMode = forms.System.Windows.Forms.PictureBoxSizeMode.Zoom;
    pic.Image = img;
    pic.Width = img.Width;
    pic.Height = img.Height;

    var c1 = form.Resize.connect(function (sender, args) {
        pic.Width = form.Width - WD;
        pic.Height = form.Height - HD;
    });

    form.Controls.Add(pic);
    form.ShowDialog();
 
    c1.disconnect();
}

Example:
Code:
ShowImage(clip.GetImage(), action.End);
2014218866  
#12 Posted : Sunday, April 26, 2020 2:45:31 PM(UTC)
2014218866

Rank: Advanced Member

Reputation:

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

Thanks: 19 times
Was thanked: 1 time(s) in 1 post(s)
Yes, it's great, but how do you save the resized picture after double-clicking with the left mouse button or pressing ESC to close the screenshot?
Thank you very much,liuxilu
liuxilu  
#13 Posted : Monday, April 27, 2020 10:33:01 AM(UTC)
liuxilu

Rank: Advanced Member

Reputation:

Groups: Translators, Moderators, Approved
Joined: 4/6/2020(UTC)
Posts: 79
China

Thanks: 1 times
Was thanked: 21 time(s) in 21 post(s)
var c2 = pic.DoubleClick.connect(function (sender, args) { pic.Image.Save('z:\\test.jpg'); } );
c2.disconnect();
2014218866  
#14 Posted : Monday, April 27, 2020 12:03:25 PM(UTC)
2014218866

Rank: Advanced Member

Reputation:

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

Thanks: 19 times
Was thanked: 1 time(s) in 1 post(s)
Although this is not what I expected, thank you very much. The picture below is the effect I really want.
I hope that S + will realize this function in the future, or maybe this function will never appear.
UserPostedImage
liuxilu  
#15 Posted : Monday, April 27, 2020 12:34:35 PM(UTC)
liuxilu

Rank: Advanced Member

Reputation:

Groups: Translators, Moderators, Approved
Joined: 4/6/2020(UTC)
Posts: 79
China

Thanks: 1 times
Was thanked: 21 time(s) in 21 post(s)
哦,你是要按比例缩放啊,你讲清楚啊……
2014218866  
#16 Posted : Monday, April 27, 2020 12:53:38 PM(UTC)
2014218866

Rank: Advanced Member

Reputation:

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

Thanks: 19 times
Was thanked: 1 time(s) in 1 post(s)
Sorry...
This function is similar to the function of snipaste.exe
https://www.snipaste.com/index.html
liuxilu  
#17 Posted : Monday, April 27, 2020 12:57:11 PM(UTC)
liuxilu

Rank: Advanced Member

Reputation:

Groups: Translators, Moderators, Approved
Joined: 4/6/2020(UTC)
Posts: 79
China

Thanks: 1 times
Was thanked: 21 time(s) in 21 post(s)
var c1 = form.ResizeEnd.connect(function (sender, args) {
var scale = (form.Width - WD) / pic.Width;
pic.Height =parseInt(pic.Height * scale);
pic.Width = parseInt(pic.Width * scale);
form.Width = pic.Width + WD;
form.Height = pic.Height + HD;
});
thanks 1 user thanked liuxilu for this useful post.
2014218866 on 4/27/2020(UTC)
liuxilu  
#18 Posted : Monday, April 27, 2020 12:59:12 PM(UTC)
liuxilu

Rank: Advanced Member

Reputation:

Groups: Translators, Moderators, Approved
Joined: 4/6/2020(UTC)
Posts: 79
China

Thanks: 1 times
Was thanked: 21 time(s) in 21 post(s)
对了,你可以搜索一下 .Net 截图的 dll,作 S+ 插件用
2014218866  
#19 Posted : Monday, April 27, 2020 1:02:32 PM(UTC)
2014218866

Rank: Advanced Member

Reputation:

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

Thanks: 19 times
Was thanked: 1 time(s) in 1 post(s)
我倒是想要找一个那样的插件,无奈小白一个,却总要用的贴图功能,非常感谢
liuxilu  
#20 Posted : Monday, April 27, 2020 1:06:02 PM(UTC)
liuxilu

Rank: Advanced Member

Reputation:

Groups: Translators, Moderators, Approved
Joined: 4/6/2020(UTC)
Posts: 79
China

Thanks: 1 times
Was thanked: 21 time(s) in 21 post(s)
终于讲中文了😂😂😂
2014218866  
#21 Posted : Monday, April 27, 2020 1:07:51 PM(UTC)
2014218866

Rank: Advanced Member

Reputation:

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

Thanks: 19 times
Was thanked: 1 time(s) in 1 post(s)
讲中文,不易于后面的小白(国外)使用搜索功能
liuxilu  
#22 Posted : Monday, April 27, 2020 1:11:08 PM(UTC)
liuxilu

Rank: Advanced Member

Reputation:

Groups: Translators, Moderators, Approved
Joined: 4/6/2020(UTC)
Posts: 79
China

Thanks: 1 times
Was thanked: 21 time(s) in 21 post(s)
好吧,那你可以双语,这样能更好表达,也能让人用英语搜索到
2014218866  
#23 Posted : Monday, April 27, 2020 1:12:46 PM(UTC)
2014218866

Rank: Advanced Member

Reputation:

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

Thanks: 19 times
Was thanked: 1 time(s) in 1 post(s)
话说,这个双击关闭加在脚本哪个位置呢,总提示报错
liuxilu  
#24 Posted : Monday, April 27, 2020 1:27:09 PM(UTC)
liuxilu

Rank: Advanced Member

Reputation:

Groups: Translators, Moderators, Approved
Joined: 4/6/2020(UTC)
Posts: 79
China

Thanks: 1 times
Was thanked: 21 time(s) in 21 post(s)
按叉关闭就是了
2014218866  
#25 Posted : Monday, April 27, 2020 1:29:49 PM(UTC)
2014218866

Rank: Advanced Member

Reputation:

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

Thanks: 19 times
Was thanked: 1 time(s) in 1 post(s)
好的,看来双击是实现不了了,还有就是左键点击贴图后拖拽移动容易实现么?
lyscop  
#26 Posted : Thursday, April 30, 2020 7:11:13 AM(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: liuxilu# Go to Quoted Post
按叉关闭就是了


大佬,有好用的OCR手势脚本么
zyxi  
#27 Posted : Friday, May 1, 2020 7:47:11 AM(UTC)
zyxi

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 3/30/2019(UTC)
Posts: 74
China

Thanks: 8 times
Was thanked: 1 time(s) in 1 post(s)
I stumbled upon an OCR dll, here I leave it to anyone who needs it.
But it needs to be used online, because it uses Baidu's character recognition.LOL
https://sendit.cloud/ih92veiv9w8q
Jack Ma  
#28 Posted : Saturday, February 13, 2021 1:03:28 AM(UTC)
Jack Ma

Rank: Member

Reputation:

Groups: Approved
Joined: 11/22/2020(UTC)
Posts: 7
China

Was thanked: 7 time(s) in 2 post(s)
Rob  
#29 Posted : Saturday, February 13, 2021 2:36:18 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
I also made an OCR plug-in, not to take away from Jack Ma's script which is great! Just to have it linked here as well for people to see.

https://forum.strokesplus.net/posts/t8294findunread-Tesseract--OCR--Plug-In
Junt62  
#30 Posted : Thursday, February 18, 2021 10:18:59 AM(UTC)
Junt62

Rank: Newbie

Reputation:

Groups: Approved
Joined: 1/5/2021(UTC)
Posts: 2

Thanks: 1 times
哈哈哈哈哈哈,笑死了,一群中国人一起讲英文。不过在国外论坛也实属正常,这个论坛的英文字真的好小一个个看的眼睛疼。。。。

Hahahahahaha, laughed to death, a group of Chinese spoke English together. However, it is normal in foreign forums. The English words in this forum are really small, and the eyes hurt each and every one of them. . . .

----From google translation
soooulp  
#31 Posted : Wednesday, February 16, 2022 3:08:33 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: Rob Go to Quoted Post
Added a simple display image form in version 0.3.0.5.

Add this to the bottom of the Snip Screen Area script:

Code:
sp.DisplayImage(clip.GetImage());




Hi, Rob, May I have a question about sp.DisplayImage?

It is more amazing than using Winform to show words, pictures, as I post here, it will show more snip pictures on the screen instead of changing the number of the Max Script Pool Size.

And last week, I use Winform to preview the selected picture on the desktop here, then I find the selected picture in the Explorer will lose focus, but sp.DisplayImage will not.

I guess sp.DisplayImage is not using Winform to show.

I need to resize the Max Width of the picture in the Showbox to 500 and set the location near the mouse and no border of the Showbox in Winform and so on instead of sp.DisplayImage, and also I probably need to define the Handle of the Showbox, so how can I use the customized function to show the picture and not lose the Explorer focus?

soooulp  
#32 Posted : Wednesday, February 16, 2022 7:45:05 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 find form.ShowDialog() that can't show the Showbox on top, and still lose focus to the Explorer.

Maybe this API can achieve it, and I do some try, am I right?
https://docs.microsoft.c...er/nf-winuser-showwindow

Set this in Load/Unload
Code:
if(!NativeModules.User32)
{
    var IntPtrT = host.typeOf(clr.System.IntPtr);
    var Int32T = host.typeOf(clr.System.Int32);
    var BooleanT = host.typeOf(clr.System.Boolean);

    //--------------------------------------------------------------------
    // Define the type which will contain the PInvokes
    // Type can still be modified until .Create() is called
    //--------------------------------------------------------------------
	
    var user32TB = sp.NativeModule().DefineType("User32", "Class,Public,SequentialLayout,Serializable");
	
	// Define PInvoke method for GetDpiForWindow (Windows 10 1607 or greater)
	
	user32TB.DefinePInvokeMethod("ShowWindow",
								 "user32.dll",
								 [IntPtrT,Int32T], 
								 BooleanT, 
								 "PreserveSig");	

    //--------------------------------------------------------------------
    // Creates the type (which cannot be changed after) and refreshes the 
    // NativeModules assembly in the script engine
    //--------------------------------------------------------------------
	user32TB.Create();
}


Then do an action
Code:
var SW_SHOWNOACTIVATE = 4;
var ShowNA = sp.GetSystemMetricsByIndex(SW_SHOWNOACTIVATE);
NativeModules.User32.ShowWindow(form.Handle, ShowNA);






Rob  
#33 Posted : Thursday, February 17, 2022 2:07:46 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
These overrides are what the S+ gesture drawing and hint forms use in their classes (along with TopMost) to not activate - I'm guessing you want to do something like that.

But I'm not exactly sure at the moment how to create those overrides in script. It would be easy to do in a plugin, though.
Code:
protected override bool ShowWithoutActivation
{
	get { return true; }
}

protected override CreateParams CreateParams
{
	get
	{
		var cp = base.CreateParams;
		cp.Style |= unchecked((int)0x80000000);    // WS_POPUP
		cp.ExStyle |= (  0x00000080                // WS_EX_TOOLWINDOW
					   | 0x08000000                // WS_EX_NOACTIVATE
					   | 0x00000020                // WS_EX_TRANSPARENT
					  );
		return cp;
	}
}
soooulp  
#34 Posted : Thursday, February 17, 2022 3:47:21 AM(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)
Yes, I found it in Stackoverflow as well, and it is a pity that can't be used directly in Script.

It seems that ShowWindow, SetWindowPos, SetForegroundWindow don't work in S+.

Code:
     ShowWindow(frm.Handle, SW_SHOWNOACTIVATE);
     SetWindowPos(frm.Handle.ToInt32(), HWND_TOPMOST,
     frm.Left, frm.Top, frm.Width, frm.Height,
     SWP_NOACTIVATE);
soooulp  
#35 Posted : Thursday, February 17, 2022 3:58:30 AM(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 am trying to make this show function as a DLL plug-in.
Rob  
#36 Posted : Thursday, February 17, 2022 10:34:51 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
Make sure to select .Net Framework Class Library - .Net Framework version 4.8.
soooulp  
#37 Posted : Thursday, February 17, 2022 1:13:15 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)
Thank you, Rob.

I find this can work instead of overriding the ShowWithoutActivation function to show the Winform also focus the Explorer.

UserPostedImage

Code:
var HWND_TOPMOST = -1;
var SWP_NOACTIVATE = 0x0010;
var SW_SHOWNOACTIVATE = 4;

NativeModules.User32.ShowWindow(form.Handle, SW_SHOWNOACTIVATE);
NativeModules.User32.SetWindowPos(form.Handle, HWND_TOPMOST,form.Left, form.Top, form.Width, form.Height,SWP_NOACTIVATE);
form.TopMost = false;
soooulp  
#38 Posted : Monday, March 21, 2022 1:11:10 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: Rob Go to Quoted Post
Make sure to select .Net Framework Class Library - .Net Framework version 4.8.


There is a problem about refresh the RAM of S+. No matter use 9#Liuxiu' post code or sp.DispplayImage to display the screen snap as well as preview the selected image.

After I double click to close the shown image on the screen, the RAM will stay increased by some of the screen snap.

Based on Liuxiu's code, I use this to refresh the memory, but there is no result about the RAM. The RAM will decrease only if I reload the S+.

So, is there a better way to recover the RAM of S+ after closing the displayed image?

Code:
if(!NativeModules.Kernel32)
{    

    var kernel32TB = sp.NativeModule().DefineType("Kernel32", "Class,Public,SequentialLayout,Serializable");

    var IntPtrT = host.typeOf(clr.System.IntPtr);
    var Int32T = host.typeOf(clr.System.Int32);
    var BooleanT = host.typeOf(clr.System.Boolean);
    kernel32TB.DefinePInvokeMethod("SetProcessWorkingSetSize",
								 "kernel32.dll",
								 [IntPtrT,Int32T,Int32T], 
								 BooleanT, 
								 "PreserveSig");
	kernel32TB.Create();
}


On double click function
Code:
                FlushMemory();
                function FlushMemory()
                {
                    System.GC.Collect();
                    System.GC.WaitForPendingFinalizers();
                    if (System.Environment.OSVersion.Platform == System.PlatformID.Win32NT)
                        NativeModules.Kernel32.SetProcessWorkingSetSize(sp.WindowFromPoint(currentMouseLocation, true).HWnd, -1, -1);
                } 


I find this post on Stackoverflow, and I don't know whether it will help.

Code:
 protected override void Dispose(bool disposing) {
    if (disposing && (components != null)) {
       components.Dispose();

       // Release managed resources
       Logger.Verbose("Disposing SettingForm");
       mySetting.Dispose();
       testFtp.Dispose();
    }

    base.Dispose(disposing);
 }

Edited by user Monday, March 21, 2022 1:27:07 PM(UTC)  | Reason: Not specified

Rob  
#39 Posted : Monday, March 21, 2022 1:24:14 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
Quote:
So, is there a better way to cover the RAM of S+ after closing the displayed image?

Try adding this line above c1.disconnect(); in Liuxiu code:
Code:
img.Dispose();
c1.disconnect();

Let me know if you notice any difference.

Also, SetProcessWorkingSetSize just forces Windows to page out as much process RAM as possible, but it doesn't change anything about the usage, just pushes it to virtual memory. Which then causes it to be pulled back from disk when something needs it - so it can make it look like it's using less, but is worse for actual performance.
soooulp  
#40 Posted : Monday, March 21, 2022 2:22: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: Rob Go to Quoted Post
Let me know if you notice any difference.


It seems RAM still keeps increasing.

I add this after the image shows ether Preview the selected picture or Snip screen area

Now, I temporarily use the memreduct program instead to auto clear the whole computer RAM.

And also, there is another strange thing, the pic_doubleClick event will not work if I set the Mouse Events - Left Click as Enable.

Code:
Forms.Application.Run(form);
img.Dispose();


Code:
var pic_doubleClick = 
pic.DoubleClick.connect(
    function (sender, args) {
    form.Close();  
    form.Dispose();
    pic.Dispose();
});

Edited by user Tuesday, March 22, 2022 4:22:01 AM(UTC)  | Reason: Not specified

Users browsing this topic
2 Pages12>
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.