ankalagon Posted June 4, 2009 Share Posted June 4, 2009 (edited) 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+swin32api.mouse_event(win32con.MOUSEEVENTF_MOVE|win32con.MOUSEEVENTF_ABSOLUTE, 35000, 35000, 0) #mouse move on a center of the screenshell.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 June 4, 2009 by ankalagon Link to comment Share on other sites More sharing options...
jcarle Posted August 1, 2009 Share Posted August 1, 2009 Are you running the script as a service? If so, this sounds like a user permissions issue. Try running the script as the User you use to RDP with. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now