Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Thu Jun 12, 2025 10:08 pm

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Save a screenshot Plugin
Thanked: 1 time(s)  Unread post Posted: Sat Dec 10, 2011 7:54 am 
Silver Contributor
Silver Contributor



Joined: Fri May 13, 2011 6:57 am
Posts: 174
Been thanked: 6 time(s)
Has thanked: 0 time(s)
Contribution Points: 3266
Saves a screeenshott
http://www.mediafire.com/?t4m89hy45h6gaub
usage:
Code:
 begin
     Plugins.Screenshot("C:\Users\Mark\My Pictures\ss.bmp")
end
     

_________________
A train stops at a train station, a bus stops at a bus station.
On my desk, there's a workstation...


Top
 Profile  
Reply with quote  
 Post subject: Re: Save a screenshot Plugin
Thanked: 0 time(s)  Unread post Posted: Sat Dec 10, 2011 4:38 pm 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4525
Been thanked: 1364 time(s)
Has thanked: 133 time(s)
Contribution Points: 33238
Thank you for sharing :)

Mind posting the .NET sourcecode here as well?

Also your more than welcome to just use the "Attachments" for sharing the actual plugin.
There is no need to use 3d party sites to upload the dll to.

PS.
To save screen dumps you can also use the build in function "Window.Save screendump"
It takes 1 argument, which is the folder to place the screen dump inside, BE will automatically generate a new unique file names based on the current time.

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
 Post subject: Re: Save a screenshot Plugin
Thanked: 0 time(s)  Unread post Posted: Sun Dec 11, 2011 4:02 am 
Silver Contributor
Silver Contributor



Joined: Fri May 13, 2011 6:57 am
Posts: 174
Been thanked: 6 time(s)
Has thanked: 0 time(s)
Contribution Points: 3266
Code:
using System;
using Plugin.BaseClasses;
using Plugin.Classes;

using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;

namespace ScreenshotPlugin
{
    [Serializable]
    public class Screenshot : BaseInstruction
    {
        public override void Execute()
        {
            Bitmap bitmap = new Bitmap(Screen.PrimaryScreen.Bounds.Width,
                     Screen.PrimaryScreen.Bounds.Height);

            Graphics graphics = Graphics.FromImage(bitmap as Image);

            graphics.CopyFromScreen(0, 0, 0, 0, bitmap.Size);

            bitmap.Save(Arguments[0].Value.ToString(), ImageFormat.Bmp);
        }

        public override void InitArguments()
        {
            AddArguments(
               new PluginArgument(PluginArgument.ArgumentType.FilePath, 100, "File", "Directory to save the screenshot (BMP)"));
        }

        public override string Name
        {
            get { return "Screenshot"; }
        }
    }
}

_________________
A train stops at a train station, a bus stops at a bus station.
On my desk, there's a workstation...


Top
 Profile  
Reply with quote  
 Post subject: Re: Save a screenshot Plugin
Thanked: 0 time(s)  Unread post Posted: Mon Dec 12, 2011 11:47 pm 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4525
Been thanked: 1364 time(s)
Has thanked: 133 time(s)
Contribution Points: 33238
Thank you :)

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
 Post subject: Re: Save a screenshot Plugin
Thanked: 0 time(s)  Unread post Posted: Thu Jan 26, 2012 3:27 pm 
Silver Contributor
Silver Contributor
User avatar



Joined: Mon Nov 28, 2011 3:06 pm
Posts: 211
Location: somewhere there
Been thanked: 9 time(s)
Has thanked: 7 time(s)
Contribution Points: 48
thank you very much, ill try to use this for my eden script :lol:

_________________
Learning BEM guides :)
Divina Online bot
please click the thank button if you feel like I have given you a good reply :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Save a screenshot Plugin
Thanked: 0 time(s)  Unread post Posted: Fri May 25, 2012 7:12 am 
New User
New User



Joined: Thu May 24, 2012 9:59 pm
Posts: 20
Been thanked: 0 time(s)
Has thanked: 0 time(s)
Contribution Points: 91
Very nice plugin, now i can use this kind of method to take a pic when my char dies and see who killed me or something else :mrgreen:


Top
 Profile  
Reply with quote  
 Post subject: Re: Save a screenshot Plugin
Thanked: 0 time(s)  Unread post Posted: Sat May 26, 2012 2:14 am 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4525
Been thanked: 1364 time(s)
Has thanked: 133 time(s)
Contribution Points: 33238
You can also use the "Window.Save screendump" command for it.

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
 Post subject: Re: Save a screenshot Plugin
Thanked: 0 time(s)  Unread post Posted: Sat May 26, 2012 5:03 am 
New User
New User



Joined: Thu May 24, 2012 9:59 pm
Posts: 20
Been thanked: 0 time(s)
Has thanked: 0 time(s)
Contribution Points: 91
Gigus wrote:
You can also use the "Window.Save screendump" command for it.


I see, i haven't tested much of BE(trial expired). Appreciate the tip!


Top
 Profile  
Reply with quote  
 Post subject: Re: Save a screenshot Plugin
Thanked: 0 time(s)  Unread post Posted: Sat May 26, 2012 7:04 pm 
Silver Contributor
Silver Contributor



Joined: Mon Jan 23, 2012 2:38 pm
Posts: 124
Been thanked: 1 time(s)
Has thanked: 2 time(s)
Contribution Points: 50
;) very useful ty


Top
 Profile  
Reply with quote  
 Post subject: Re: Save a screenshot Plugin
Thanked: 1 time(s)  Unread post Posted: Fri Jun 22, 2012 6:25 am 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Tue Nov 23, 2010 10:51 am
Posts: 213
Location: Pandora
Been thanked: 102 time(s)
Has thanked: 66 time(s)
Contribution Points: 8651
thanks to bias for permission to hijack the idea! :mrgreen:

updates in my version
  • supports multiple image formats
  • can resize the image
  • captures specific screen area
  • creates directory if needed
  • separates filename from path for easy assignment
  • assigns complete path to variable for easy file operations such as txting it to yourself

note: this will not capture games in full screen mode because it doesn't hook to DirectX. this can be good because it won't cause antibot issues
Code:
Plugins.Screenshot("folder path", "image name", "image type", "resize", "start X", "start Y", "end X", "end Y", "output path variable")
get all sickslug plugins here

example macro
Code:
 begin
     Mouse.Save coordinate to variable("x", "y")
     Variable.Set("boxsize", "300")
     Variable.Evaluate (Math)("{boxsize} / 2", "halfbox")
     Variable.Evaluate (Math)("{x} - {halfbox}", "x1")
     Variable.Evaluate (Math)("{y} - {halfbox}", "y1")
     Variable.Evaluate (Math)("{x} + {halfbox}", "x2")
     Variable.Evaluate (Math)("{y} + {halfbox}", "y2")
     Plugins.Screenshot("C:\temp", "test", "png", "1", "{x1}", "{y1}", "{x2}", "{y2}", "path")
     System.Launch application("{path}", "no")
 end

Image


Last edited by sickslug on Wed Jul 18, 2012 9:48 am, edited 6 times in total.

Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC


You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group