SlideShare ist ein Scribd-Unternehmen logo
1 von 32
© 2010 JustSystems Inc.© 2010 JustSystems Inc.
in 37 minutes
Episode 15
XMetaL Macros
for Non-Programmers
Brought to you by XMetaL Technical Services
Tom Magliery, XML Technology Specialist
© 2010 JustSystems Inc.
• Announcements
• Introduction and your first macro
• How to run a macro (5 ways)
• Customizing the toolbar
• User and event macros
• Application and document macros
• Notes for DITA users
• Temptations
• Summary
• Resources
• Q&A
Agenda
This slide makes me hungry for Skyline Chili. Bonus points if you know why.
© 2010 JustSystems Inc.
• Two new articles by our colleague Su-Laine:
– Information Today (how businesses can learn about
collaboration from Wikipedia):
http://www.infotoday.com/it/nov10/index.shtml
– CIDM Best Practices newsletter (localization in DITA):
http://www.infomanagementcenter.com/index.php?page=1419
• Best wishes to Dave from marketing as he
moves on today. The paddling feet below our
webinars’ waterline will never be the same.
Announcements
© 2010 JustSystems Inc.
• XMetaL macro:
– A blob of script code that can be executed by XMetaL
– A way to extend the functionality of XMetaL
• MCR files aka macro files:
– XMetaL customization files that contain XMetaL
macros
Introduction to XMetaL macros
Sure, “blob” is a technical term.
© 2010 JustSystems Inc.
Your first macro: “Hello, world”
DEMO_HelloWorld.mcr
An MCR file is actually an XML file.
Since script code often contains some of
the five reserved XML characters: < > &
' ", it is wrapped in a CDATA section,
which tells XML parsers not to treat
these characters as markup.
Source code already on Slide 3? You said “non-programmers”! Yes. Trust me ...
© 2010 JustSystems Inc.
Your first macro: “Hello, world”
DEMO_HelloWorld.mcr
This is the name that XMetaL will use in the
Macros toolbar, dialog, and other places.
Source code already on Slide 3? You said “non-programmers”! Yes. Trust me ...
© 2010 JustSystems Inc.
Your first macro: “Hello, world”
DEMO_HelloWorld.mcr
This tells XMetaL what scripting language
this macro uses.
Source code already on Slide 3? You said “non-programmers”! Yes. Trust me ...
© 2010 JustSystems Inc.
Your first macro: “Hello, world”
DEMO_HelloWorld.mcr
This is the script code to be executed
whenever this macro is run.
Source code already on Slide 3? You said “non-programmers”! Yes. Trust me ...
© 2010 JustSystems Inc.
1. Create an MCR file with a macro
DEMO_HelloWorld.mcr
2. Put the MCR file in the “Startup” folder
C:Program FilesXMetaL 6.0AuthorStartUp
3. Restart XMetaL
4. Run the macro
– How?
Adding your macro to XMetaL
© 2010 JustSystems Inc.
• Option 1: Run from the Macros dialog
How to run your macro
© 2010 JustSystems Inc.
• Option 2: Run from the Macros toolbar
– Select a macro, then click the “Run” button
How to run your macro
New personal best: Most annoying thing I’ve ever put on a PowerPoint slide.
Run
1
2
© 2010 JustSystems Inc.
• Option 3: Use a shortcut key
– TIP: You can edit MCR files in XMetaL (also in any
text editor). Then you need to refresh/reload the
macros for macro changes to take effect.
How to run your macro
DEMO_HelloWorld.mcr
© 2010 JustSystems Inc.
• Option 4: Add a custom menu or toolbar item
– But first, let’s see a more useful macro
How to run your macro
© 2010 JustSystems Inc.
Macro #2: Word Count
DEMO_WordCount.mcr
I can tell you how this script code works later, if we have time. It’s not perfect.
© 2010 JustSystems Inc.
• You can put more
than one macro in
a single MCR file
• It looks something
like this
TIP: Multiple macros per file
ManyMacrosInOneFile.mcr
For ease-of-demo reasons, I’m not doing that today.
© 2010 JustSystems Inc.
• Now back to Option 4: Add a custom menu or
toolbar item
How to run your macro
Start with a
right-click in
the toolbars
1
Select “Customize...”
2
© 2010 JustSystems Inc.
• Now back to Option 4: Add a custom menu or
toolbar item
How to run your macro
Click “New...”
3
Name your toolbar4
© 2010 JustSystems Inc.
• Now back to Option 4: Add a custom menu or
toolbar item
How to run your macro
Select the
Buttons tab
5
Select
“Application
Macros”
6
Select your
macro
7
Choose an
icon for your
macro8
© 2010 JustSystems Inc.
• Now back to Option 4: Add a custom menu or
toolbar item
How to run your macro
Drag the
icon to the
toolbar9
© 2010 JustSystems Inc.
• Important notes:
– When adding toolbar buttons for application macros,
close all documents first
– Customizing the toolbars (or menus) manually is fine
for “simple” situations, but for more complex
customization it is better to manipulate them with
script (more script!)
• Advanced topics:
– Saving/sharing your toolbar settings
– Where XMetaL “hides” TBR files
• Toolbar cache & per-user folder
– Customizing menus/toolbars with script
Customizing toolbars
© 2010 JustSystems Inc.
• Option 5: Add to the context (right-click) menu
– But first, we need to learn about event macros
How to run your macro
© 2010 JustSystems Inc.
• Our examples so far are user macros
– XMetaL runs one whenever you request it
• XMetaL also supports event macros
– XMetaL runs them automatically when system events
occur
– The magic is in the name of the macro
– “On_” prefix indicates that it is an event macro
– XMetaL recognizes certain event names
– You can have multiple event macros with the same
name – in most cases they will all be run. (With user
macros, only one will run.)
User vs. event macros
© 2010 JustSystems Inc.
– Whenever we open any document, this macro will
display some information about that file
Macro #3: When a document is opened
DEMO_OnDocOpenComplete.mcr
© 2010 JustSystems Inc.
– Use this to hide event macros from the Macros
toolbar and dialog
TIP: Hiding a macro
DEMO_OnDocOpenComplete.mcr
© 2010 JustSystems Inc.
• Now back to Option 5*: Add it to the context
(right-click) menu
– Note: This is a simplified example; maybe not “best
practice” but it will work for the demo
– “Best practice” is another advanced topic
How to run your macro
*Finally!!
DEMO_ContextMenu.mcr
© 2010 JustSystems Inc.
• Our examples so far are application macros
– Loaded at application startup
– Available no matter what type of document you are
working in (DITA, DocBook, ...)
– Also must be coded to handle any document type
• Can’t have script that relies on specific element names
• XMetaL also supports document macros
– MCR file is named “YourDTDName.mcr” and (usually)
lives with other YourDTDName files (CSS, CTM, etc.)
– Loaded the first time a document is opened
– Available only if the active document is that type
Application vs. document macros
DTD name or schema name, of course.
© 2010 JustSystems Inc.
– TIP: You can run macros from other macros. (Need to
be sure they have been loaded first.)
Example: Add macros to Journalist
partial code, paste this into journalist.mcr
© 2010 JustSystems Inc.
• Most of the DITA features in XMetaL are macros –
mostly document macros
– E.g. adding a conref is a macro that launches the (custom-
built) dialogs that let you browse for the target, then inserts
the conref attribute
• Script is far more complex than today’s examples
• Adding simple application macros to XMetaL will
usually work with DITA
– All of today’s samples work fine
• Adding document macros for DITA to XMetaL is “not
allowed”
– There are a few exceptions: special “hooks”
– This is an advanced topic for sure!
Some notes for DITA users
© 2010 JustSystems Inc.
• Adding custom dialogs and wizards
• Transforming legacy content
• Importing data from databases
• Processing/analyzing content
• Working with ActiveX objects
• Handling drag-and-drop from other apps
• Improving authors’ user experience
• Automatically navigating through documents
• Generating content, e.g., TOC or index
• Capturing and pre-processing user input
• Hiding parts of the XMetaL UI
• Providing shortcuts for repetitive operations
• Adding custom UI to the Resource Manager
Temptations
© 2010 JustSystems Inc.
• Macros ...
– are blobs of executable script code
– can be user-invoked (many ways) or event-based
– can be application-wide or document-type-specific
– can run other macros
– can do lots of different things
• XMetaL APIs – your subconscious has seen six:
– Application.Alert(), Application.AppendMacro(),
Application.Run(), ActiveDocument.FullName,
ActiveDocument.Xml, Application.MessageBox()
• There are over 1200 properties and methods!
Summary: what have we learned?
© 2010 JustSystems Inc.
• Customization Guide:
– General guide to customizing XMetaL
– Some topics assume you are using XMetaL
Developer (Visual Studio)
• We’ve been “hand-editing” today, which is fine
• Programmer’s Guide:
– Complete reference guide to the XMetaL API
• Both are available here (PDF and WebHelp):
http://na.justsystems.com/content-support-user-guides
XMetaL developer resources
© 2010 JustSystems Inc.
• XMetaL Community Forums
– http://forums.xmetal.com/
• JustSystems Partner Center
– http://justpartnercenter.com/
• Ask us for help (customer support)
– supportxmetal@justsystems.com
• Ask us for help (partner tech support)
– partnersupport-na@justsystems.com
Resources

