• Lucid Dreaming - Dream Views




    Results 1 to 17 of 17
    1. #1
      Member anonymous-coward's Avatar
      Join Date
      Sep 2006
      Posts
      12
      Likes
      0
      I often forget to do reality checks while on the computer, so I decided to write a program that does the remembering for me. Every hour it will display a message box which asks if you are dreaming, which is your cue to do a check. Simple, but enough to remind you.

      If anyone else is interested, I have posted the C source code below and have attached the exe too. Because the board is a pain and won't let me upload files that contain ".exe", I renamed it to "reality_checker.txt" so it would upload. Once you download it rename it back to "reality_checker.exe" and run it as normal.

      Also there is no need to open it more than once. It will stay running until you either restart/turn off your computer or kill it from the "Processes" tab in the Taskmanager.

      If you aren't into software development and still want to give a try at compiling it then I can walk you through it, just post here.

      If you have any suggestions on how to make this better or more useable, then tell me and I will try to get to adding it when I have some time.

      Screenshot: http://img77.imageshack.us/my.php?image=reminderxx4.png (the background is my desktop background, it will show yours instead of the one in the picture).

      Code:
      //Program is free to use or modify for any purpose.
      //to compile: 
      //gcc reality_checker.c -o reality_checker -s -mwindows
      
      #include <windows.h>
      #include <stdio.h>
      
      int main(){
      ****HDESK blank_desktop = 0; //our blank desktop
      ****HDESK normal_desktop = 0; //normal desktop
      ****SYSTEMTIME current_time; //current system time
      ****char status_message[512]; //error message/alert message
      ****int previous_hour = -1; //last hour message was displayed
      ****
      ****
      ****blank_desktop = CreateDesktop("blankdesktop", 0, 0, 0, GENERIC_ALL, 0); //create the desktop
      ****normal_desktop = GetThreadDesktop(GetCurrentThreadId()); //current
      ********
      ****if(!blank_desktop || !normal_desktop){ //check errors
      ********sprintf(status_message, "Failed to create blank desktop, with error code: %i", (int)GetLastError());
      ********MessageBox(0, status_message, 0, MB_ICONSTOP);
      ********return 0;
      ****}
      ****
      ****
      ****while(1){ //loop and check time
      ********//check time
      ********GetSystemTime(&current_time);
      ********if(previous_hour != current_time.wHour){ //show message
      ************SwitchDesktop(blank_desktop);
      ************SetThreadDesktop(blank_desktop);
      ************sprintf(status_message, "The current time is %i:%i (GMT) of %i/%i/%i", current_time.wHour, current_time.wMinute, 
      ************************current_time.wYear, current_time.wMonth, current_time.wDay);
      ************MessageBox(0, status_message, " ", MB_ICONINFORMATION);
      ************sprintf(status_message, "Are you really awake?");
      ************if(MessageBox(0, status_message, " ", MB_ICONQUESTION | MB_YESNO) == IDNO){
      ****************sprintf(status_message, "Hmmm, maybe you are correct. Just don't do anything you will regret&#59;-)");
      ****************MessageBox(0, status_message, " ", MB_ICONINFORMATION);
      ************}else{
      ****************sprintf(status_message, "Maybe so, although don't always assume this!");
      ****************MessageBox(0, status_message, " ", MB_ICONINFORMATION);
      ************}
      ************SwitchDesktop(normal_desktop);
      ************SetThreadDesktop(normal_desktop);
      ************previous_hour = current_time.wHour;
      ********}
      ********Sleep(180000); //pause for 180,000 milliseconds (3 minutes)
      ****}
      }
      Enjoy!
      Attached Files

    2. #2
      Member
      Join Date
      Jan 2007
      Location
      USA
      Posts
      49
      Likes
      0
      Thanks for this! Now I can master my RC.

    3. #3
      Member
      Join Date
      Dec 2006
      Gender
      Location
      Australia
      Posts
      86
      Likes
      1
      Wow haha thats really really neat! Now i can take the lil-sticki notes of (are you dreaming) off my wall.

    4. #4
      Banned
      Join Date
      Jan 2007
      Gender
      Location
      Florida
      Posts
      1,319
      Likes
      0
      Wow, this is a great! Now I can try to see if RCs really will work out for me... Now if only I knew how to run this stuff right (unfortunately, I'm a dunce whn it comes to these things...)

    5. #5
      Member
      Join Date
      Mar 2006
      Location
      California
      Posts
      19
      Likes
      0
      Wow, thanks this is great, i wish I thought of it first...

    6. #6
      Wanderer Merlock's Avatar
      Join Date
      Sep 2005
      Gender
      Location
      On a journey
      Posts
      2,039
      Likes
      4
      Great idea but one tip: make the question "Is this a dream?" instead of "Are you awake?"
      The very concept of dreaming should be present in the phrase to make it more effective overall as well as such phrasing just being a better overall wording for reality checks: "Am I dreaming?", "Is this a dream?", etc. instead of "Am I awake?", "Am I not dreaming?", etc.

    7. #7
      Member DriftingLeaves's Avatar
      Join Date
      Jan 2007
      Posts
      19
      Likes
      1
      Hmm. I just downloaded it and I hope it works. Does it pop up every hour starting from when I first opened it? Or every hour according to a global clock?

      Is there anything I need to do prior to it working? Or is it already functional?

    8. #8
      Member ~Erin~'s Avatar
      Join Date
      Jan 2007
      Gender
      Location
      Ontario, Canada
      Posts
      647
      Likes
      2
      Thanks!

      I justed Downloaded it. All you had to do was rename it once aftering downloading it right?

      Hope it works!


    9. #9
      I *AM* Glyphs! Achievements:
      1 year registered 5000 Hall Points Referrer Bronze Veteran First Class
      Keeper's Avatar
      Join Date
      Sep 2006
      Gender
      Location
      UCT or home - depends what time you catch me :P
      Posts
      2,130
      Likes
      3
      cool backround, and bril idea

      I might download it later, but I'm cool right now
      "There are people who say there is no God, but what makes me really angry is that they quote me for support of such views." ~Albert Einstein

      Ask meWay BackYour SoulMy Dream Story (Chapter two UP!) •


    10. #10
      Member ~Erin~'s Avatar
      Join Date
      Jan 2007
      Gender
      Location
      Ontario, Canada
      Posts
      647
      Likes
      2
      Quote Originally Posted by ;365939
      Thanks!

      I justed Downloaded it. All you had to do was rename it once aftering downloading it right?

      Hope it works!
      [/b]
      heh.. I thinking I'm going to need some tutoring!
      Nothing showed . Does it matter where you saved it on the computer?

    11. #11
      Member
      Join Date
      Jan 2007
      Location
      USA
      Posts
      49
      Likes
      0
      You should be able to just download that txt, rename it from xxx.txt to xxx.exe and it will work.

      It will actually prompt you about changing the file extension. If you don't get a prompt you need to go into a folder (eg, My Documents).

      Then click "Tools" -> "Folder Options" -> "View" tab -> and Un-Check "Hide Extensions for Known File Types".

      Now, all your files will show the extension, or format, in their name. So all your pictures will say: Pic1.png. Etc, etc.. etc..

      So then you should be able to rename the txt to an exe.

    12. #12
      Member ~Erin~'s Avatar
      Join Date
      Jan 2007
      Gender
      Location
      Ontario, Canada
      Posts
      647
      Likes
      2
      I clicked on it and it works! though, It does the same thing automatic every hour right?
      and can I change the setting back "Hide Extensions for Known File Types" after I saw the text turn to exe?

    13. #13
      Member
      Join Date
      Jan 2007
      Location
      USA
      Posts
      49
      Likes
      0
      Yeah, it's fine to change it back

    14. #14
      Member ~Erin~'s Avatar
      Join Date
      Jan 2007
      Gender
      Location
      Ontario, Canada
      Posts
      647
      Likes
      2
      Thank you

    15. #15
      Member
      Join Date
      Jan 2007
      Location
      Betting my soul on a rigged card game with death
      Posts
      17
      Likes
      0
      Awesome. Just one question. Do you gotta click it every day or does it start automatically?
      Lol, internet.

    16. #16
      Member NightmareOnElmStreet's Avatar
      Join Date
      Dec 2006
      Location
      cali
      Posts
      94
      Likes
      0
      AHH!!

      every hour? mines coming on like every 15 minutes! how do I stop this? getting so annoying now
      Lucid Dreams: 3


      http://thumbs.dreamstime.com/thumb_5/11035194063ITC4F.jpg



    17. #17
      Member anonymous-coward's Avatar
      Join Date
      Sep 2006
      Posts
      12
      Likes
      0
      every hour? mines coming on like every 15 minutes! how do I stop this? getting so annoying now[/b]
      Every hour, meaning within the first 3 or so minutes of each hour. If you started it at 59 past the hour you will get another alert within 1 to 4 minutes once the next hour occurs. Beyond the initial startup it shouldn't occur any closer than that, unless you ran opened the program more than once.

      Do you gotta click it every day or does it start automatically?[/b]
      Depends. If you keep your computer on or on standby then no. If instead of shutting down your computer, you put it on hibernate, then no. If you do shutdown your computer then yes, everytime you restart you must run it again.

      If you want it to start automatically on boot up, then place the exe file into:
      C:&#092;Documents and Settings&#092;<put your logon username here>&#092;Start Menu&#092;Programs&#092;Startup

      I clicked on it and it works&#33; though, It does the same thing automatic every hour right?
      and can I change the setting back "Hide Extensions for Known File Types" after I saw the text turn to exe?[/b]
      Yes, to both questions.

    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
    •