windows xp media centre

S

Steve Seguis [MVP]

According to this document for sendkeys in MSDN, you can't sent {PRTSC} to
an application which begs me to wonder why it was even included at all.
 
T

Type mismatch

Thanks so much everyone for your replies! It works great
now! I am very appreciative of all the help I receive
here from the experts like you. :)
 
T

Type mismatch

I am not trying to send it to an application. I want to
take a full screenshot of the entire screen and paste it
into mspaint. That is different, isn't it? Or am I wrong?
-----Original Message-----
According to this document for sendkeys in MSDN, you can't
sent {PRTSC} to
an application which begs me to wonder why it was even
included at all.

-- Steve Seguis - MCSE, Microsoft MVP, SCJP SCRIPTMATION
Automating the Enterprise http://www.scriptmation.com
 
T

Type mismatch

oops! I spoke too soon. The script actually writes all
the times for the events it pulls from the eventlog 6 hours
behind the correct time. I have checked to make sure that
the computers (yes, I have tested the script on 2 xp
machines) have the same time settings which are for the
same correct time zone, they are both set to correct for
daylight savings time (the script has the same problem even
if they are set not to correct for day light savings time)
and both machines show the correct time in the task bar.
The event logs on both machines give the correct time for
the events, so it must be the script. The script also uses
the now() command to report the time the script was written
and now() reports the correct time. I have listed the
script and some example output from it below. Please let
me know if you see anything out of place. Thanks!

Script:
Set objFS = CreateObject("Scripting.FileSystemObject")

'Open logfile. True means Overwrite any old file

Set objLogFile =
objFS.CreateTextFile("d:\watch\when_on.log", True)

'Write to log file

objLogFile.WriteLine("Log started at " & now() )

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")

Set colLoggedEvents = objWMIService.ExecQuery _
("Select * from Win32_NTLogEvent Where Logfile = 'System'
and " _
& "EventCode = '6005' or EventCode = '6006'")

for each objevent in colloggedevents

Dim wConvDate
Set wConvDate = CreateObject("WbemScripting.SWbemDateTime")
wConvDate.Value = objevent.timewritten

objLogFile.WriteLine(wConvDate.GetVarDate & ": " &
objevent.message )
next


Output:
Log started at 11/12/2004 9:26:09 PM
11/12/2004 3:24:22 PM: The Event log service was started.

11/12/2004 3:23:16 PM: The Event log service was stopped.

10/31/2004 2:17:29 PM: The Event log service was started.

10/26/2004 5:10:47 PM: The Event log service was started.

10/26/2004 5:06:54 PM: The Event log service was stopped.
-----Original Message-----
Thanks so much everyone for your replies! It works great
now! I am very appreciative of all the help I receive
here from the experts like you. :)
 
S

Steve Seguis [MVP]

I'm pretty sure that sendkeys sends whatever keys you want to the currently
active app. I guess the real question would be, how do I send print screen
to the OS using sendkeys rather than to the currently activated app.
 
T

Type mismatch

Hhhmmm, good point. One of my problems is that mspaint is
not the active application. When I run it, nothing is the
active application. Wierd. Mabey alt+printscreen or some
other key combo will work. I'll give it a try and post
back. Thanks for the discussion, Steve. It is helping my
mind progress in this problem. :)
-----Original Message-----
I'm pretty sure that sendkeys sends whatever keys you want
to the currently
active app. I guess the real question would be, how do I
send print screen
to the OS using sendkeys rather than to the currently
activated app.

-- Steve Seguis - MCSE, Microsoft MVP, SCJP SCRIPTMATION
Automating the Enterprise http://www.scriptmation.com
 
A

Al Dunbar [MS-MVP]

Capitan said:
I found this snipit of script online searching the
newsgroups, and for some reason I get an access denied
error on the following line when running it as the local
admin on an XP pro machine.

objFSO.DeleteFile("c:\Documents and Settings\" &
strUsername & "\Local Settings\Temp\*.*"), DeleteReadOnly

Why would I be able to delete files in here manually, but
my script be denied access? Thanks in advance for any
help.

Assuming that the script is running in the context of your account that has
the necessary privileges (not running from an ASP page, is it?), it could be
that:

- no files happen to match *.* at the time the script ran;
- some of the files are locked.

/Al
 
M

mayayana

