Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Set action setup for buttons on Button Panels

Discussion in 'Programming Questions and Suggestions' started by Dr3amT, Dec 1, 2015.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Dr3amT Trainee Engineer

    Messages:
    2
    Is it possible to change the button actions on a Button Panel with scripting?
     
  2. Wicorel Senior Engineer

    Messages:
    1,258
    Not currently.
     
  3. Sinbad Senior Engineer

    Messages:
    2,788
    what you can do is have a button turn on a timer block (not start, or trigger, just turn it on) and have the script monitor the state of the timer. then the script can carry out an action for that button then turn the block off again, an action that can be different depending on a range of other conditions as well. so effectively, yes you can get that functionality, but only in a slightly round about and volume inefficient way.
    I've been experimenting with this method (exept I just have the timers on the cockpit toolbar) to make a 'keyboard' for interacting with scripts. You would be amased how much functionality you can get out of 4 keys.
     
  4. Sathurn Trainee Engineer

    Messages:
    30
    4! right.
    24 options

    just two button panels could get you 40320 optional combinations. Of course a program that complex wold not run on the program blocks available. But is is an interesting idea.
     
  5. Sinbad Senior Engineer

    Messages:
    2,788
    I was thinking more up, down, enter and cancel for navigating menus on a script controled text panel...
     
  6. Wicorel Senior Engineer

    Messages:
    1,258
    I use a similar system to Sinbad but it does trigger the timer. The timers are set to run the script and then start themselves.

    The script looks and sees which timers are running and then records that as the 'action' and then stops the timer..

    This means that the main script does not have to have a 'fast' timer to monitor user 'actions'.

    This is from my miner:

     
  7. Sathurn Trainee Engineer

    Messages:
    30
    I was thinking about this an 24 assume you only hit each button once, so you can get more.
    Using an lcd screen:

    First pass
    Main menu screen0000
    option 1 hit button one
    option 2 hit button two
    option 3 hit button three
    option 4 hit button four

    Second pass player selects option 1

    option 1 menu screen1000
    option a hit button one
    option b hit button two
    option c hit button three
    option d hit botton four

    Thrid pass player selects a

    Option1a menu screen1a00
    ...

    Screen would be there for the program to figure where in the program the player is at.
     
  8. Dr3amT Trainee Engineer

    Messages:
    2
    Thanks for your input guys :)

    I'm working on a menu system / UI aswell and it's pretty neat to navigate through menus on the LCD screen with the button panel :)
     
Thread Status:
This last post in this thread was made more than 31 days old.