Announcement

Collapse
No announcement yet.

combination actions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • combination actions

    Hello,

    I would like to use a listbox to list different files that can be ran. When one is selected I would like the user to be able to click ANOTHER button, either text or a image, and that to trigger the EXE to be ran, but the exe it runs must be able to be changed BASED on whats selected in the listbox.

    IE
    Listbox has 3 options

    Light
    Recommended
    Full

    Then there is an "install" graphic/text button. If the user selects light, it runs program_lite.exe, if they select recommended, it runs program_recomended.exe, if they select full, it runs program_full.exe, BUT ONLY if the user hits the Install graphic/text object, it shouldnt run just by selecting an option.

    This version seems to have the capabilites to do this, but ive tested many ways and none have worked, if anyone knows of how to do thsi PLEASE let me know [img]/ubbthreads/images/icons/smile.gif[/img]

    Thanks

  • #2
    Re: combination actions

    That should be relatively straight forward. Build the items for your listbox with a name and the data pointing to the file you want to have executed. Then in the ListBox Object go the actions page. "On Selection Change", have it Set.Text(textobject) to the file selected.

    You could then on the button, nave it get the selected item and then do a file.open or file.execute.

    Look at the attached for an example.

    14284-install.zip
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

    Comment


    • #3
      Re: combination actions

      You could use the Selected Index of the list item to determine the exe file.

      %SelectedIndex%=ListBoxObject[List1].GetSelected

      then use IF's for the button's OnClick event to decide what to do with the %SelectedIndex%

      IF %SelectedIndex%=0
      File.Execute [ProgramLight.exe]
      END IF
      ELSE
      IF %SelectedIndex%=1
      File.Execute [ProgramRecommended.exe]
      END IF
      ELSE
      IF %SelectedIndex%=2
      File.Execute [ProgramFull.exe]
      END IF
      -
      = Derek
      ["All glory comes from daring to begin" - fortune cookie]

      Comment

      Working...
      X