Weitere ähnliche Inhalte

Was ist angesagt?

Engage2022 - Domino Admin Tips
Engage2022 - Domino Admin TipsEngage2022 - Domino Admin Tips
Engage2022 - Domino Admin TipsGabriella Davis
 
RNUG - Dirty Secrets of the Notes Client
RNUG - Dirty Secrets of the Notes ClientRNUG - Dirty Secrets of the Notes Client
RNUG - Dirty Secrets of the Notes ClientChristoph Adler
 
Active Session History in PostgreSQL:
Active Session History in PostgreSQL:Active Session History in PostgreSQL:
Active Session History in PostgreSQL:BertrandDrouvot
 
Secure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior
 
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...Amazon Web Services
 
Important tips on Router and SMTP mail routing
Important tips on Router and SMTP mail routingImportant tips on Router and SMTP mail routing
Important tips on Router and SMTP mail routingjayeshpar2006
 
M08 protecting your message data in IBM MQ with encryption
M08 protecting your message data in IBM MQ with encryptionM08 protecting your message data in IBM MQ with encryption
M08 protecting your message data in IBM MQ with encryptionRobert Parker
 
KubeCon EU 2016: Full Automatic Database: PostgreSQL HA with Kubernetes
KubeCon EU 2016: Full Automatic Database: PostgreSQL HA with KubernetesKubeCon EU 2016: Full Automatic Database: PostgreSQL HA with Kubernetes
KubeCon EU 2016: Full Automatic Database: PostgreSQL HA with KubernetesKubeAcademy
 
