Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2003
    Posts
    23

    Huh? help with button ???

    i want to make a cd that let´s people install what they like, using checkbox´s
    for the job.

    so i made this that dos not work


    [checkbox1]
    onclik
    result1 = Button.GetState("checkbox1");

    [checkbox2]
    onclik
    result2 = Button.GetState("checkbox2");
    .
    .
    .
    .
    .
    .

    and so on......

    with a button that makes the final instalation

    [install]
    onclik
    if ( result1 ~= 1 ) then
    File.Run("AutoPlay\\Docs\\program1", "", "", SW_SHOWNORMAL, true);
    end

    if ( result2 ~= 1 ) then
    File.Run("AutoPlay\\Docs\\program2", "", "", SW_SHOWNORMAL, true);
    end

    .
    .
    .
    .
    .
    .
    .


    So, can anyone give me a hand ?? thank you

  2. #2
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038
    Here is one way you can do it:
    First, get rid of the code that you have on the On Click event of each of the checkboxes.

    Then, in the On Click event of your ‘Install’ button, try code like this:

    result1 = Button.GetState("checkbox1");
    if result1 > 0 then
    File.Run("AutoPlay\\Docs\\program1", "", "", SW_SHOWNORMAL, true);
    end

    result2 = Button.GetState("checkbox2");
    if result2 > 0 then
    File.Run("AutoPlay\\Docs\\program2", "", "", SW_SHOWNORMAL, true);
    end

    Hope that helps.

  3. #3
    Join Date
    Dec 2003
    Posts
    16

    Lightbulb A variation on Above

    I have a virus removal tool that offers 10 programs, this is the script for the first 3. Each button has 3 states and are toggle enabled.
    The individual buttons have no [on click] actions, but on the last button (run selected tools) has the
    following [on click] actions. It checks the application buttons to see if toggle is up or down state.
    the depending on the state of each runs them in sequence, waiting for each to finish. I have a check
    image appear after each app has run. Close to JimS's and you could replace buttons with checkboxes.
    I did mine this way for organizing reasons.


    Button1State = Button.GetState("Button1");
    Button2State = Button.GetState("Button2");
    Button3State = Button.GetState("Button3");

    --Starter Actions
    if (Button1State == BTN_DOWN) then
    File.Run("AutoPlay\\Docs\\STARTER\\Starter.exe", "", "AutoPlay\\Docs\\STARTER", SW_SHOWNORMAL, true);
    Image.SetVisible("Check1", true);
    end

    --Avert Actions
    if (Button2State == BTN_DOWN) then
    File.Run("AutoPlay\\Docs\\AVERT\\scan.exe", "/AD /ALL /SUB /UNZIP /WINMEM", "AutoPlay\\Docs\\AVERT", SW_SHOWNORMAL, true);
    Image.SetVisible("Check2", true);
    end

    --Trend Actions
    if (Button3State == BTN_DOWN) then
    File.Run("AutoPlay\\Docs\\TREND\\sysclean.exe", "", "AutoPlay\\Docs\\TREND", SW_SHOWNORMAL, true);
    Image.SetVisible("Check3", true);
    end

Similar Threads

  1. Example: Creating an on/off button to toggle background audio
    By Jonas DK in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 07-10-2004, 02:54 PM
  2. Dynamic Return Button
    By Octaine in forum AutoPlay Media Studio 5.0
    Replies: 3
    Last Post: 06-29-2004, 01:43 PM
  3. Creating a Button that Closes the Application
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 10-03-2003, 01:01 PM
  4. Button Hiding Blues
    By Tezcatlipoca in forum AutoPlay Media Studio 4.0
    Replies: 5
    Last Post: 04-11-2003, 04:57 PM
  5. INFO: The Explore Button on the Distribution Folder Dialog
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-11-2002, 12:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts