Jump to content

Windows Server 2003 makes black screenshoots


Recommended Posts

Hello,

I've got a problem. I work on a Windows Server 2003 via rdp. I've written soft that makes screenshots of webpages and desktop programs. Everything works fine untill I logout from rdp. The all the screens are black. Script is started as a scheduled task (once for 3 minutes). Of course I want my windows server to do screens by himself, not using rdp and the graphic card on my computer, everything should be done on server.

My script is written in python, i've tried to make screenshoots in few ways:

1. by hypersnap from command line (then all screenshots are black)

code something like this:

os.system('"c:\\Program Files\\HyperSnap 6\\HprSnap6" -snap -save:jpg ' + path_of_saved_file)

2. by hypersnap using win32spi (then i have no screen)

shell = win32com.client.Dispatch("Wscript.Shell")
shell.SendKeys("^+s") #click ctrl+shift+s
win32api.mouse_event(win32con.MOUSEEVENTF_MOVE|win32con.MOUSEEVENTF_ABSOLUTE, 35000, 35000, 0) #mouse move on a center of the screen
shell.SendKeys("{ENTER}") #click enter

the screen are not done because shell cannot "click", and the hypersnap shortcut isn't working properly and its not makeing screen, when i'm logged on rdp everything is working fine.

3. by PIL or by GTK (the exception is thrown because script has no access to PIL or GTK library, when i'm loggen on rdp everything works fine)

I don't have any idea how to makes it work. Please help if you can.

ps: sorry for my poor english

Edited by ankalagon
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...