AutoShare How to alter text to make them markdown-friendly

Discussion in 'AutoApps' started by JoinBubble, Sep 25, 2016.

  1. JoinBubble

    JoinBubble New Member

    Joined:
    Feb 7, 2016
    Messages:
    9
    Likes Received:
    0
    Hi Joaoa,

    I looked at the tutorials but couldn't find anything that would help with something that alters the text without the help of an additional service, not that I'd mind using one, but it would seem unnecessary.

    What my goal is to insert text between a set of words, at the start and end of words, and the beginning and end of a set of words. So it's basically markdown formatting syntax applied to highlighted text, but with the ability to tweak and create rules at will, if you say.

    Thanks in advance.
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Hi, can you please give me a concrete example on what you'd like to do? :) Like a specific example of a markdown and what the result would be. Thanks
     
  3. JoinBubble

    JoinBubble New Member

    Joined:
    Feb 7, 2016
    Messages:
    9
    Likes Received:
    0
    Bold would be *bold*
    Italics would be _italics_
    System text / Fixedsys would be `System Text`
    Hyphenated text would be hyphenated-text-like-this (not markdown, but useful)
    More could be added, but those are the main ones.
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Ok, I've made it possible now. Here's an example that'll handle the bold example you provided:

    Profile: Format Text (86)
    Event: AutoShare Process Text [ Configuration:Text Processor: Format ]
    Enter: Anon (87)
    A1: Variable Set [ Name:%astext To:hello *bold* stuff Do Maths:Off Append:Off ] If [ %astext !Set ]
    A2: Flash [ Text:%astext Long:Off ]
    A3: AutoTools Regex [ Configuration:Text: %astext
    Regex: \*(?<bold>[^\*]+)\*
    Detect Url: false
    Use Javascript: false
    Get Multiple Results: true Timeout (Seconds):60 ]
    A4: For [ Variable:%bold Items:%bold() ]
    A5: Variable Search Replace [ Variable:%astext Search:\*%bold\* Ignore Case:Off Multi-Line:Off One Match Only:Off Store Matches In: Replace Matches:On Replace With:<b>%bold</b> ]
    A6: End For
    A7: Flash [ Text:%astext Long:Off ]
    A8: AutoShare Process Text [ Configuration:processed Text: %astext Timeout (Seconds):60 ]

    This will work with this version of the app: https://dl.dropboxusercontent.com/u/9787157/apk/AutoShare.apk
     
  5. JoinBubble

    JoinBubble New Member

    Joined:
    Feb 7, 2016
    Messages:
    9
    Likes Received:
    0
    Thanks so much for that! How do I add it to the program? So far all I know is how to name something.
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    What do you mean by "name something"?
     

Share This Page