• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

How to create a menu selector or scroll bar

Scheduled Pinned Locked Moved SketchyPhysics
10 Posts 5 Posters 799 Views 5 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    roaddawg69
    last edited by roaddawg69 3 Jul 2011, 22:12

    I am needing to create a scroll bar for an LCD menu. Say five items in list, each list item has a box around it. Each box has a blue background with white text. When KEY("x") is pressed the scroll bar would advance to the next item and reverse the box colors to background white and text to blue.

    With each press it needs to advance to the next box while changing the colors on the box it's leaving from back to what they were before it was highlighted. Follow me? I would need it to keep looping from 1st box to last box then repeat back to 1st box. I'm sure this can be done with a script, but I wouldn't know how to write it anyone willing to help?

    Think of your TV's remote control, when in setup mode pressing a button scrolls though it's menu options.

    Is this possible with SP 3.2?

    Thanks
    Joe

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dave R
      last edited by 4 Jul 2011, 01:26

      😕 ❓

      Etaoin Shrdlu

      %

      (THERE'S NO PLACE LIKE)

      G28 X0.0 Y0.0 Z0.0

      M30

      %

      1 Reply Last reply Reply Quote 0
      • J Offline
        jeff hammond
        last edited by 4 Jul 2011, 01:45

        Is this something to do with sketchy physics?
        (is that what 3.2 means in the last question?)

        dotdotdot

        1 Reply Last reply Reply Quote 0
        • G Offline
          Gaieus
          last edited by 4 Jul 2011, 07:34

          @unknownuser said:

          Is this something to do with sketchy physics?

          I also guess so...

          Joe: we have a SP subforum. Would you like me to move your topic there?

          Gai...

          1 Reply Last reply Reply Quote 0
          • R Offline
            roaddawg69
            last edited by 4 Jul 2011, 12:30

            My bad....I don't know why I thought I was posting to the right group. Yes please move my post to your SP subform.

            Thanks
            Joe

            1 Reply Last reply Reply Quote 0
            • H Offline
              hpnisse
              last edited by 4 Jul 2011, 14:58

              Hey!

              I made a model that I think works with your requirements.
              "X" is used to move the menu.
              To see how it works: turn on "View Hidden Group", and the script is in the big box on the side.

              Hope this works. You can add several menu steps if you want that.

              Menu-options.skp

              ` /hpnisse`
              ` Windows 7 U -Sketchup 8 -SketchyPhysics 3.2-Dec2 - from Sweden`

              1 Reply Last reply Reply Quote 0
              • R Offline
                roaddawg69
                last edited by 5 Jul 2011, 10:12

                Hello Hpnisse.... Thank you very much for taking the time to create a sample script for me. While I didn't know how to write it, I certainly understand it and will have no problems editing to work with the remote control device I created. I did figure out how to hide and unhide an object with an onTick script but that was as far as I got yesterday.

                I will show you the model once I incorporate your script. - Thanks again, Joe

                1 Reply Last reply Reply Quote 0
                • R Offline
                  roaddawg69
                  last edited by 7 Jul 2011, 02:53

                  Hello Tim, Thanks again for the help. I used the script to control two sets of menu selectors. One is the ANGLE (left to right) the other is DISTANCE. The remote control is used to launch a missle from it's launch pad but have only included the remote control in this attachment. It seems to work as i wanted but it has locked up sketchup on two occassions out of about 30 or test runs.

                  PS I sent this message yesterday but it never left my outbox, so i've moved it here

                  REMOTE-CONTROL-TEST.skp

                  1 Reply Last reply Reply Quote 0
                  • H Offline
                    hpnisse
                    last edited by 7 Jul 2011, 16:51

                    Hello again!
                    I'm glad you liked the "script", and that you got it to work for your model, which by the way was really well done!
                    My Sketchup crashes sometimes, I do not know if it has to do with SP3.2 but it usually work out if you have autosave on, then you have something to go back to if it would crash.
                    Is there anything else, just ask!

                    ` /hpnisse`
                    ` Windows 7 U -Sketchup 8 -SketchyPhysics 3.2-Dec2 - from Sweden`

                    1 Reply Last reply Reply Quote 0
                    • R Offline
                      roaddawg69
                      last edited by 9 Jul 2011, 16:05

                      Tim, without your script I couldn't have brought my vision into focus. I remember QuickBasic and Pascal from highschool and have a decent undertanding of arrays and variables so it wasn't much of an effort to edit your script to fit my model... Thanks again and I may take you up on your offer for future help. I am creating a virutal prototype for a toy.

                      PS I'm an old school DOS user so I am in the habit of saving my work with almost every major change. Most of the time I save things under two names while doing a lot of editing or experimenting so I always have a "restore" point of sorts.

                      -Joe
                      San Antonio, Texas USA

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      1 / 1
                      • First post
                        1/10
                        Last post
                      Buy SketchPlus
                      Buy SUbD
                      Buy WrapR
                      Buy eBook
                      Buy Modelur
                      Buy Vertex Tools
                      Buy SketchCuisine
                      Buy FormFonts

                      Advertisement