Java for XPages Development
Java for XPages DevelopmentJava for XPages Development
Java for XPages DevelopmentTeamstudio
 
HCL Notes and Nomad Troubleshooting for Dummies
HCL Notes and Nomad Troubleshooting for DummiesHCL Notes and Nomad Troubleshooting for Dummies
HCL Notes and Nomad Troubleshooting for Dummiespanagenda
 
Petit potam slides-rtfm-ossir
Petit potam slides-rtfm-ossirPetit potam slides-rtfm-ossir
Petit potam slides-rtfm-ossirLionelTopotam
 
Introduction to Metasploit
Introduction to MetasploitIntroduction to Metasploit
Introduction to MetasploitGTU
 
VMware Workstation
VMware WorkstationVMware Workstation
VMware WorkstationBoni Yeamin
 
Best Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWSBest Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWSAmazon Web Services
 
Here Be Dragons: The Unexplored Land of Active Directory ACLs
Here Be Dragons: The Unexplored Land of Active Directory ACLsHere Be Dragons: The Unexplored Land of Active Directory ACLs
Here Be Dragons: The Unexplored Land of Active Directory ACLsAndy Robbins
 
20180726 AWS KRUG - RDS Aurora에 40억건 데이터 입력하기
20180726 AWS KRUG - RDS Aurora에 40억건 데이터 입력하기20180726 AWS KRUG - RDS Aurora에 40억건 데이터 입력하기
20180726 AWS KRUG - RDS Aurora에 40억건 데이터 입력하기Jongwon Han
 

Was ist angesagt? (20)

Engage2022 - Domino Admin Tips
Engage2022 - Domino Admin TipsEngage2022 - Domino Admin Tips
Engage2022 - Domino Admin Tips
 
RNUG - Dirty Secrets of the Notes Client
RNUG - Dirty Secrets of the Notes ClientRNUG - Dirty Secrets of the Notes Client
RNUG - Dirty Secrets of the Notes Client
 
Postgres index types
Postgres index typesPostgres index types
Postgres index types
 
Active Session History in PostgreSQL:
Active Session History in PostgreSQL:Active Session History in PostgreSQL:
Active Session History in PostgreSQL:
 
Secure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scripting
 
XXE
XXEXXE
XXE
 
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
 
Penetration Testing AWS
Penetration Testing AWSPenetration Testing AWS
Penetration Testing AWS
 
Money adder
Money adderMoney adder
Money adder
 
Important tips on Router and SMTP mail routing
Important tips on Router and SMTP mail routingImportant tips on Router and SMTP mail routing
Important tips on Router and SMTP mail routing
 
M08 protecting your message data in IBM MQ with encryption
M08 protecting your message data in IBM MQ with encryptionM08 protecting your message data in IBM MQ with encryption
M08 protecting your message data in IBM MQ with encryption
 
