Script Center > Scripting Forums > The Official Scripting Guys Forum! > Is this possible? Print screen script.
Ask a questionAsk a question
 

QuestionIs this possible? Print screen script.

  • Saturday, July 04, 2009 3:30 AMTgriepe Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello, I am new to scripting, as a matter of fact if what i am trying to do is possible, than i will have a reason to learn how to script! Any and all help will be appreciated!
    I am a refrigeration technician and i am trying to monitor an automated cook and chill system (made by armor Inox if any one is interested).

    This is in laymen term's what i will need my script to do.
    1. Initialize itself every 15 minutes.
    2. Bring the screen of the program that i want to monitor on top, this is a multiple screen program!
    3. Get a screen grab via the print screen function.
    4. Open the Paint program.
    5. Edit/paste.
    6. File/save as current date/time to a shared folder on a network drive. 
    7. Close Paint.

    The ability to disable this script would be desirable also! 

    I am not asking for a hand out here, if this is possible i will learn how to script!
    If i can learn how to make this work, i am pretty sure that this is some pretty powerful stuff that will come in handy down the road!

    I will be using Notepad and the computer is running XP. Thanks, Tim,

All Replies

  • Saturday, July 04, 2009 7:34 AMAssafM Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    Hi Tim,

    You can use WSH to complete this script.

    Use the Run Command to open the Programs (like Paint and the Monitoring Program)

    Set WshShell = WScript.CreateObject("WScript.Shell")
    Return = WshShell.Run("notepad " & WScript.ScriptFullName, 1, TRUE)
    
    

    Use the AppActive for getting focus on the Program You want
    Use the SendKeys to Paste and PrintScreen and Save in Paint

    set WshShell = CreateObject("WScript.Shell")
    WshShell.Run "calc"
    WScript.Sleep 100
    WshShell.AppActivate "Calculator"
    WScript.Sleep 100
    WshShell.SendKeys "1{+}"
    WScript.Sleep 500
    WshShell.SendKeys "2"
    WScript.Sleep 500
    WshShell.SendKeys "~"
    WScript.Sleep 500
    WshShell.SendKeys "*3"
    WScript.Sleep 500
    WshShell.SendKeys "~"
    WScript.Sleep 2500
    
    
    I think this should do it.
    Play with it a little you can find more explenations on all of it in the Web.

    Good Luck.

    Assaf Miron http://Assaf.Miron.googlepages.com
  • Monday, July 06, 2009 2:56 PMAbqBillModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Tgriepe,

    I recommend using a tool that's specifically designed for this purpose. I have used 'SnagIt' and it has a feature like this.

    Regards,

    Bill
  • Wednesday, July 08, 2009 1:53 AMTgriepe Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thank you both for the quick replies! I actually found a solution using an Excel spread sheet. I am linking the data cells in my spread sheet directly to the temperature outputs in the programmable logic controller that is controlling the Armor Inox system that we are using.
    This is a more desirable solution because it will be in real time!

    Bill, It would take forever to get third party software approved, but thanks for the suggestion!

    Assaf, I think i am going to take a look at what you have put together as i am curious about how this works, and i would like to know more!

    Thanks, Tim,