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

Notification

Icon
Error

Options
Go to last post Go to first unread
mesersmith  
#1 Posted : Monday, November 7, 2022 9:01:38 AM(UTC)
mesersmith

Rank: Member

Reputation:

Groups: Approved
Joined: 2/8/2022(UTC)
Posts: 18
Romania
Location: calarasi

Thanks: 2 times
You have this code:

// Copies the area within the square gesture area to the clipboard, like a screenshot
// This is a complex action which cannot be reasonably accomplished in Steps

//Delay to ensure S+ has cleared the gesture and hint
sp.Sleep(100);
//Create a new Bitmap in memory
var memoryImage = new drawing.System.Drawing.Bitmap(action.Bounds.Width, action.Bounds.Height);
//Create a graphics object associated with the bitmap
var memoryGraphics = drawing.System.Drawing.Graphics.FromImage(memoryImage);
//Copy the screen within the bounding rectangle of the drawn gesture area
//I used a square gesture since that seems more intuitive, but it's not neccessary
memoryGraphics.CopyFromScreen(action.Bounds.X, action.Bounds.Y, 0, 0, action.Bounds.Size);
//Copy the image to the clipboard
clip.SetImage(memoryImage);
memoryGraphics.Dispose();

//If you plan to use this image, for example via sp.DisplayImage, do not dispose
//the object - comment/remove the line below - however, note that can lead to
//memory leaks - though the garbage collector should eventually finalize and dispose
memoryImage.Dispose();


Is possible to put some code in here to save that image in a folder?
Now I use a software to do this image snipet and it saves the image capture to documents in a folder named Print screen.
If I mae 10 gesture P(wich is assigned to do prints screen, it saves 10 images in that folder.
Is hard to do this?
mesersmith  
#2 Posted : Monday, November 7, 2022 1:41:54 PM(UTC)
mesersmith

Rank: Member

Reputation:

Groups: Approved
Joined: 2/8/2022(UTC)
Posts: 18
Romania
Location: calarasi

Thanks: 2 times
I did it like here: https://forum.strokesplu...-displayed-on-the-screen
Image appear, right click and save.
Users browsing this topic
Similar Topics
Snip screen area by Win10 default Snipping Tool based on Enhanced sp.ShowImage (Scripts)
by soooulp 5/6/2021 1:38:53 PM(UTC)
A script to snip screen area and use Baidu OCR API to recognize the text (Scripts)
by Jack Ma 2/12/2021 3:37:27 PM(UTC)
Snip Screen Area and displayed on the screen (Scripts)
by zzm 5/6/2019 2:24:40 AM(UTC)
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.