KubeCon EU 2016: Full Automatic Database: PostgreSQL HA with Kubernetes
KubeCon EU 2016: Full Automatic Database: PostgreSQL HA with KubernetesKubeCon EU 2016: Full Automatic Database: PostgreSQL HA with Kubernetes
KubeCon EU 2016: Full Automatic Database: PostgreSQL HA with Kubernetes
 
Java for XPages Development
Java for XPages DevelopmentJava for XPages Development
Java for XPages Development
 
HCL Notes and Nomad Troubleshooting for Dummies
HCL Notes and Nomad Troubleshooting for DummiesHCL Notes and Nomad Troubleshooting for Dummies
HCL Notes and Nomad Troubleshooting for Dummies
 
Petit potam slides-rtfm-ossir
Petit potam slides-rtfm-ossirPetit potam slides-rtfm-ossir
Petit potam slides-rtfm-ossir
 
Introduction to Metasploit
Introduction to MetasploitIntroduction to Metasploit
Introduction to Metasploit
 
VMware Workstation
VMware WorkstationVMware Workstation
VMware Workstation
 
Best Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWSBest Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWS
 
Here Be Dragons: The Unexplored Land of Active Directory ACLs
Here Be Dragons: The Unexplored Land of Active Directory ACLsHere Be Dragons: The Unexplored Land of Active Directory ACLs
Here Be Dragons: The Unexplored Land of Active Directory ACLs
 
20180726 AWS KRUG - RDS Aurora에 40억건 데이터 입력하기
20180726 AWS KRUG - RDS Aurora에 40억건 데이터 입력하기20180726 AWS KRUG - RDS Aurora에 40억건 데이터 입력하기
20180726 AWS KRUG - RDS Aurora에 40억건 데이터 입력하기
 

Ähnlich wie XMetaL Macros for Non-Programmers

IBM Cognos 10 Framework Manager Metadata Modeling: Tips and Tricks
IBM Cognos 10 Framework Manager Metadata Modeling: Tips and TricksIBM Cognos 10 Framework Manager Metadata Modeling: Tips and Tricks
IBM Cognos 10 Framework Manager Metadata Modeling: Tips and TricksSenturus
 
XPages Blast - Ideas, Tips and More
XPages Blast - Ideas, Tips and MoreXPages Blast - Ideas, Tips and More
XPages Blast - Ideas, Tips and MoreTeamstudio
 
VT University Live Session 3
VT University Live Session 3VT University Live Session 3
VT University Live Session 3VisibleThread
 
It's Not Infernal: Dante's Nine Circles of XPages Heaven
It's Not Infernal: Dante's Nine Circles of XPages HeavenIt's Not Infernal: Dante's Nine Circles of XPages Heaven
It's Not Infernal: Dante's Nine Circles of XPages HeavenTeamstudio
 
Cadth 2015 breakfast 2 excel hta tools presentation final
Cadth 2015 breakfast 2 excel hta tools presentation   finalCadth 2015 breakfast 2 excel hta tools presentation   final
Cadth 2015 breakfast 2 excel hta tools presentation finalCADTH Symposium
 
860 dspi how_to_create_a_d3_autotest_macro_using_d2_modem
860 dspi how_to_create_a_d3_autotest_macro_using_d2_modem860 dspi how_to_create_a_d3_autotest_macro_using_d2_modem
860 dspi how_to_create_a_d3_autotest_macro_using_d2_modemtrilithicweb
 
Operating System Structure Of A Single Large Executable...
Operating System Structure Of A Single Large Executable...Operating System Structure Of A Single Large Executable...
Operating System Structure Of A Single Large Executable...Jennifer Lopez
 
Twelve Tasks Made Easier with IBM Domino XPages
Twelve Tasks Made Easier with IBM Domino XPagesTwelve Tasks Made Easier with IBM Domino XPages
Twelve Tasks Made Easier with IBM Domino XPagesTeamstudio
 
Fundamental Design Patterns.pptx
Fundamental Design Patterns.pptxFundamental Design Patterns.pptx
Fundamental Design Patterns.pptxJUNSHIN8
 
Wireless Wednesdays: Part 4
Wireless Wednesdays: Part 4Wireless Wednesdays: Part 4
Wireless Wednesdays: Part 4Teamstudio
 
Wireless Wednesdays: Part 2
Wireless Wednesdays: Part 2Wireless Wednesdays: Part 2
Wireless Wednesdays: Part 2Teamstudio
 
