Automic Workload Automation

Expand all | Collapse all

AE script syntax highlighting in documentation - need list of object attributes

nafetS

nafetSMar 20, 2018 04:27 AM

  • 1.  AE script syntax highlighting in documentation - need list of object attributes

    Posted Feb 03, 2015 09:48 AM
    Hi there

    I'm writing a configuration file for SyntaxHighlighter (http://alexgorbatchev.com/SyntaxHighlighter/download/). It's a Javascript that does Code - syntax highlighting for HTML formatted documentation. It's featured in many blogs as well as Confluence Wiki (for those who know it). Right now it features all common languages (C, C#, PHP, Javascript, Python and so on), however no AE Script. I'd like to change that.

    I've been able to do the necessary regular expressions & been able to extract all functions from the F1-help. However I struggle with extracting all the possible attribute names. So does anyone have a complete list of attributes? I would do a special highlighting for them. Once it's done I would release it to the community.

    Regards
    Joel


  • 2.  AE script syntax highlighting in documentation - need list of object attributes

    Posted Mar 24, 2015 11:48 AM
    This sounds really cool!!!!
    I haven't heard of this before, but it would be totally helpful.

    I would love to help you work on this, but need to read up on the tool. Can you post a screenshot of a small snippet of what you already have and need?


  • 3.  AE script syntax highlighting in documentation - need list of object attributes

    Posted Apr 30, 2015 08:02 AM
    Haven't forgot about the post but haven't been able to get the Wiki Team activating my change. I'm gonna do a screenshot tonight on my private wiki and possibly attach the script here.


  • 4.  AE script syntax highlighting in documentation - need list of object attributes

    Posted May 01, 2015 07:59 AM
      |   view attached
    Finally as promised. You can embed syntax highlighted AE code on every webbased solution by using http://alexgorbatchev.com/SyntaxHighlighter/ & the attached file.

    I love Confluence for documentation purpose, this screenshot has been done on my local system so this is just an example how it might look like.

    If you want to use it:
    - Download the TXT file and rename to .JS
    - Login to confluence, click the gear-wheel on the upper-right corner, settings, login with the admin account, goto code macro setup, choose "add new language" (or something like this) and upload the JS. Name the language "AEScript"

    b6hw7qbm9489.pnghttps://us.v-cdn.net/5019921/uploads/editor/ij/b6hw7qbm9489.png" width="959">

    What's not yet done is to give attributes an appropriate color for PUT_ATT etc.. That's why I needed the list ;-).

    Attachment(s)

    txt
    shBrushAEScript.txt   4 KB 1 version


  • 5.  AE script syntax highlighting in documentation - need list of object attributes

    Posted Nov 18, 2016 09:10 AM
    Terrific! I have already installed the file in our Confluence system. Thanks, Joel.


  • 6.  AE script syntax highlighting in documentation - need list of object attributes

    Posted Jul 27, 2017 11:59 AM
    Hey joel_wiesmann_automic, any chance you could update this to handle predefined variables like &$SYSTEM#? Currently, the syntax highlighting seems to handle these in a strange way, rendering the ampersand as its HTML entity & instead of a literal ampersand.
    v0sv0a2hilcp.png
    I’m guessing this involves editing this line, or adding another one like it just for predefined variables.
    { regex: /&\w+#?/g, css: 'variable' },
    Update: I fixed this by adding the following line:
    { regex: /&\$\w+#/g, css: 'constants' },


  • 7.  AE script syntax highlighting in documentation - need list of object attributes

    Posted Dec 07, 2017 09:08 AM

    Hi@Joel Wiesmann,

    ist die txt hier noch die aktuelle, oder gibt es da schon was neues?
    Würde die gern in Confluence verwenden.

    Gruß



  • 8.  AE script syntax highlighting in documentation - need list of object attributes

    Posted Dec 08, 2017 08:57 AM
    I am working on a version of joel_wiesmann_automic's syntax highlighting file updated for v12.1. I will post it soon.


  • 9.  AE script syntax highlighting in documentation - need list of object attributes

    Posted Dec 08, 2017 09:05 AM
    Sorry that I didn't get back on that. I was not  able to use my own prepared highlighting rules as the responsible team did not want to add new highlighting modules on the production environment..... so it got out of maintenance.


  • 10.  AE script syntax highlighting in documentation - need list of object attributes

    Posted Dec 08, 2017 10:15 AM
      |   view attached

    I have updated the syntax highlighting file to bring it up-to-date and add missing elements.

    List of changes:

    • Added missing OTHER keyword for :SWITCH ... :ENDSWITCH block.
    • Added the new script elements added to the AE in recent versions (e.g., GENERATE_SCRIPT_VARS).
    • Added the valid alternate forms/spellings/abbreviations of many script elements.
    • Added several deprecated script elements such as the the CINT and CSTR functions.
    • Added regex for predefined variables such as &$SYSTEM#. Predefined variables are treated as constants.
    • Added system/object attributes (e.g., ARCHIVE_KEY1). Attributes are treated as constants.
    • Removed regex that made most characters bold. (This resolved a problem with entitized < and > symbols.)


    This syntax highlighting file handles all of the public commands, functions, variables, and attributes listed in the highlight rules included in an AE v12.1 client trace. As such, I think it should be complete. If you identify an element that is not handled correctly, please let me know.

    Ping: joel_wiesmann_automic

    Attachment(s)



  • 11.  AE script syntax highlighting in documentation - need list of object attributes

    Posted Dec 14, 2017 09:45 AM
    After a few days of testing, I have installed the updated AE syntax highlighting file in our production wiki server. It works like a charm.
    bkuoqu1q30v2.pnghttps://us.v-cdn.net/5019921/uploads/editor/cc/bkuoqu1q30v2.png" width="869">


  • 12.  AE script syntax highlighting in documentation - need list of object attributes

    Posted Mar 20, 2018 04:27 AM

    Works fine.
    Thanks!



  • 13.  AE script syntax highlighting in documentation - need list of object attributes

    Posted Mar 20, 2018 04:40 AM
    We use confluence, too. That's a nice feature. Thanks a lot.


  • 14.  AE script syntax highlighting in documentation - need list of object attributes

    Posted Mar 20, 2018 04:47 AM
    ... and just to do some advertising. With Powershell and the WorkflowCommander module it's quiet easy-peacy to read process tabs from objects and push them into Confluence using REST ;-).