Sign in to follow this  
Followers 0
ant2ne

Garbage in _EventLog__Report

3 posts in this topic

Directly from the help file

_Main()
Func _Main()
    Local $hEventLog, $aData[4]=[3, 1, 2, 3]

    $hEventLog = _EventLog__Open("", "Application")
    _EventLog__Report($hEventLog, 4, 0, 1002, "Administrator", "AutoIt3 generated event", $aData)
    _EventLog__Close ($hEventLog)

EndFunc  ;==>_Main

Generates the event

Event Type: Information

Event Source: Application

Event Category: None

Event ID: 1002

Date: 2/19/2009

Time: 4:00:52 PM

User: A116-01\Administrator

Computer: A116-01

Description:

The description for Event ID ( 1002 ) in Source ( Application ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: AutoIt3 generated event.

Data:

0000: 01 02 03 ...

How do I trim off all of that garbage about "The description blah blah" and just leave the part that I want that says 'AutoIt3 generated event'

Thanks

Share this post


Link to post
Share on other sites



Look at _StringBetween or try trimming the string.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

Directly from the help file

_Main()
Func _Main()
    Local $hEventLog, $aData[4]=[3, 1, 2, 3]

    $hEventLog = _EventLog__Open("", "Application")
    _EventLog__Report($hEventLog, 4, 0, 1002, "Administrator", "AutoIt3 generated event", $aData)
    _EventLog__Close ($hEventLog)

EndFunc ;==>_Main

Generates the event

How do I trim off all of that garbage about "The description blah blah" and just leave the part that I want that says 'AutoIt3 generated event'

Thanks

You get that any time you use an invalid EventID for the selected source type. Previous topic on this.

There was an additional solution posted involving downloading and installing .dll file (didn't try that one).

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0