Jump to content


Photo

Screencapture For Gamemaker


  • Please log in to reply
48 replies to this topic

#1 Frawley

Frawley

    GMC Member

  • New Member
  • 53 posts

Posted 08 December 2007 - 05:29 PM

Posted Image

Description:
This DLL allows the programmer to take snapshots of the screen. There are three main functions:

License:
Free for non-commercial use. Contact me at rsf1000@gmail.com for a license.

Functions:
CaptureDesktop - Takes a snapshot of the entire screen. (In the next update, I will fix this so it actually captures the desktop window.)
CaptureWindow - This function is able to take a snapshot of the client area of a window! You can also use this as a faster method to saving screenshots of the game.
GetWindowHandle - Gets the handle of a window to be used with CaptureWindow.

Refer to the example game's comments to see how these functions work.

Posted Image | Posted Image
Download Contents:
- ScreenCaptureExample.exe
- ScreenCaptureExample.gmk
- ScreenCapture.dll
- ReadMe.txt

Edited by Frawley, 12 December 2007 - 11:36 PM.

  • 1

#2 Frawley

Frawley

    GMC Member

  • New Member
  • 53 posts

Posted 08 December 2007 - 05:31 PM

Reserved for future screenshots.
  • 0

#3 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 08 December 2007 - 11:55 PM

Sorry to tell you, but I can't really see much of a use for this. However, it's nice to see more people contributing to this section of the GMC.
  • 0

Chris Matthews, Co-Leader of Digital X

#4 HiroLord

HiroLord

    GMC Member

  • GMC Member
  • 255 posts

Posted 09 December 2007 - 12:15 AM

I tried it... nothing ever happened :S

No file created D:
  • 0
always working on somethin' new...

#5 Frawley

Frawley

    GMC Member

  • New Member
  • 53 posts

Posted 09 December 2007 - 01:12 AM

Sorry to tell you, but I can't really see much of a use for this.  However, it's nice to see more people contributing to this section of the GMC.

<{POST_SNAPBACK}>


Have you ever heard of screensavers? Many of them take a snapshot and then edit it, like mysterious in win xp. HiroLord, do you have windows xp, because I think microsoft fu**ed up visual studio 2005 on vista so that DLLs created with it dont work on xp.

Edited by Frawley, 09 December 2007 - 01:14 AM.

  • 0

#6 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 10 December 2007 - 06:59 PM

Yes, I have heard of screensavers, but here is my point:

"CaptureDesktop" - ooohh!!! *Presses PrtScrn button*
"CaptureWindow" - ooohh!!! *Ctrl+Alt+PrtScrn*
"GetWindowHandle" - ooohh!!! *Types window_handle() into GM*
  • 0

Chris Matthews, Co-Leader of Digital X

#7 Frawley

Frawley

    GMC Member

  • New Member
  • 53 posts

Posted 12 December 2007 - 04:22 AM

Yes, I have heard of screensavers, but here is my point:

"CaptureDesktop" - ooohh!!! *Presses PrtScrn button*
"CaptureWindow" - ooohh!!! *Ctrl+Alt+PrtScrn*
"GetWindowHandle" - ooohh!!! *Types window_handle() into GM*

<{POST_SNAPBACK}>


You are an idiot. Those are not at all how the functions work. First of all, window_handle() only gets the handle of the game window, not other windows. CTRL ALT PRINT SCREEN only takes a snapshot of a maximized window, so good try, you fail.

Edit: Why don't you try contributing something useful. After all, you are a "C++ Coder". After reading a few of your replies, all I see are third party tools that show the same information as task manager or by typing 'winver' into run ("oooh").

Edited by Frawley, 12 December 2007 - 04:38 AM.

  • 0

#8 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 12 December 2007 - 05:28 PM

Congratulations on trying to annoy me. But supposedly like you said to me "you fail". And if you read my first post, I offered constructive criticism, and welcomed you to the section of the GMC dedicated to DLL creations. However, instead of accepting my welcome, you've more like spat in my face.

Also, I don't know what version of windows you are using, but Ctrl+Alt+PrtScrn take a snapshot of only the active window, not the maximised one.