Reactive Micro Services with Java seminar
Reactive Micro Services with Java seminarReactive Micro Services with Java seminar
Reactive Micro Services with Java seminarGal Marder
 
Mihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JSMihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JSITCamp
 
Innoslate 101 webinar steve (1) (1)
Innoslate 101 webinar steve (1) (1)Innoslate 101 webinar steve (1) (1)
Innoslate 101 webinar steve (1) (1)Elizabeth Steiner
 
InnerSoft STATS - Introduction
InnerSoft STATS - IntroductionInnerSoft STATS - Introduction
InnerSoft STATS - IntroductionInnerSoft
 
Micro station v8 manual
Micro station v8 manualMicro station v8 manual
Micro station v8 manualyuri30
 
MTM Test Management System
MTM Test Management SystemMTM Test Management System
MTM Test Management SystemMinu Mishra
 

Ähnlich wie XMetaL Macros for Non-Programmers (20)

IBM Cognos 10 Framework Manager Metadata Modeling: Tips and Tricks
IBM Cognos 10 Framework Manager Metadata Modeling: Tips and TricksIBM Cognos 10 Framework Manager Metadata Modeling: Tips and Tricks
IBM Cognos 10 Framework Manager Metadata Modeling: Tips and Tricks
 
XPages Blast - Ideas, Tips and More
XPages Blast - Ideas, Tips and MoreXPages Blast - Ideas, Tips and More
XPages Blast - Ideas, Tips and More
 
Your notes DNA
Your notes DNAYour notes DNA
Your notes DNA
 
VT University Live Session 3
VT University Live Session 3VT University Live Session 3
VT University Live Session 3
 
May 2014-webinar
May 2014-webinarMay 2014-webinar
May 2014-webinar
 
It's Not Infernal: Dante's Nine Circles of XPages Heaven
It's Not Infernal: Dante's Nine Circles of XPages HeavenIt's Not Infernal: Dante's Nine Circles of XPages Heaven
It's Not Infernal: Dante's Nine Circles of XPages Heaven
 
Cadth 2015 breakfast 2 excel hta tools presentation final
Cadth 2015 breakfast 2 excel hta tools presentation   finalCadth 2015 breakfast 2 excel hta tools presentation   final
Cadth 2015 breakfast 2 excel hta tools presentation final
 
860 dspi how_to_create_a_d3_autotest_macro_using_d2_modem
860 dspi how_to_create_a_d3_autotest_macro_using_d2_modem860 dspi how_to_create_a_d3_autotest_macro_using_d2_modem
860 dspi how_to_create_a_d3_autotest_macro_using_d2_modem
 
Text mining tutorial
Text mining tutorialText mining tutorial
Text mining tutorial
 
Operating System Structure Of A Single Large Executable...
Operating System Structure Of A Single Large Executable...Operating System Structure Of A Single Large Executable...
Operating System Structure Of A Single Large Executable...
 
Twelve Tasks Made Easier with IBM Domino XPages
Twelve Tasks Made Easier with IBM Domino XPagesTwelve Tasks Made Easier with IBM Domino XPages
Twelve Tasks Made Easier with IBM Domino XPages
 
Fundamental Design Patterns.pptx
Fundamental Design Patterns.pptxFundamental Design Patterns.pptx
Fundamental Design Patterns.pptx
 
Wireless Wednesdays: Part 4
Wireless Wednesdays: Part 4Wireless Wednesdays: Part 4
Wireless Wednesdays: Part 4
 
Wireless Wednesdays: Part 2
Wireless Wednesdays: Part 2Wireless Wednesdays: Part 2
Wireless Wednesdays: Part 2
 
Reactive Micro Services with Java seminar
Reactive Micro Services with Java seminarReactive Micro Services with Java seminar
Reactive Micro Services with Java seminar
 
Mihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JSMihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JS
 
Innoslate 101 webinar steve (1) (1)
Innoslate 101 webinar steve (1) (1)Innoslate 101 webinar steve (1) (1)
Innoslate 101 webinar steve (1) (1)
 
InnerSoft STATS - Introduction
InnerSoft STATS - IntroductionInnerSoft STATS - Introduction
InnerSoft STATS - Introduction
 
Micro station v8 manual
Micro station v8 manualMicro station v8 manual
Micro station v8 manual
 
MTM Test Management System
MTM Test Management SystemMTM Test Management System
MTM Test Management System
 

Mehr von XMetaL

65 New Highlights of XMetaL Author Enterprise 7.0
65 New Highlights of XMetaL Author Enterprise 7.065 New Highlights of XMetaL Author Enterprise 7.0
65 New Highlights of XMetaL Author Enterprise 7.0XMetaL
 
