AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AHK Automagic Windows NT+ Event Viewer Backup and Cleaner

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
JonTheNiceGuy



Joined: 22 Apr 2004
Posts: 18
Location: Manchester, UK

PostPosted: Thu Apr 22, 2004 10:32 pm    Post subject: AHK Automagic Windows NT+ Event Viewer Backup and Cleaner Reply with quote

Hi. I downloaded and installed Autohotkey on Tuesday of this week, and by the end of today I had a fully working executable to backup and then wipe event logs in Windows NT, 2K, and XP. OK, so I only tested the 2K and XP, but I can't see it breaking the code too much.

I'm partially submitting this here so that anyone following on behind can use the code (I'll store anything I write at http://www.spriggs.org.uk/autohotkey) and also to ask for some help tidying it up.

I'm looking for some answers though, as I don't understand something.

When I'm in Event Viewer, and I do "Save Log File As...", the following is what's in "Window Spy"

Code:
>>>>>>>>>>>>( Window Title )<<<<<<<<<<<<<
Save "Application" As

>>>>>>>>>>>( Mouse Position )<<<<<<<<<<<<
x: 341     y: 108

>>>>>>>>>>>>>( Pixel Color )<<<<<<<<<<<<<
13160660

>>>>>>>>>>>( Window Position )<<<<<<<<<<<
left: 94     top: 49     width: 563     height: 412

>>>>>>>>( Last Control Under Mouse )<<<<<<<
SysListView321

>>>>>>>>>( Status Bar Text )<<<<<<<<


>>>>>>>>>>>( Visible Window Text )<<<<<<<<<
Save &in:
FolderView
File &name:
Save as &type:
&Save
Cancel

>>>>>>>>>>( Hidden Window Text )<<<<<<<<<
Open as &read-only
&Help

>>>>>>>>>>>( TitleMatchMode=slow Visible Text )<<<<<<<<<
logs
Event Log (*.evt)

>>>>>>>>>>( TitleMatchMode=slow Hidden Text )<<<<<<<<<


Yet, when I do my WinWait,Save,Save &In or WinWait,Save,Save In it doesn't wait!

The version I'll be uploading today is slightly out-of-date, I had to make a few revisions, and the code as it stands right now doesn't work exactly (you can't export a remote log in .evt format!) but it's the start of the code. Once you see it progress to version 0.2, it's up to date.

The code is called runevent.ahk. Enjoy :)

JonTheNiceGuy
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Apr 22, 2004 11:17 pm    Post subject: Reply with quote

Quote:
Yet, when I do my WinWait,Save,Save &In or WinWait,Save,Save In it doesn't wait!

Are you sure you don't have another window that matches that title and text somewhere in the background? Perhaps you should try WinWaitActive instead?
Back to top
View user's profile Send private message Send e-mail
JonTheNiceGuy



Joined: 22 Apr 2004
Posts: 18
Location: Manchester, UK

PostPosted: Fri Apr 23, 2004 12:45 am    Post subject: I've kinda found a way around it... Reply with quote

I'm using the Window Spy and Script Writer to help out - :) If I get stuck, then I'll figure out what else is going on :)

I used LONG sleeps (1 Minute) as one of the logs it was producing was over 100Mb in size... but anyway, as I said, this is going to be tweaked through the roof and then updated.

I'm going to start putting all my Autohotkey scripts into here, if only because I'm finding the tool damn useful :)
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group