Document Event-Driven Macros

This section describes how to assign scripts to application, document or form events.

You can automatically execute a macro when a specified software event occurs by assigning the desired macro to the event. The following table provides an overview of document events and at what point an assigned macro is executed.

සිද්ධිය

පැවරූ මැක්‍රෝචක් ක්‍රියාත්මක කරන ලදි...

routine

යෙදුම අරඹන්න

...after a LibreOffice application is started.

OnStartApp

යෙදුම වසන්න

...LibreOffice වැඩසටහනක් අවසන් කිරීමට පෙර.

OnCloseApp

ලිපිය සාදන ලදි

...New document created with File - New or with the New icon. Note that this event also fires when Basic IDE opens.

OnCreate

නව ලේඛනය

...ගොනුව - නව හෝ නව අයිකනය සමඟ නව ලේඛයක් තැනූ පසු.

OnNew

ලේඛනය පූරණය වීම අවසන් විණි

...before a document is opened with File - Open or with the Open icon.

OnLoadFinished

ලේඛය සුරකින්න

...ගොනුව - විවෘත කරන්න හෝ විවෘත කරන්න අයිකනය සමඟ ලේඛයක් විවෘත කල පසු.

OnLoad

ලිපිය වැසීමට යයි

...ලේඛයක් වැසීමට පෙර.

OnPrepareUnload

ලේඛය වසන ලදි

...ලේඛයක් වැසූ පසු. "ලේඛය සුරකින්න" සිද්ධිය ලේඛය වැසීමට පෙර සුරැකි විටද මතු විය හැකි බව සටහන් කර ගන්න.

OnUnload

-no UI-

OnLayoutFinished

දසුන තනන ලදි

Document is displayed. Note that this event also happens when a document is duplicated.

OnViewCreated

දසුන වැසීමට යයි

Document layout is getting removed.

OnPrepareViewClosing

දසුන වසන ලදි

Document layout is cleared prior to the document closure.

OnViewClosed

ලේඛය සක්‍රිය කරන්න

...ලේඛයක් පෙරබිමට ගෙනා ආ පසු.

OnFocus

ලේඛය අක්‍රිය කරන්න

...තවත් ලේඛයක් පෙරබිමට ගෙනා ආ පසු.

OnUnfocus

ලේඛය සුරකින්න

...ලේඛ නාමයක් දැනටමත් විශේෂණය කර ඇති විට ගොනුව - සුරකින්න හෝ සුරකින්න අයිකනය සමඟ ලේඛය සුරැකීමට පෙර.

OnSaveAs

ලේඛය සුරැකී ඇත

...ලේඛ නාමයක් දැනටමත් විශේෂණය කර ඇති විට ගොනුව - සුරකින්න හෝ සුරකින්න අයිකනය සමඟ ලේඛය සුරැකීමෙන් පසු.

OnSaveDone

ලිපිය සුරැකීම අසාර්ථක විය

Document could not be saved.

OnSaveFailed

ලේඛය මෙලෙස සුරකින්න

...ලේඛයක් විශේෂණය කල නමක් යටතේ සුරැකීමට පෙර (ලේඛ නාමයක් තවමත් විශේෂණය කර නැත්නම්, ගොනුව - ලෙස සුරකින්න, හෝ ගොනුව - සුරකින්න හෝ සුරකින්න අයිකනය සමඟ).

OnSaveAs

ලේඛය මෙලෙස සුරැකී ඇත

...ලේඛයක් විශේෂණය කල නමක් යටතේ සුරැකූ පසු (ලේඛ නාමයක් තවමත් විශේෂණය කර නැත්නම්, ගොනුව - ලෙස සුරකින්න, හෝ ගොනුව - සුරකින්න හෝ සුරකින්න අයිකනය සමඟ).

OnSaveAsDone

'Save As' has failed

Document could not be saved.

OnSaveAsFailed

-no UI-

When the document disk location has changed, for example after a File - Save As action.

OnStorageChanged

ලිපියේ පිටපතක් ගබඩා කිරීම හෝ නිර්යාත කිරීම