Fine-tuning the DITA customization
Fine-tuning the DITA customizationFine-tuning the DITA customization
Fine-tuning the DITA customizationXMetaL
 
Displaying additional image types in XMetaL
Displaying additional image types in XMetaLDisplaying additional image types in XMetaL
Displaying additional image types in XMetaLXMetaL
 
Dropping content isn't a drag!
Dropping content isn't a drag!Dropping content isn't a drag!
Dropping content isn't a drag!XMetaL
 
Quick and Easy Usability in XMetaL Author
Quick and Easy Usability in XMetaL AuthorQuick and Easy Usability in XMetaL Author
Quick and Easy Usability in XMetaL AuthorXMetaL
 
Putting DITA Localization into Practice
Putting DITA Localization into PracticePutting DITA Localization into Practice
Putting DITA Localization into PracticeXMetaL
 
Deploying Schemas and XMetaL Customization Files
Deploying Schemas and XMetaL Customization FilesDeploying Schemas and XMetaL Customization Files
Deploying Schemas and XMetaL Customization FilesXMetaL
 
DITA Open Toolkit Deployment with XMetaL Author Enterprise 6
DITA Open Toolkit Deployment with XMetaL Author Enterprise 6DITA Open Toolkit Deployment with XMetaL Author Enterprise 6
DITA Open Toolkit Deployment with XMetaL Author Enterprise 6XMetaL
 
Taking Advantage of XMetaL’s XInclude Support
Taking Advantage of XMetaL’s XInclude SupportTaking Advantage of XMetaL’s XInclude Support
Taking Advantage of XMetaL’s XInclude SupportXMetaL
 
XMetaL Dialog Odds & Ends
XMetaL Dialog Odds & EndsXMetaL Dialog Odds & Ends
XMetaL Dialog Odds & EndsXMetaL
 
XMetaL and DITA in the Marketing Department: Tastes Great, Less Filling
XMetaL and DITA in the Marketing Department: Tastes Great, Less FillingXMetaL and DITA in the Marketing Department: Tastes Great, Less Filling
XMetaL and DITA in the Marketing Department: Tastes Great, Less FillingXMetaL
 

Mehr von XMetaL (11)

65 New Highlights of XMetaL Author Enterprise 7.0
65 New Highlights of XMetaL Author Enterprise 7.065 New Highlights of XMetaL Author Enterprise 7.0
65 New Highlights of XMetaL Author Enterprise 7.0
 
Fine-tuning the DITA customization
Fine-tuning the DITA customizationFine-tuning the DITA customization
Fine-tuning the DITA customization
 
Displaying additional image types in XMetaL
Displaying additional image types in XMetaLDisplaying additional image types in XMetaL
Displaying additional image types in XMetaL
 
Dropping content isn't a drag!
Dropping content isn't a drag!Dropping content isn't a drag!
Dropping content isn't a drag!
 
Quick and Easy Usability in XMetaL Author
Quick and Easy Usability in XMetaL AuthorQuick and Easy Usability in XMetaL Author
Quick and Easy Usability in XMetaL Author
 
Putting DITA Localization into Practice
Putting DITA Localization into PracticePutting DITA Localization into Practice
Putting DITA Localization into Practice
 
Deploying Schemas and XMetaL Customization Files
Deploying Schemas and XMetaL Customization FilesDeploying Schemas and XMetaL Customization Files
Deploying Schemas and XMetaL Customization Files
 
DITA Open Toolkit Deployment with XMetaL Author Enterprise 6
DITA Open Toolkit Deployment with XMetaL Author Enterprise 6DITA Open Toolkit Deployment with XMetaL Author Enterprise 6
DITA Open Toolkit Deployment with XMetaL Author Enterprise 6
 
Taking Advantage of XMetaL’s XInclude Support
Taking Advantage of XMetaL’s XInclude SupportTaking Advantage of XMetaL’s XInclude Support
Taking Advantage of XMetaL’s XInclude Support
 
XMetaL Dialog Odds & Ends
XMetaL Dialog Odds & EndsXMetaL Dialog Odds & Ends
XMetaL Dialog Odds & Ends
 
XMetaL and DITA in the Marketing Department: Tastes Great, Less Filling
XMetaL and DITA in the Marketing Department: Tastes Great, Less FillingXMetaL and DITA in the Marketing Department: Tastes Great, Less Filling
XMetaL and DITA in the Marketing Department: Tastes Great, Less Filling
 