Oh, and you can slag my System Information DLL all you want, because if you read other peoples' replies, you will see that it has one thing your DLL doesn't:
Positive Feedback

Thank you, and goodnight.

Chris Matthews


Edit: Oh, and explain to me the "third party" thing about my DLLs?

Edited by cdm319, 12 December 2007 - 05:33 PM.

  • 0

Chris Matthews, Co-Leader of Digital X

#9 HiroLord

HiroLord

    GMC Member

  • GMC Member
  • 255 posts

Posted 12 December 2007 - 09:14 PM

Yeah, i use Windows XP

I really wish I could use this :skull:
  • 0
always working on somethin' new...

#10 retrogamer

retrogamer

    Button Masher

  • New Member
  • 468 posts

Posted 12 December 2007 - 10:43 PM

There are easy GML scripts to do most of those actions, HiroLord. It is pretty simple, you don't need a DLL for most of these.

Also, from the manuel:

Note that DLLs cannot be used in secure mode.


That might help.

Edited by retrogamer, 12 December 2007 - 10:44 PM.

  • 0

#11 Frawley

Frawley

    GMC Member

  • New Member
  • 53 posts

Posted 12 December 2007 - 11:29 PM

Hiro, I fixed the bug! All versions of windows can now use this, sorry it took a while. And to clarify, you do need a dll for all of these functions. Gamemaker can only take a snapshot of the game window, not other windows.

Edited by Frawley, 13 December 2007 - 12:24 AM.

  • 0

#12 Newly Discovered

Newly Discovered

    Harmonious Genius

  • GMC Member
  • 2475 posts
  • Version:GM8

Posted 13 December 2007 - 05:43 AM

arg, you're both wrong.
ctrl + alt+ prnt scrn doesn't do either of those things.
alt + prnt screen captures the active window/menu/taskbar.
using control in this sequence is completely useless.
  • 0

poof_sig.png


#13 Frawley

Frawley

    GMC Member

  • New Member
  • 53 posts

Posted 13 December 2007 - 01:10 PM

arg, you're both wrong.
ctrl + alt+ prnt scrn doesn't do either of those things.
alt + prnt screen captures the active window/menu/taskbar.
using control in this sequence is completely useless.

<{POST_SNAPBACK}>


Regardless, my dll doesn't use key combinations to capture the screen. It uses gid+. One more thing, if you try the example, run notepad.exe first because that is the window that I set it to capture. Or you can edit the example.

Edited by Frawley, 13 December 2007 - 01:13 PM.

  • 0

#14 Bram Buurlage

Bram Buurlage

    GMC Member

  • New Member
  • 51 posts

Posted 15 December 2007 - 11:02 AM

___________________________________________
ERROR in
action number 1
of Create Event
for object object0:

Error defining an external function.

this is in your example...
  • 0

#15 Fede-lasse

Fede-lasse

    AI Programmer

  • GMC Member
  • 2009 posts
  • Version:Unknown

Posted 16 December 2007 - 11:37 AM

Yup, this happens to me too :)
  • 0

Call me Fede.


#16 HiroLord

HiroLord

    GMC Member

  • GMC Member
  • 255 posts

Posted 16 December 2007 - 04:31 PM

*Ehem*

CaptureDesktop(handle, "test.bmp");
Returns this;
___________________________________________
ERROR in
action number 1
of Create Event
for object object0:

In script CaptureDesktop:
Error in code at line 13:
return external_call(CaptureDesktopId, argument0);

at position 23: Unknown variable CaptureDesktopId



CaptureWindow(handle, "test.bmp");
Doesn't create a file.

:)
  • 0
always working on somethin' new...

#17 necrotic

necrotic

    GMC Member

  • New Member
  • 238 posts

Posted 17 December 2007 - 01:46 AM

Thank you for making this! I have had use for this in the past, and I'm glad someone -finally- got around to making it :lol:
  • 0

#18 dk81584

dk81584

    Program Maker

  • New Member
  • 171 posts
  • Version:GM8

Posted 28 March 2008 - 02:19 AM

