Action

Run RegEx Factory

Posted by RoyRogers, Last update over 4 years ago

Get original script here:
- https://actions.getdrafts.com/a/153
- Then save it as regular draft (script grammar),
- change the UUID in current script to point to to this draft.

Steps

  • script

    // Run RegEx Factory
    // Or any other script saved as draft.
    (() => {
      // Name of script:
      //     'Some script'
    
      // Get original script here:
      // - https://actions.getdrafts.com/a/153
      // - Then save it as regular draft (script grammar),
      // - change the UUID in current script to point to to this draft:    
    
      // UUID of the draft script (has to be changed before first run):
      const uuid = '401B8C95-29F9-4917-8364-0D769C71EE8F';
    
        try {
            eval( // line 12, so we adjust the error message alert below
                Draft.find(uuid).content
            )
        } catch (e) {
            alert(`
        Error: ${e.message}
        
        line: ${e.line}
        column: ${e.column}`)
        }
    })();

Options

  • After Success Default
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.