300 likes | 501 Views
Doctor Obsydian doctoro@synon.com AKA : Adrian Slade Principal Pattern Engineer aslade@synon.com. Obsydian Tips & Techniques. Schedule. Part 1 - ActiveX Choosing a script Script techniques Script gotcha’s Debugging Script help resources Part 2 - Creative Meta Code Global properties
E N D
Doctor Obsydian doctoro@synon.com AKA : Adrian Slade Principal Pattern Engineer aslade@synon.com ObsydianTips & Techniques
Schedule • Part 1 - ActiveX • Choosing a script • Script techniques • Script gotcha’s • Debugging • Script help resources • Part 2 - Creative Meta Code • Global properties • Function calls • Using with ActiveX
ActiveX - Choosing A Script • JScript • Live script • VB script • Visual Basic
ActiveX - Script Techniques 1 • Source code or file • #External <file name> • Setting properties • Supercedes the API’s • Set one or many in a script • Pass and manipulate values as parameters
ActiveX - Script Techniques 2 • Source code or file • Setting properties • Reacting to events • Events are script subroutines • Retained by the engine • Call API the at start of function
ActiveX - Script Techniques 3 • Source code or file • Setting properties • Reacting to events • Interacting with the Action Diagram • Runtime supplied methods for Values and Events
ActiveX - Script Techniques 4 • Source code or file • Setting properties • Reacting to events • Interacting with the Action Diagram • Calling methods • Parameters are optional
ActiveX - Script Techniques 5 • Source code or file • Setting properties • Reacting to events • Interacting with the Action Diagram • Calling methods • Creating objects • Does not need an ActiveX • Specific to an object model
ActiveX - Script Gotcha’s • Value type • The ‘SET’ instruction • Function parentheses • Unsupported objects • Event parameters have no effect • Event processing out of sequence • Visual Basic for Applications and Visual Basic 5.0
ActiveX - Debugging • Can be difficult • Use MsgBox “a string or value” • Learn to use Dev Studio in debug mode • Check parentheses and SET instruction • Use the Test mode in the panel designer • Windows Scripting Host?
ActiveX - Script Help Resources • Microsoft • VB script tutor • Product help files • Visual Basic • ActiveX supplier • Help files • VBscript for Dummies • Learn the Object Model
Useful Web Addresses • www.synon.com/LavaLounge/TechnicalCorner/Dr_O/ • www.microsoft.com/VBscript/ • www.microsoft.com/JScript/ • www.microsoft.com/vbscript/us/vbstutor/vbstutor.htm • www.webadvisor.com/vbscript.html • www.vbscripts.com/ • www.microsoft.com/sitebuilder/ • www.amazon.com • www.shersoft.com • www.download.com • www.vbextras.com
Creative Meta Code • Examples to spark your imagination - I hope. • Code taken from real working functions
Meta - Global Properties • Only works for client C++ • Makes data available to all functions • within an .EXE’s call graph
Meta - Function Calls • Only works for client C++ • Driven by the model • No parameters allowed
Meta - With An ActiveX • Loads images into an ImageList • Model driven • Gets the image name from the NAME object • Gets the image location from the Narrative of the NAME object
ObsydianTips & Techniques Doctor Obsydian doctoro@synon.com AKA : Adrian Slade Principal Pattern Engineer aslade@synon.com