Post it notes App

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • ghobii
    Forum Member
    • Jan 2003
    • 69

    Post it notes App

    Hi,
    as a non-programmer trying to learn a little programming while creating a small app for myself, I am attempting to create a post-it notes style program. Most of the many available have way more functions then I want or don't function the way I would like, so I am trying to make my own.
    Could someone tell me the basic flow I will need to create in order to do this? I just want a general outline that I could attempt to figure out on my own.
    The functionality I am looking for would be a simple text box that sits on your desktop that you could type into. Hitting a button or key combo would then save the note. But to create the next note, I don't want to open a new text box, just continue typyng in the same one but the program would see it as a seperate entity. Maybe each note would have a box around it?
    Also, once the box was filled I would need to make scrollbars appear.

    So far I have figured out that I need an input box to type into, but am not sure how to save the text so that it will display when I run the program again.

    TIA for any suggestions.
  • Desmond
    Indigo Rose Staff Member
    • Jul 2003
    • 710

    #2
    Hello,

    If I understand what you want to do, place the following script in the respective events:

    Put this code on the On Shutdown event of your project:
    Code:
    sText = Input.GetText("Input1");
    Application.SaveValue("Post-It-Note", "Whatever_Key", sText);
    Put this code on the On Startup event of your project:
    Code:
    sText = Application.LoadValue("Post-It-Note", "Whatever_Key");
    Input.SetText("Input1", sText);
    Hope that helps!

    Comment

    • ghobii
      Forum Member
      • Jan 2003
      • 69

      #3
      That doesn't seem to work for some reason.
      Also I noticed that the input box doesn't seem to wrap text so it isn't very useful displaying text.
      Could I somehow grab the text from the input box and hit a button to display it in a listbox object?
      Is it possible to write to a XML file somehow to save the data?

      Comment

      • ghobii
        Forum Member
        • Jan 2003
        • 69

        #4
        OK,
        Here is what I have done so far.
        I have an input box where I type my note. I then click a button to send it to a list box. This works just like I want, except...
        If the note is too long the listbox doesn't wrap it. I couldn't find any hint of how to do this so as a work around I tried making it work so that if you clicked on a note in the listbox, it would write it to a second input box (the only object I could find that would wrap text). I am trying to do this like this:

        listnumber = ListBox.GetSelected("ListBox1");
        listxt = ListBox.GetItemText("ListBox1", listnumber);
        Input.SetText("Input2", listxt);

        But this is not producing any output to the input2.

        Any ideas how I can do this, or a better approach over all?

        Comment

        • Stefan_M
          Indigo Rose Customer
          • Nov 2003
          • 315

          #5
          Hi,

          >> If the note is too long the listbox doesn't wrap it. <<
          Did you Enable Multiline in the Input Object?

          listnumber = ListBox.GetSelected("ListBox1");
          listxt = ListBox.GetItemText("ListBox1", listnumber);
          Input.SetText("Input2", listxt);

          "ListBox.GetSelected" returns a table so you have to use an index
          listxt = ListBox.GetItemText("ListBox1", listnumber[1]);





          Stefan
          "With a rubber duck, one's never alone."

          Douglas Adams, The Hitchhiker's Guide to the Galaxy

          Comment

          • ghobii
            Forum Member
            • Jan 2003
            • 69

            #6
            The multiple lines is on in the input, it just doesn't transfer that way to the list.
            The change you suggested in grabbing the list item contents worked. Thanks.
            The next problem is, how do I save the list items to read back in when I launch the program again?

            Comment

            • Stefan_M
              Indigo Rose Customer
              • Nov 2003
              • 315

              #7
              One way to save the info is to work with files.



              Stefan
              Attached Files
              "With a rubber duck, one's never alone."

              Douglas Adams, The Hitchhiker's Guide to the Galaxy

              Comment

              • ghobii
                Forum Member
                • Jan 2003
                • 69

                #8
                That looks like it will do the trick. And much simpler too.
                That probably took you all of 5 minutes to put together too I bet. After I have struggled for hours trying to do it.
                Oh Well, I learned alot anthat was the intent.
                Thanks for all your help!

                Comment

                • ghobii
                  Forum Member
                  • Jan 2003
                  • 69

                  #9
                  One more thing...
                  How could I delete a note as well as the txt file that stores it's content.?
                  This would allow titles that reflected the contents, rather then just reusing note_001, note_002....
                  And how could you make it work by pressing the "delete" key?

                  Comment

                  • ghobii
                    Forum Member
                    • Jan 2003
                    • 69

                    #10
                    Nevermind, I figured it out.
                    Holy crap, I actually figured it out!

                    Comment

                    Working...
                    X