...before a document is saved with File - Save a Copy, File - Export, File - Export as PDF or the Save icons.

OnCopyTo

ලිපියේ පිටපතක් තනා ඇත

...after a document is saved with File - Save a Copy, File - Export, File - Export as PDF or the Save icons.

OnCopyToDone

ලිපියේ පිටපතක් තැනීම අසාර්ථක විය

Document could not be copied or exported.

OnCopyToFailed

Print document

...after the Print dialog is closed, but before the actual print process begins. This event occurs for each copy printed.

OnPrint

-no UI-

...after document security settings have changed.

OnModeChanged

'වෙනස්විය' තත්වය වෙනස් විය

Modified state of a document has changed.

OnModifyChanged

ලිපියේ තේමාව වෙනස් කරන ලදි

When the document title gets updated.

OnTitleChanged

අනු සංරචක පූර්ණය විය

...after a database form has been opened.

OnSubComponentOpened

අනු සංරචක වසා දැමිනි

...after a database form has been closed.

OnSubComponentClosed

ආකෘතිපත්‍රයේ අකුරු මුද්‍රණය ආරම්භ විණි

...before printing form letters using File - Print or Tools - Mail Merge Wizard menus.

OnMailMerge

ආකෘතිපත්‍රයේ අකුරු මුද්‍රණය කිරීම අවසන් විණි

...after printing of form letters using File - Print or Tools - Mail Merge Wizard menus.

OnMailMergeFinished

Printing of form fields started

...before printing form fields.

OnFieldMerge

Printing of form fields finished

...after printing form fields.

OnFieldMergeFinished

පිටු ගණනේ වෙනස

When the page count changes.

OnPageCountChanged


note

Most events relate to documents, except OnStartApp, OnCloseApp, OnCreate and OnLoadFinished that occur at application level. OnSubComponentOpened, and OnSubComponentClosed events are fired by database's forms.


tip

Writer documents are triggering those specific events: OnLayoutFinished, OnMailMerge, OnMailMergeFinished, OnFieldMerge, OnFieldMergeFinished and OnPageCountChanged.


සිද්ධියකට මැක්‍රෝවක් පවරමින්

  1. මෙවලම් - රිසිකරණය කරන්න තෝරා සිද්ධි පටිත්ත ක්ලික් කරන්න.

  2. පැවරීම ගෝලීයව වලංගුද හෝ වත්මන් ලේඛය තුල පමණක් වලංගු වීමට ඔබට කැමතිද යන්න මෙහි සුරකින්න ලැයිස්තු කොටුවේ තෝරන්න.

  3. සිද්ධි ලැයිස්තුවෙන් සිද්ධිය තෝරන්න.

  4. තේරූ සිද්ධියට මැක්‍රෝව පැවරීමට මැක්‍රෝව ක්ලික් කර මැක්‍රෝව තෝරන්න.

  5. මැක්‍රෝව පැවරීමට හරි ක්ලික් කරන්න.

  6. සංවාදය වැසීමට හරි ක්ලික් කරන්න.

සිද්ධියකට මැක්‍රෝවක් පැවරීම ඉවත් කරමින්

  1. මෙවලම් - රිසිකරණය කරන්න තෝරා සිද්ධි පටිත්ත ක්ලික් කරන්න.

  2. මෙහි සුරකින්න ලැයිස් කොටුවේ අභිරුචි තේරීමෙන් ඔබට ඉවත් කිරීමට අවශ්‍ය ගෝලීය පැවරීමක්ද හෝ වත්මන් ලේඛයට පමණක් වලංගු පැවරීමක්දැයි තෝරන්න.

  3. සිද්ධි ලැයිස්තුවෙන් ඉවත් කිරීමට පැවරීම අඩංගු සිද්ධිය තෝරන්න.

  4. ඉවත් කරන්න ක්ලික් කරන්න.

  5. සංවාදය වැසීමට හරි ක්ලික් කරන්න.

In addition to assigning macros to events, one can monitor events triggered in LibreOffice documents.

Please support us!