Rank: Member
Groups: Approved
Joined: 2/8/2022(UTC) Posts: 18 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?
|
|
|
|
Rank: Member
Groups: Approved
Joined: 2/8/2022(UTC) Posts: 18 Location: calarasi Thanks: 2 times
|
|
|
|
|
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.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close