*Ehem*

CaptureDesktop(handle, "test.bmp");
Returns this;
___________________________________________
ERROR in
action number 1
of Create Event
for object object0:

In script CaptureDesktop:
Error in code at line 13:
return external_call(CaptureDesktopId, argument0);

at position 23: Unknown variable CaptureDesktopId



CaptureWindow(handle, "test.bmp");
Doesn't create a file.

^_^


Yeah, go into the CaptureWindow and CaptureScreen scripts and change "CaptureWindowId" to "CaptureScreenId", it should work
for you then, oh, and by the way, nice ddl, minus the little script glitch you forgot to fix, but you should take care of that, cuz this is
pretty usefull for screensavers and other stuff, again, nice job!
  • 0
Signature removed due to size restriction violation. The old signature is placed in the About Me section of the user's profile.

#19 LehdaRi

LehdaRi

    GMC Member

  • New Member
  • 28 posts

Posted 31 March 2008 - 01:19 PM

This seems to work on notepad only... I tried Paint, Firefox, IE and even CMD but nothing happened. Just with the notepad. :S
  • 0

#20 fire_soul453

fire_soul453

    aarons video games

  • GMC Member
  • 542 posts

Posted 05 April 2008 - 01:27 AM

Great dll. I love the CaptureDesktop. I plan I using this soon. I have a few uses for it.

Edited by fire_soul453, 05 April 2008 - 02:33 PM.

  • 0
Game maker Top sites
I'm sick of paypal. From now on I'm not buying indie games unless I can use something else...

#21 Midnightz

Midnightz

    GMC Member

  • New Member
  • 154 posts

Posted 22 July 2008 - 12:33 AM

It is very useful :lol:
  • 0

#22 hiro-niro

hiro-niro

    GMC Member

  • New Member
  • 707 posts

Posted 26 July 2008 - 12:10 AM

Why would I use this instead of Pressing (Alt)PrtSc and then Opening MSPaint and Pressing C+V and then pressing C+S?
  • 0
Permanently left the Game Maker Community.

#23 Fede-lasse

Fede-lasse

    AI Programmer

  • GMC Member
  • 2009 posts
  • Version:Unknown

Posted 30 July 2008 - 10:06 PM

Because this does those things all together.
  • 0

Call me Fede.


#24 Kale_Ryuu

Kale_Ryuu

    GMC Member

  • GMC Member
  • 544 posts

Posted 08 August 2008 - 06:46 AM

so I have tried this and failed...

what do i have to do exactly to take the shot of the enitre screen... just like pressing printscreen... all i get is black image... =\
  • 0
Conatact me @ Kale_Nakamaru@yahoo.com

#25 Kax

Kax

    GMC Member

  • New Member
  • 6 posts

Posted 18 August 2008 - 03:05 PM

Yes, I have heard of screensavers, but here is my point:

"CaptureDesktop" - ooohh!!! *Presses PrtScrn button*
"CaptureWindow" - ooohh!!! *Ctrl+Alt+PrtScrn*
"GetWindowHandle" - ooohh!!! *Types window_handle() into GM*

That is quite it... well it's good to have a dll that handles those well, but the license sux. You think ppl will pay or something for this?
  • 0

#26 LaLaLa

LaLaLa

    GMC Member

  • New Member
  • 511 posts
  • Version:GM8

Posted 29 March 2009 - 05:43 PM

Yes, I have heard of screensavers, but here is my point:

"CaptureDesktop" - ooohh!!! *Presses PrtScrn button*
"CaptureWindow" - ooohh!!! *Ctrl+Alt+PrtScrn*
"GetWindowHandle" - ooohh!!! *Types window_handle() into GM*

That is quite it... well it's good to have a dll that handles those well, but the license sux. You think ppl will pay or something for this?

How do you people not realize that the point of this DLL is to do these things through Game Maker? Yes, you can pres <Alt> + <Print Screen> (not with <Control>) to capture the window in focus, but Game Maker only deals with text on the clipboard, not images or anything else, so even if you generated these key presses, you would have no way of saving the image on the clipboard to a file, or gaining any access to it.

