Announcement

Collapse
No announcement yet.

Key Code of Printscreen?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • .74
    replied
    Originally posted by Centauri Soldier View Post
    Tons of examples including screeny examples.
    http://www.amsuser.com/
    Thanks for that link. After looking into it I found an example called ScreenshotGrab-others-Worm.apz
    It was piece of cake.
    I just added this and it worked like charm:

    if System.IsKeyDown(44) then
    WindowShothWnd(WinApi.GetDesktopWindow())
    WindowShotSaveAs(_TempFolder .. "\\window.png")
    WindowShot()
    end


    Now I'll have to modify my example :P. Also no need to convert it anymore.
    Thanks again.

    Leave a comment:


  • Centauri Soldier
    replied
    Yes, just rename it. The board won't let us post dll files so I have to rename them to txt.

    If you find sside's stuff you'll find a treasure trove of dlls. He's got a few screenshot ones in there if I'm not mistaken as well as an on-the-fly image editing one.

    Leave a comment:


  • Tone
    replied
    Originally posted by Centauri Soldier View Post
    Ok, I know the other dll I'm looking for is somewhere on my hard drive but I just can't find it right now. I'll post it when I find it. For now, here's the keystrokes.dll file.

    [ATTACH]10062[/ATTACH]

    Also, there's a person on these forums who hasn't been around in some time but is a complete genius when it comes to dlls. I have his entire collection and all the examples that go with them. His forum name is sside. Do a search in the AMS 7 forum archives.

    Tons of examples including screeny examples.
    http://www.amsuser.com/
    Thank you thank you thank you!

    added: Oh i see the file has a .txt extension. is that for ease of download, and do i just remove the .txt and leave it as .dll?
    I know i'm a n00b i know i know i know

    I think you already know this but just for the experience i'm hoping to use a dll to take a screenshot.
    Last edited by Tone; 08-19-2010, 08:03 PM.

    Leave a comment:


  • Centauri Soldier
    replied
    Ok, I know the other dll I'm looking for is somewhere on my hard drive but I just can't find it right now. I'll post it when I find it. For now, here's the keystrokes.dll file.

    KEYSTROKES.DLL.txt

    Also, there's a person on these forums who hasn't been around in some time but is a complete genius when it comes to dlls. I have his entire collection and all the examples that go with them. His forum name is sside. Do a search in the AMS 7 forum archives.

    Tons of examples including screeny examples.
    http://www.amsuser.com/
    Last edited by Centauri Soldier; 08-19-2010, 11:17 AM.

    Leave a comment:


  • .74
    replied
    Yeah true. I just let it there in the beginning to test it then I got lazy to change it in the end. :<
    Also, we can try clearing the clipboard content after hitting the Print screen button.
    Last edited by .74; 08-19-2010, 04:18 AM.

    Leave a comment:


  • Tone
    replied
    Nice to see you sim. How did you manage to poison yourself the other week lol Glad you're ok now.
    This app uses retesets WinApi plugin to save the file as a .bmp rather than just copy it to the clipboard. Not only that it converts the image to a .jpeg.
    Point taken on the Windows folder :yes

    Does anyone know where i can get a copy of Worms "keystrokes" .dll please
    Last edited by Tone; 08-18-2010, 08:39 PM.

    Leave a comment:


  • sim
    replied
    Nice example but why are you saving things to peoples windows folder this by practice should be a nono, there is a temp folder for a reason the windows folder should not be used a temp folder. also I am confused with this app? PrtSc works with ams when you hit the button, so why make a app that does just that? as when you hit the button I am sure it will still add the print screen to the clipboard, but using your demo I can't get it to even take a image on windows 7 unless I run it in admin mode, there is reason for this and that is you DON'T clog up with windows folder. also does it hit its self but till take a image of its self?

    added, yep the printscreen function is still doing its own job when you press the printscreen button so your taking your own snapshot and windows is still taking a snapshot at then adding it to the windows clipboard.
    Last edited by sim; 08-18-2010, 08:24 PM.

    Leave a comment:


  • Tone
    replied
    Originally posted by .74 View Post
    No problem. These things happen. I just hope that this helps you.

    The main script in the first page is On Timer event (there is also something On Show event). And in the second page it's in the On Show event and in the Folder and Save buttons.
    You've definetely helped me, i've coded my first ever tiny app because of you, rather clicking on the AMS gui i actually wrote the code, so i'm very happy about that. I've also got half an idea now what a .dll is, that's another magical world waiting for me. You've definetely helped me bud, deffo :yes

    Leave a comment:


  • Tone
    replied
    Originally posted by Ulrich View Post
    And here is your RTFM.

    Ulrich
    - THAT did cross my mind to look in there haha.
    Thanks haha :yes

    added. Oh wow i didn't know this helpfile existed - excellent.
    http://www.indigorose.com/webhelp/ams/
    Last edited by Tone; 08-18-2010, 04:39 PM.

    Leave a comment:


  • .74
    replied
    No problem. These things happen. I just hope that this helps you.

    The main script in the first page is On Timer event (there is also something On Show event). And in the second page it's in the On Show event and in the Folder and Save buttons.

    Leave a comment:


  • Tone
    replied
    Originally posted by .74 View Post
    I just posted the exe as an extra. The source was the main thing. Also I can't see how the .apz is irrevalent. You said that the print screen code that I posted didn't work while it worked for me so that's why I posted the .apz.
    My apologies my friend, when i first opened the .apz example all it did was show the gnu licence, with no code showing in script explorer ( except delete .jpg ) - God knows why that happened. I'm looking again at your project, Once again i'm really sorry mate.

    added: When i run your project and click on "PrintScreen" it tells me to put the CD-ROM back in the tray. I'm still laughing as i type this .
    Ya gotta larf ..

    added added: i eventually got it going and it worked perfectly. When i clicked on PrintScreen it saved a foreground window image.
    Thank you for this there's more i can learn, and with regards to clicking on any of your .exe files in the future i see no reason not to after your display of true altruism here my friend. Everything negative in this post came from me, i hope i've made things right.
    Thanks again :yes
    Last edited by Tone; 08-18-2010, 04:25 PM.

    Leave a comment:


  • Ulrich
    replied
    Originally posted by Tone View Post
    Lorne, can you tell me a little more about that Ctrl key modifier please?
    And here is your RTFM.

    Ulrich

    Leave a comment:


  • .74
    replied
    Originally posted by Tone View Post
    I can't see what an .exe file proves There's loads of standalone screenshot .exe files out there. I thought we were trying to establish a way to use the Virtual Key (44) to take a screenshot. It looks like you're using different code other than .lua and compiling it with something else. The .apz example you posted was totally irrelevant to the discussion, but again, thank you for your other teachings.
    I scanned the .exe file at www.virustotal.com / came out 100% clean, although i didn't click on it.

    Lorne, can you tell me a little more about that Ctrl key modifier please?

    I'd love to find a way to use a .dll for taking a screenshot. I found one here .. http://sourceforge.net/projects/cprintscreen/ .. but it's written in C++. I wonder if there's a way to mix it into AMS and call it indirectly?
    I just posted the exe as an extra. The source was the main thing. Also I can't see how the .apz is irrevalent. You said that the print screen code that I posted didn't work while it worked for me so that's why I posted the .apz.
    Last edited by .74; 08-18-2010, 04:01 PM.

    Leave a comment:


  • Tone
    replied
    Originally posted by .74 View Post
    Sorry for taking so long.
    Here is the .exe file:
    http://www.sendspace.com/file/1bvi25
    And here is the .apz (source):
    I can't see what an .exe file proves There's loads of standalone screenshot .exe files out there. I thought we were trying to establish a way to use the Virtual Key (44) to take a screenshot. It looks like you're using different code other than .lua and compiling it with something else. The .apz example you posted was totally irrelevant to the discussion, but again, thank you for your other teachings.
    I scanned the .exe file at www.virustotal.com / came out 100% clean, although i didn't click on it.

    Lorne, can you tell me a little more about that Ctrl key modifier please?

    I'd love to find a way to use a .dll for taking a screenshot. I found one here .. http://sourceforge.net/projects/cprintscreen/ .. but it's written in C++. I wonder if there's a way to mix it into AMS and call it indirectly?
    Last edited by Tone; 08-18-2010, 03:36 PM.

    Leave a comment:


  • .74
    replied
    Sorry for taking so long.
    Here is the .exe file:
    http://www.sendspace.com/file/1bvi25
    And here is the .apz (source):
    Attached Files

    Leave a comment:

Working...
X