Kürzlich hochgeladen

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Kürzlich hochgeladen (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

XMetaL Macros for Non-Programmers

  • 1. © 2010 JustSystems Inc.© 2010 JustSystems Inc. in 37 minutes Episode 15 XMetaL Macros for Non-Programmers Brought to you by XMetaL Technical Services Tom Magliery, XML Technology Specialist
  • 2. © 2010 JustSystems Inc. • Announcements • Introduction and your first macro • How to run a macro (5 ways) • Customizing the toolbar • User and event macros • Application and document macros • Notes for DITA users • Temptations • Summary • Resources • Q&A Agenda This slide makes me hungry for Skyline Chili. Bonus points if you know why.
  • 3. © 2010 JustSystems Inc. • Two new articles by our colleague Su-Laine: – Information Today (how businesses can learn about collaboration from Wikipedia): http://www.infotoday.com/it/nov10/index.shtml – CIDM Best Practices newsletter (localization in DITA): http://www.infomanagementcenter.com/index.php?page=1419 • Best wishes to Dave from marketing as he moves on today. The paddling feet below our webinars’ waterline will never be the same. Announcements
  • 4. © 2010 JustSystems Inc. • XMetaL macro: – A blob of script code that can be executed by XMetaL – A way to extend the functionality of XMetaL • MCR files aka macro files: – XMetaL customization files that contain XMetaL macros Introduction to XMetaL macros Sure, “blob” is a technical term.
  • 5. © 2010 JustSystems Inc. Your first macro: “Hello, world” DEMO_HelloWorld.mcr An MCR file is actually an XML file. Since script code often contains some of the five reserved XML characters: < > & ' ", it is wrapped in a CDATA section, which tells XML parsers not to treat these characters as markup. Source code already on Slide 3? You said “non-programmers”! Yes. Trust me ...
  • 6. © 2010 JustSystems Inc. Your first macro: “Hello, world” DEMO_HelloWorld.mcr This is the name that XMetaL will use in the Macros toolbar, dialog, and other places. Source code already on Slide 3? You said “non-programmers”! Yes. Trust me ...
  • 7. © 2010 JustSystems Inc. Your first macro: “Hello, world” DEMO_HelloWorld.mcr This tells XMetaL what scripting language this macro uses. Source code already on Slide 3? You said “non-programmers”! Yes. Trust me ...
  • 8. © 2010 JustSystems Inc. Your first macro: “Hello, world” DEMO_HelloWorld.mcr This is the script code to be executed whenever this macro is run. Source code already on Slide 3? You said “non-programmers”! Yes. Trust me ...
  • 9. © 2010 JustSystems Inc. 1. Create an MCR file with a macro DEMO_HelloWorld.mcr 2. Put the MCR file in the “Startup” folder C:Program FilesXMetaL 6.0AuthorStartUp 3. Restart XMetaL 4. Run the macro – How? Adding your macro to XMetaL
  • 10. © 2010 JustSystems Inc. • Option 1: Run from the Macros dialog How to run your macro
  • 11. © 2010 JustSystems Inc. • Option 2: Run from the Macros toolbar – Select a macro, then click the “Run” button How to run your macro New personal best: Most annoying thing I’ve ever put on a PowerPoint slide. Run 1 2
  • 12. © 2010 JustSystems Inc. • Option 3: Use a shortcut key – TIP: You can edit MCR files in XMetaL (also in any text editor). Then you need to refresh/reload the macros for macro changes to take effect. How to run your macro DEMO_HelloWorld.mcr
  • 13. © 2010 JustSystems Inc. • Option 4: Add a custom menu or toolbar item – But first, let’s see a more useful macro How to run your macro
  • 14. © 2010 JustSystems Inc. Macro #2: Word Count DEMO_WordCount.mcr I can tell you how this script code works later, if we have time. It’s not perfect.
  • 15. © 2010 JustSystems Inc. • You can put more than one macro in a single MCR file • It looks something like this TIP: Multiple macros per file ManyMacrosInOneFile.mcr For ease-of-demo reasons, I’m not doing that today.
  • 16. © 2010 JustSystems Inc. • Now back to Option 4: Add a custom menu or toolbar item How to run your macro Start with a right-click in the toolbars 1 Select “Customize...” 2
  • 17. © 2010 JustSystems Inc. • Now back to Option 4: Add a custom menu or toolbar item How to run your macro Click “New...” 3 Name your toolbar4
  • 18. © 2010 JustSystems Inc. • Now back to Option 4: Add a custom menu or toolbar item How to run your macro Select the Buttons tab 5 Select “Application Macros” 6 Select your macro 7 Choose an icon for your macro8
  • 19. © 2010 JustSystems Inc. • Now back to Option 4: Add a custom menu or toolbar item How to run your macro Drag the icon to the toolbar9
  • 20. © 2010 JustSystems Inc. • Important notes: – When adding toolbar buttons for application macros, close all documents first – Customizing the toolbars (or menus) manually is fine for “simple” situations, but for more complex customization it is better to manipulate them with script (more script!) • Advanced topics: – Saving/sharing your toolbar settings – Where XMetaL “hides” TBR files • Toolbar cache & per-user folder – Customizing menus/toolbars with script Customizing toolbars
  • 21. © 2010 JustSystems Inc. • Option 5: Add to the context (right-click) menu – But first, we need to learn about event macros How to run your macro
  • 22. © 2010 JustSystems Inc. • Our examples so far are user macros – XMetaL runs one whenever you request it • XMetaL also supports event macros – XMetaL runs them automatically when system events occur – The magic is in the name of the macro – “On_” prefix indicates that it is an event macro – XMetaL recognizes certain event names – You can have multiple event macros with the same name – in most cases they will all be run. (With user macros, only one will run.) User vs. event macros
  • 23. © 2010 JustSystems Inc. – Whenever we open any document, this macro will display some information about that file Macro #3: When a document is opened DEMO_OnDocOpenComplete.mcr
  • 24. © 2010 JustSystems Inc. – Use this to hide event macros from the Macros toolbar and dialog TIP: Hiding a macro DEMO_OnDocOpenComplete.mcr
  • 25. © 2010 JustSystems Inc. • Now back to Option 5*: Add it to the context (right-click) menu – Note: This is a simplified example; maybe not “best practice” but it will work for the demo – “Best practice” is another advanced topic How to run your macro *Finally!! DEMO_ContextMenu.mcr
  • 26. © 2010 JustSystems Inc. • Our examples so far are application macros – Loaded at application startup – Available no matter what type of document you are working in (DITA, DocBook, ...) – Also must be coded to handle any document type • Can’t have script that relies on specific element names • XMetaL also supports document macros – MCR file is named “YourDTDName.mcr” and (usually) lives with other YourDTDName files (CSS, CTM, etc.) – Loaded the first time a document is opened – Available only if the active document is that type Application vs. document macros DTD name or schema name, of course.
  • 27. © 2010 JustSystems Inc. – TIP: You can run macros from other macros. (Need to be sure they have been loaded first.) Example: Add macros to Journalist partial code, paste this into journalist.mcr
  • 28. © 2010 JustSystems Inc. • Most of the DITA features in XMetaL are macros – mostly document macros – E.g. adding a conref is a macro that launches the (custom- built) dialogs that let you browse for the target, then inserts the conref attribute • Script is far more complex than today’s examples • Adding simple application macros to XMetaL will usually work with DITA – All of today’s samples work fine • Adding document macros for DITA to XMetaL is “not allowed” – There are a few exceptions: special “hooks” – This is an advanced topic for sure! Some notes for DITA users
  • 29. © 2010 JustSystems Inc. • Adding custom dialogs and wizards • Transforming legacy content • Importing data from databases • Processing/analyzing content • Working with ActiveX objects • Handling drag-and-drop from other apps • Improving authors’ user experience • Automatically navigating through documents • Generating content, e.g., TOC or index • Capturing and pre-processing user input • Hiding parts of the XMetaL UI • Providing shortcuts for repetitive operations • Adding custom UI to the Resource Manager Temptations
  • 30. © 2010 JustSystems Inc. • Macros ... – are blobs of executable script code – can be user-invoked (many ways) or event-based – can be application-wide or document-type-specific – can run other macros – can do lots of different things • XMetaL APIs – your subconscious has seen six: – Application.Alert(), Application.AppendMacro(), Application.Run(), ActiveDocument.FullName, ActiveDocument.Xml, Application.MessageBox() • There are over 1200 properties and methods! Summary: what have we learned?
  • 31. © 2010 JustSystems Inc. • Customization Guide: – General guide to customizing XMetaL – Some topics assume you are using XMetaL Developer (Visual Studio) • We’ve been “hand-editing” today, which is fine • Programmer’s Guide: – Complete reference guide to the XMetaL API • Both are available here (PDF and WebHelp): http://na.justsystems.com/content-support-user-guides XMetaL developer resources
  • 32. © 2010 JustSystems Inc. • XMetaL Community Forums – http://forums.xmetal.com/ • JustSystems Partner Center – http://justpartnercenter.com/ • Ask us for help (customer support) – supportxmetal@justsystems.com • Ask us for help (partner tech support) – partnersupport-na@justsystems.com Resources