You can try this:
http://www.jsware.net/jsware/scripts.html#draw

It's a free ActiveX DLL component that provides
drawing functions to script. One of the functions
will save a screen capture to a BMP file, taking
parameters of BMP file path and screen coordinates
to be included in the capture.
I don't know whether
you can get MS Paint to open the BMP but that
may work as a command line call such as:
WscriptShell.Run "C:\Windows\Paint.exe C:\capture.bmp"
_____________________________

(e-mail address removed)
For return email remove XX and YY.
_____________________________
 
C

Charles E Finkenbiner

I would try increasing the wait after the wshshell.run "mspaint"
command. MSPaint might not be loaded and ready when ^v is sent.


Hope this helps,

CEF
 
W

WinBlows

The only way to accomplish this is to rewrite the windows
OS with no errors. The required constant reboots and
other issues windows machines have is not just because
people don't take care to maintain their computers. It is
also because windows is an imperfect product.

-----Original Message-----
PCs right now, I'm

sure
will follow later,

but
Microsoft Windows

we
 
T

Type mismatch

It is not "spying on children". It is monitoring the use
of my computer. My son knows about it, it is no secret to
him that I will know when anyone turns the computer on or
off, which websites are visited, and take screen shots on
occasion of the screen while anyone is on the computer. I
do not want to disable my son from getting to adult
content on the internet. I want him to know that if he
gives into the temptation of going to such sites, that it
will not be secret and he will not be able to escape the
consequences. How will he ever learn to control himself
if he can't get to the sites in the first place? He is
almost a teenager. Content filtering is fine for very
young children. But as kids grow, they need to learn for
themselves how to judge and follow what is right and what
is wrong.
-----Original Message-----
Type said:
idea that I might misuse this, my intentions are for
monitoring my son's activites on the computer and
internet.


Spying on children IS a misuse. If you're in the US it's
probably legal but in the EU children have rights to
privacy.

There's a gazillion providers that offer a "family filter"
service that provides a very safe browsing experience.
 
L

Lee Chapelle

Type mismatch said:
Is there anyway of doing this inherent to the XP os? Thanks.

Copying a single character of blank space, such as from a text editor or
mail or news message, will do it.
 
B

Bob I

As Lee C says or WindowsKey+R then Clipbrd.exe and when it finally comes
up delete the contents.
 
T

Type mismatch

I'm trying to make a shortcut to a script on the desktop
of my XP machine. Below is the command or "Target"
statement I am trying to use with a "start in" parameter
of "c:\windows\system32".

"cscript x:\path\to\DelTmpFiles.vbs"

for some reason it will not accept this. Anyone know
why? Thanks.
 
M

MikeVa [MSFT]

Get rid of the Quotes around it:
cscript x:\path\to\DelTmpFiles.vbs

Or, change your Target to:
cmd.exe /c "cscript x:\path\to\DelTmpFiles.vbs"

Of, if cscript is already your default script host, you can just enter:
x:\path\to\DelTmpFiles.vbs

--
MikeVa [MSFT]

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
 
M

Michael Harris \(MVP\)

Type said:
I'm trying to make a shortcut to a script on the desktop
of my XP machine. Below is the command or "Target"
statement I am trying to use with a "start in" parameter
of "c:\windows\system32".

"cscript x:\path\to\DelTmpFiles.vbs"

for some reason it will not accept this. Anyone know
why? Thanks.


Assumimg you are creating the shorcut from VBScript, not inreactively...

TargetPath is on for the path to the cscript.exe executable. The path to
the script is an argument that goes in the Arguments property and the 'start
in' folder path goes in WorkingDirectory.

set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
strLink = strDesktop & "\DelTmpFiles.lnk"
set oShellLink = WshShell.CreateShortcut(strLink)
oShellLink.TargetPath = "cscript.exe"
oShellLink.Arguments = "x:\path \to\DelTmpFiles.vbs"
oShellLink.Description = "DelTmpFiles"
oShellLink.WorkingDirectory = "c:\windows\system32"
oShellLink.Save
 
G

Guest

Abuse report sent to (e-mail address removed).

Piracy report sent to (e-mail address removed).
-----Original Message-----
i've just downloaded the whole office suite from p2p and it
comes with the
serial & Crack
Cool Eh. All this for free (so whats the point splashing
out on money to buy
office when you can get it for free)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top