You have to use this DLL to get the entire screen / active window and save it to a file. Using the functions in GML only get the room as an image; test it and you will find it doesn't get the window border, nor the entire desktop and task bar etc.

So, please think about the applications of this DLL before you start making completely stupid coments and making yourself look like an idiot to any intelligent individual on these forums.

Edited by LaLaLa, 24 June 2010 - 04:53 AM.

  • 0

Posted ImagePosted Image
GM Ray Tracer (Multi-threaded version)| Batch Explorer (soon) | TI-Basic IDE (soon) | Mandelbrot Set Renderer (soon) |Image Set Viewer


#27 006

006

    GMC Member

  • GMC Member
  • 178 posts

Posted 10 April 2009 - 06:09 PM

Is there a way to make this .Dll capture a minimized window??
  • 0

#28 Staticgames

Staticgames

    GMC Member

  • New Member
  • 115 posts

Posted 16 August 2009 - 06:54 PM

No effence, but i find no use of this,,, i mean, GM7 has a built in F9 button that takes a screenshot, my laptop has a PrintScreen button that takes a screenshot, and i tested what that first guy u argued with said about teh Ctrl+Alt+Prntscreen, and he was right, it did only take a picture of the window, so sorry, i find no use,,,
On the plus size, im glad u contributed to GM : D

EDIT: actually, now i kinda find this less useful,,, because u need to go and open gm to do something, what if *And this happend to me*
Ur computer was being stupid, and every 20 secounds, a error message poped up and disapeared after a split secound, how am i gonna go to gm, open this game,,, and what, take a screenshot of them game to look at the errormessage?, or just Prntscreen?

EDIT2: @Lalala:
NO EFFENCE AT ALL!, but i just read ur post, with my friend, and we both thought when we read it "Wow, she just made herself look like an idiot infront of us,,,"
Standing up for what in our minds is the truth doesent make us look like an idiot, well, it depends who the person talking is, because to me, the people saying this is super useful i find look stupid, but to you, its the people who say its not useful at all, so thats ur OPINION, next time, please dont generalise and say "any intelligenet GML coder. ", cause im intelligent, and i honestly find no use in this. *Just stating a OPINION, not a fact*

Edited by Staticgames, 17 August 2009 - 07:38 PM.

  • -1

#29 Mister_M

Mister_M

    GMC Member

  • New Member
  • 499 posts

Posted 07 October 2009 - 09:51 AM

The link is down T~T
  • 0

#30 Yambam

Yambam

    GMC Member

  • GMC Member
  • 646 posts
  • Version:GM8

Posted 20 October 2009 - 02:34 PM

The link is down T~T

savefile is almost done so be patient
  • 0

green-banner.png

If you have any problems with GameMaker, you can PM me. ;D


#31 ze1

ze1

    GMC Member

  • GMC Member
  • 147 posts
  • Version:GM8

Posted 11 February 2010 - 01:06 AM

