• Lucid Dreaming - Dream Views




    Results 1 to 6 of 6
    Like Tree11Likes
    • 1 Post By <span style='color: #9900CC'>~Dreamer~</span>
    • 3 Post By spellbee2
    • 4 Post By CanisLucidus
    • 2 Post By <span style='color: #9900CC'>~Dreamer~</span>
    • 1 Post By spellbee2

    Thread: Macros for Dream Journal

    1. #1
      Member <span style='color: #9900CC'>~Dreamer~</span>'s Avatar
      Join Date
      Aug 2012
      LD Count
      Gender
      Location
      Australia
      Posts
      1,451
      Likes
      4187
      DJ Entries
      129

      Macros for Dream Journal

      I'm wondering if there are any smart techies who might be able to help me with some code.
      I usually write my dream journal entries offline in MS Word and then post them to DV at a later time.
      I currently have macros set up to convert all of my font formatting and alignment to BBCode so it's good to go when I transfer it.
      One thing I do manually is add links to the profile page of any member who features in my DJ. This happens a lot, with various members, so I'm hoping to find a way to automate this process.

      What I currently do is leave a // tag to remind me to add links when I get to DV.
      What I'd ideally like to do is convert every //Username to this:

      [B][URL="http://www.dreamviews.com/members/Username/"]Username[/URL][/B]

      Spaces in usernames would also need to be replaced with + symbols in the URL, but there are only a couple of members with spaces in their names who tend to feature in my dreams anyway, so I'd be happy to keep doing those manually if necessary, or I could write those name conversions as separate instructions in the macro.

      Anyway, if someone could suggest a way to find //wildcards and insert matching text into the URL, that would be amazing!

      As a cookie (if you want,) I can summon you in a lucid dream and we'll do an activity / go on an adventure of your choosing.
      I'll be sure to use my new macro to add a link to your profile in my DJ.

      Thank you!
      CanisLucidus likes this.


      Raised by: PercyLucid ✦ Adopted: lucidmats ✦ Dreaming Partner: CanisLucidus

    2. #2
      Administrator Achievements:
      Made lots of Friends on DV Tagger Second Class Populated Wall 10000 Hall Points 1000 Hall Points Vivid Dream Journal Referrer Bronze Veteran First Class
      spellbee2's Avatar
      Join Date
      Jun 2013
      LD Count
      Like a lot
      Gender
      Location
      Florida
      Posts
      1,672
      Likes
      3491
      DJ Entries
      95
      Well, a fairly non-simple macro-free way to do it is to use wildcards in the Find and Replace dialog box. First, click "Replace" on the Home tab (assuming you're in Word 2007 or later. If not, then press CTRL+F to go to Find, and then click the tab for Replace). Then, click "More >>" at the bottom. Check the box next to "Use wildcards". Then, fill in the fields like so:



      The //(<*>) will search for a single word after the "//", so keep in mind that this will only work with one-word usernames.

      I'm not really experienced with Office Macros, but after enough Googling, I could probably throw something together if you want. Only suggestion I would have would be to also include something to mark the end of the username so the macro can distinguish between actual usernames and normal words. For example, instead of //Two Words, I would suggest //Two Words//, /*Two Words*/, or [Two Words], to prevent the macro from thinking the username is just "Two".

      But anyway, I threw the Find and Replace method in there as a temporary solution until I can possibly make a macro.
      CanisLucidus, ~Dreamer~ and Box77 like this.
      "Going through life worrying about the little things is like cooking with motor oil instead of cooking oil. Sure, you can still probably pull it off, but it'll leave a bad taste in your mouth in retrospect." - Me, apparently

      2015: 101 LDs, 2016: 114 LDs, 2017: 38 LDs, 2018: 20 LDs, 2019: 8 LDs

      DreamViews Discord!

    3. #3
      Member Achievements:
      Tagger First Class Made lots of Friends on DV Populated Wall Huge Dream Journal Referrer Bronze 10000 Hall Points Veteran First Class
      CanisLucidus's Avatar
      Join Date
      Aug 2012
      LD Count
      266
      Gender
      Posts
      1,681
      Likes
      7290
      DJ Entries
      271
      Nice find and replace idea, spellbee2, thanks! I've whipped up a Word macro that uses your excellent wildcard idea along with additional special code for adding two-word usernames or usernames with special characters. It also appears that names with underscores confuse that "find" wildcard pattern.

      If you want to add a two-word username, you can just add items to the "replacements" array. I've also added "Dark_Merlin" here so that he works properly.

      Dreamer and I have both tested it out and it seems to be working!

      Here's the code for the macro for anyone that's interested:
      [VB.NET] DreamViews Word Macro - Pastebin.com

      The macro looks for strings like "$$lucidmats" or "$$CanisLucidus" and changes them to a [b][url=...]lucidmats[/url][/b] sequence.

      Note: This is my first time ever writing or using a Word macro. And first time using VB in 12 years. So nobody take this as an example of how to program.
      Last edited by CanisLucidus; 09-11-2014 at 05:19 PM.

      Dreaming Partner: Dreamer


    4. #4
      Member <span style='color: #9900CC'>~Dreamer~</span>'s Avatar
      Join Date
      Aug 2012
      LD Count
      Gender
      Location
      Australia
      Posts
      1,451
      Likes
      4187
      DJ Entries
      129
      Thank you sooo much, spellbee! This was super helpful!

      CanisLucidus used your idea and added an extra part for names with spaces that I can add to as I go. (I totally added that name link with this macro!)
      Here is what he came up with, if you're interested. I've already added some of the members with spaces/underscores that I dream of sometimes:

      Spoiler for Code:

      Thank you, my awesome nerdy friends! Much appreciated!
      Would you like a dream, spellbee?

      EDIT: Oh, Canis ninja'd me! Haha, d'oh!

      EDIT 2: Now that you're here Canis, I can thank you again! Thank youuu! You are amazing!
      You know you can make dream requests any time, too!
      Last edited by ~Dreamer~; 09-11-2014 at 05:15 PM.
      CanisLucidus and Box77 like this.


      Raised by: PercyLucid ✦ Adopted: lucidmats ✦ Dreaming Partner: CanisLucidus

    5. #5
      Administrator Achievements:
      Made lots of Friends on DV Tagger Second Class Populated Wall 10000 Hall Points 1000 Hall Points Vivid Dream Journal Referrer Bronze Veteran First Class
      spellbee2's Avatar
      Join Date
      Jun 2013
      LD Count
      Like a lot
      Gender
      Location
      Florida
      Posts
      1,672
      Likes
      3491
      DJ Entries
      95
      Glad I could help.

      Quote Originally Posted by ~ Dreamer ~ View Post
      Would you like a dream, spellbee?
      Ha ha, sure. You can decide the adventure, just make it something cool.
      ~Dreamer~ likes this.
      "Going through life worrying about the little things is like cooking with motor oil instead of cooking oil. Sure, you can still probably pull it off, but it'll leave a bad taste in your mouth in retrospect." - Me, apparently

      2015: 101 LDs, 2016: 114 LDs, 2017: 38 LDs, 2018: 20 LDs, 2019: 8 LDs

      DreamViews Discord!

    6. #6
      Member Achievements:
      Created Dream Journal Tagger First Class Made lots of Friends on DV Veteran First Class 5000 Hall Points
      Box77's Avatar
      Join Date
      Mar 2008
      LD Count
      In DV +216
      Gender
      Location
      In a Universe
      Posts
      992
      Likes
      1135
      DJ Entries
      88
      Perhaps it's just a silly question of mine, but How safe is to allow the use of macros in MS word? As far as I can remember there were always problems that exploited this function activated in this program, and that was one of the reasons why I didn't mind the use of this feature when I had it at hand, although I see it could be very useful under certain circumstances. Anyway, just wondering.

    Similar Threads

    1. Connection between Waking Journal and Dream Journal - Coincedence??
      By ElMareci in forum Dream Signs and Recall
      Replies: 2
      Last Post: 04-23-2011, 03:01 PM
    2. Waking Life Journal Helps Boost Dream Journal/Recall
      By Helvellyn in forum Dream Signs and Recall
      Replies: 0
      Last Post: 10-24-2008, 01:10 AM
    3. wet?dreamer's Dream Journal - AKA The LOL journal
      By TeaSea in forum Dream Journal Archive
      Replies: 2
      Last Post: 07-09-2007, 08:38 PM
    4. Macros? Or binding or whatever.
      By Beef Jerky in forum Senseless Banter
      Replies: 4
      Last Post: 07-28-2006, 07:32 PM
    5. Free Journal/Dream Journal Software?
      By CommieX in forum Dream Signs and Recall
      Replies: 2
      Last Post: 08-10-2005, 10:49 AM

    Bookmarks

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •