How Do i create a new event using script.. if you would please give me a good example like it runs at a specific time and executes a script.. thanks so much.
~Ghost~
~Ghost~
If this is your first visit, be sure to check out the FAQ. You must register before you can post.
IMPORTANT: Your first post will be checked for appropriate content. This may take a bit of time.
sub new_event(name) dim ev set ev=hs.NewEventEx(name) ev.group = "System" msgbox ev.name end sub
Dim ev As Object ev = hs.NewEventEx("Event Name") ev.ev_abs_time = 0 'this is the type of trigger ev.ev_time = "10:00" 'I think this is the correct format ev.group = "Test Group" 'then you will need to get the reference for this event to add an action hs.addaction(hs.GetEventRefByName("Event Name"), 5, "testscript.vb")
Sub Main(ByVal Parms As Object) Dim ev As Object ev = hs.NewEventEx("Event Name") ev.ev_abs_time = 0 'this is the type of trigger ev.ev_time = "10:00" 'I think this is the correct format ev.group = "Test Group" 'then you will need to get the reference for this event to add an action 'hs.waitsecs(1) hs.addaction(hs.GetEventRefByName("Event Name"), 5, "testscript.vb") End Sub
Comment