Believe it or not, I -DO- have an use for this .dll... too bad the host is down... =(
  • 0

#32 Razon

Razon

    GMC Member

  • GMC Member
  • 267 posts
  • Version:GM:Studio

Posted 11 February 2010 - 03:13 AM

http://www.mediafire...ymchbda3syo77y0


Edited by Razon, 05 May 2013 - 02:16 AM.

  • 0

#33 DefuzionGames

DefuzionGames

    GMC Member

  • GMC Member
  • 1450 posts
  • Version:Unknown

Posted 11 February 2010 - 01:09 PM

Can you add a function to capture a selected area from a SPECIFIED window?

I have a capture dll which can capture from rectangle from specified area on screen, but the thing is it does not capture it from the game window but from whatever the screen is showing.

Say for example i want to capture the webcam image from the game window (which is minimised) and then stream it.

So could you please PM me if you can
  • 0

#34 LaLaLa

LaLaLa

    GMC Member

  • New Member
  • 511 posts
  • Version:GM8

Posted 24 June 2010 - 05:01 AM

http://www.mediafire.com/?yzwmt3f5g2x

Thank you for posting an additional, working link to the DLL.

I thought I would sort of bump this topic because it is really useful! Also, thanks to the author for creating it :D
  • 0

Posted ImagePosted Image
GM Ray Tracer (Multi-threaded version)| Batch Explorer (soon) | TI-Basic IDE (soon) | Mandelbrot Set Renderer (soon) |Image Set Viewer


#35 yanai21

yanai21

    GMC Member

  • New Member
  • 44 posts

Posted 19 July 2010 - 09:13 PM

link is broken.

someone can upload to me or give me link?
  • 0

#36 devilkingx2

devilkingx2

    GMC Member

  • New Member
  • 273 posts

Posted 21 July 2010 - 05:22 AM

Yeah, i use Windows XP

I really wish I could use this :skull:


you can just convince OP(original poster used on everything except gamefaqs so far)/TC(topic creator used on gamefaqs message boards)(whatever you use on here) to upgrade to something not gay(like windows 7 or xp vista is faggotry hell the only thing gayer than vista is linux and mac and THATS saying something) and convince him to recode it(note im not flaming him just his gay ass operating system(which at the time wasnt a choice now anyone who chooses vista is a homosexual unless its for the reason of most things not being compatible with 7 but other than that))
  • -2
i got suspended for 3 days(7/20-23/10) for changing my siggy from a stupid mod message into something else? wow i now have a top 3 worst forums(artix entertainment and gamefaqs are the other 2)

my warn status is up and ive become the socrates(guy everyone hates for no apparent reason on the RF OGplanet forums) of the GMC i think its time i take a leaf of absence maybe i'll come back 1 day when commander of games and chance are gone maybe i'll come back when they stop hating me irrationally who knows but cya guys i wont be around much after today maybe when your community becomes nicer i'll come back but for now cya and i REALLY wouldnt wanna be ya

this is devilkingx2 2:49 PM 11/12/10 hoping for a better future when i return and signing off

#37 devilkingx2

devilkingx2

    GMC Member

  • New Member
  • 273 posts

Posted 21 July 2010 - 05:25 AM

Hiro, I fixed the bug! All versions of windows can now use this, sorry it took a while. And to clarify, you do need a dll for all of these functions. Gamemaker can only take a snapshot of the game window, not other windows.


wait a minute i thought this was for taking screenshots of game maker why the hell would you need gamemaker to take pics of other windows? when you can download fraps or hypercam 2/3 or just use prtscrn in that case this fails
  • 0
i got suspended for 3 days(7/20-23/10) for changing my siggy from a stupid mod message into something else? wow i now have a top 3 worst forums(artix entertainment and gamefaqs are the other 2)

my warn status is up and ive become the socrates(guy everyone hates for no apparent reason on the RF OGplanet forums) of the GMC i think its time i take a leaf of absence maybe i'll come back 1 day when commander of games and chance are gone maybe i'll come back when they stop hating me irrationally who knows but cya guys i wont be around much after today maybe when your community becomes nicer i'll come back but for now cya and i REALLY wouldnt wanna be ya

this is devilkingx2 2:49 PM 11/12/10 hoping for a better future when i return and signing off

#38 devilkingx2

devilkingx2

    GMC Member

  • New Member
  • 273 posts

Posted 21 July 2010 - 05:25 AM

Hiro, I fixed the bug! All versions of windows can now use this, sorry it took a while. And to clarify, you do need a dll for all of these functions. Gamemaker can only take a snapshot of the game window, not other windows.


wait a minute i thought this was for taking screenshots of game maker why the hell would you need gamemaker to take pics of other windows? when you can download fraps or hypercam 2/3 or just use prtscrn in that case this fails
  • 0
i got suspended for 3 days(7/20-23/10) for changing my siggy from a stupid mod message into something else? wow i now have a top 3 worst forums(artix entertainment and gamefaqs are the other 2)

my warn status is up and ive become the socrates(guy everyone hates for no apparent reason on the RF OGplanet forums) of the GMC i think its time i take a leaf of absence maybe i'll come back 1 day when commander of games and chance are gone maybe i'll come back when they stop hating me irrationally who knows but cya guys i wont be around much after today maybe when your community becomes nicer i'll come back but for now cya and i REALLY wouldnt wanna be ya

this is devilkingx2 2:49 PM 11/12/10 hoping for a better future when i return and signing off

#39 bennikniet

bennikniet

    GMC Member

  • GMC Member
  • 14 posts

Posted 26 July 2010 - 02:46 PM

Please update the download link
  • 0

#40 Blackdragon521

Blackdragon521

    GMC Member

  • New Member
  • 21 posts

Posted 07 August 2010 - 07:01 PM

Since everyone has been so critical of this plugin, I figured I should log on to say that this is insanely useful!

I've been wanting a plugin like this for so long for a project I've been wanting to make but I haven't been able to do it because of GM's limitations. I've been wanting to make a basic remote-play type program that sends extremely compressed images (and key-presses) over the internet so it wont take up much CPU, it will display at a high frame rate, and will be able to view all programs including games (Unlike most remote desktop programs). This is great, thanks for making it!

(Also, I've tested it and it seems to work perfectly.)

Edited by Blackdragon521, 07 August 2010 - 07:03 PM.

  • 0

#41 RTII

RTII

    RT

  • New Member
  • 402 posts

Posted 07 August 2010 - 08:14 PM

@ Blackdragon521
How did you download? OP please fix the link, I want this!
  • 0
Posted Image Posted Image Posted Image
My Games | RT-dev | RTII forum | Fight My Brute | Grayscale Corporation Forum
Please read and follow the closed, or your account may be Signature Rules.

#42 wac2007

wac2007

    GMC Member

  • GMC Member
  • 4 posts

Posted 27 September 2010 - 08:03 PM

Someone can fix this link? I want so much this dll =//
  • 0

#43 michael14721

michael14721

    GMC Member

  • New Member
  • 222 posts

Posted 05 October 2010 - 03:50 PM

How can I set the screenshot key to something else?
  • 0
Don't worry, the zombies are looking for brains, you're safe..

#44 slampdesign

slampdesign

    GMC Member

  • New Member
  • 13 posts

Posted 27 April 2011 - 10:59 PM

Hi, the link does not work .. could you change it? please :mellow:
  • 0

#45 Razon

Razon

    GMC Member

  • GMC Member
  • 267 posts
  • Version:GM:Studio

Posted 28 April 2011 - 01:45 AM

The mirror on page 2 still works, here's the link http://gmc.yoyogames...dpost&p=3428073.

Everyone should make sure to check through topics for mirror links before posting re-upload requests.

Edited by Razon, 28 April 2011 - 02:57 AM.

  • 0

#46 ClearWater

ClearWater

    GMC Member

  • GMC Member
  • 170 posts
  • Version:GM8.1

Posted 24 February 2012 - 04:04 AM

How do you get the capture window function to get an image from something other than notepad? i keep trying all sorts of window titles but it seems like it only recognizes notepad for some reason. may i suggest making it so that it will pick of on the window you trying to take a picture of even if you only just enter part of the window title or even just one word?
  • 0

#47 JRA

JRA

    GMC Member

  • GMC Member
  • 72 posts
  • Version:GM:Studio

Posted 22 April 2013 - 01:29 AM

Does anyone know the syntax for the CaptureRectangle function? I know this topic is old, but I'm creating an extension for personal use and would like to implement it.

 

EDIT:

Never mind, it's quite obvious: CaptureRectangle(fname,x,y,w,h) or something similar.


Edited by JRA, 22 April 2013 - 01:33 AM.

  • 0

#48 ZoSo

ZoSo

    GMC Member

  • New Member
  • 9 posts
  • Version:GM6

Posted 22 July 2013 - 06:38 PM

link is broken


  • 0

#49 Forester

Forester

    Skgarvrur

  • GMC Member
  • 199 posts
  • Version:GM:Studio

Posted 18 May 2015 - 08:09 AM

This is exactly what I've been looking for!!1 Zomg thank you gmtoolbox!


  • 0

Spoiler

Forester.jpg
Free music for your games!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users