Automate Scheduler Using Macros
Automate Scheduler Using Macros
Automate Scheduler Using Macros
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Chapter 6: PropertiesExampleThis example demonstrates the use of the NotifyWithIcon andNotifyWithSound properties of the Options objectSub Main()Dim objSchedApp As ObjectDim objOptions As ObjectDim intResponse As IntegerSet objSchedApp = CreateObject("Cognosbatcher.Application")Set objOptions = objSchedApp.OptionsWith objOptions'if NotifyWithIcon is TRUE, <strong>Scheduler</strong> will flash an icon when'a remote task is completeIf .NotifyWithIcon ThenstrQualifier = ""ElsestrQualifier = "not "End IfintResponse = MsgBox("<strong>Scheduler</strong> is " & strQualifier & _"currently configured to notify the user with an flashing " & _"icon when a remote task is complete. Do you wish to " & _"change this setting?", 4,"Icon Notification")If intResponse = 6 Then.NotifyWithIcon = Not(.NotifyWithIcon).SaveEnd If'if NotifyWithSound is TRUE, <strong>Scheduler</strong> will beep when a'(remote)task is completeIf .NotifyWithSound ThenstrQualifier = ""ElsestrQualifier = "not "End IfintResponse = msgbox("<strong>Scheduler</strong> is " & strQualifier & _"currently configured to notify the user with a beep when " & _"a remote task is complete. Do you wish to change this " & _"setting?",4,"Sound Notification")If intResponse = 6 Then.NotifyWithSound = Not(.NotifyWithSound).SaveEnd IfEnd WithSet objOptions = NothingSet objSchedApp = NothingEnd Sub98 <strong>Automate</strong> <strong>Scheduler</strong> <strong>Using</strong> <strong>Macros</strong>