AramisResearch Posted July 21, 2006 Posted July 21, 2006 I searched the forum here and found scant reference for this. Maybe I missed it though. In any case, I am converting some VBS code I use to AutoIT v3 (not beta) and one thing I make heavy use of is WshShell.LogEvent. I could really use a widget to write events to the Windows EventLogs. I could use the Reskit utility called Logevent.exe but I would rather not. If I missed something in the documentation I apologize in advance. Thanks, -Chris
GaryFrost Posted July 21, 2006 Posted July 21, 2006 If you really want to convert the vbs code into autoit i believe you'll need the beta for ObjCreate SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
/dev/null Posted July 21, 2006 Posted July 21, 2006 I searched the forum here and found scant reference for this. Maybe I missed it though. In any case, I am converting some VBS code I use to AutoIT v3 (not beta) and one thing I make heavy use of is WshShell.LogEvent. I could really use a widget to write events to the Windows EventLogs. I could use the Reskit utility called Logevent.exe but I would rather not. If I missed something in the documentation I apologize in advance. Thanks, -Chris You need this U3Xtra.dll (search the forums) and this: Global $EVENTLOG_SUCCESS = 0x0000 Global $EVENTLOG_ERROR_TYPE = 0x0001 Global $EVENTLOG_WARNING_TYPE = 0x0002 Global $EVENTLOG_INFORMATION_TYPE = 0x0004 Global $EVENTLOG_AUDIT_SUCCESS = 0x0008 Global $EVENTLOG_AUDIT_FAILURE = 0x0010 ; $x = DLLCall("AdvApi32.dll","hwnd","RegisterEventSource","str","","str","Application") DLLCall("AU3Xtra.dll", "int", "EventLogWrite","hwnd", $x[0],"short", $EVENTLOG_INFORMATION_TYPE,"long", 222,"str", "LOG THIS !!!") $x = DLLCall("AdvApi32.dll","int","DeregisterEventSource","hwnd",$x[0]) Cheers Kurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
eltorro Posted July 21, 2006 Posted July 21, 2006 (edited) You really should use beta. It's more stable than production. Global Const $SUCCESS = 0 Global Const $ERROR =1 Global Const $WARNING =2 Global Const $INFORMATION =4 Global Const $AUDIT_SUCCESS =8 Global Const $AUDIT_FAILURE =16 $WshShell = ObjCreate("WScript.Shell") if @error or $WshShell = 0 Then MsgBox(266288,"WshShell","Could not create object.") Exit EndIf $WshShell.LogEvent ($INFORMATION, "Script started.") ; ;do stuff. ; $WshShell.LogEvent ($SUCCESS, "Script completed." ) $WshShell = 0 Exit Edited July 21, 2006 by eltorro Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code
/dev/null Posted July 21, 2006 Posted July 21, 2006 You really should use beta. It's more stable than production.????CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
AramisResearch Posted July 21, 2006 Author Posted July 21, 2006 (edited) If you really want to convert the vbs code into autoit i believe you'll need the beta for ObjCreateI could do that, but if I write it myself I would learn a lot more.You really should use beta. It's more stable than production.That's pretty unusual.Thank you for the code snippets. I'm sure I can break it pretty well from there. -Chris Edited July 21, 2006 by AramisResearch
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