StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Register | Active Topics
Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Lua Scripts
 General Action Scripts
 Snapshot of an area
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Gauchero

2 Posts

Posted - 02/14/2019 :  05:19:05  Show Profile  Reply with Quote
Hi there
I'would have an similary function of the Snip Screen Area action of https://www.strokesplus.net/. The code is there:

quote:
// Copies the area within the square gesture area to the clipboard, like a screenshot

//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();
memoryImage.Dispose();


i figured out:
// -> --
sp.Sleep(100); -> acDelay(100)

but need help by the memory and clipping part. Anybody can help me?
Thanks in advanced and kind regards

Rob

USA
2573 Posts

Posted - 02/14/2019 :  08:03:23  Show Profile  Visit Rob's Homepage  Reply with Quote
Those are .net framework classes/functions which S+ is not exposed to. I don't think there's any way to accomplish this S+.net functionality in S+, unfortunately.
Go to Top of Page

Gauchero

2 Posts

Posted - 02/14/2019 :  08:44:57  Show Profile  Reply with Quote
Hi Rob
Thanks for your the information. I'll find a workaround then, or do it like till now with snagit.. :-D
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000