Help for run select item in ComboBox

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • BaUDi0
    Forum Member
    • Jan 2005
    • 3

    Help for run select item in ComboBox

    Hi

    I have created a ComboBox with these Items:

    Pinnacle
    Hollywood
    Plugins

    And I want these actions:

    On Select Item Pinnacle = Run the Pinnacle.exe
    On Select Item Hollywood = run hollywood.exe
    On Select Item Plugin = Run plugin.exe

    Please the code for these actions?? Sorry , Im Spanish and my english is very bad. Thanks

    Si algun español me puede ayudar bien, pero si es en ingles tambien me apañare. Gracias
  • sferguson
    Indigo Rose Customer
    • Oct 2003
    • 164

    #2
    Here ya go!
    Attached Files
    -Scott F.

    Comment

    • BaUDi0
      Forum Member
      • Jan 2005
      • 3

      #3
      Thanks.

      Other Question:

      For supr the confirm message and direct run??

      Sample:

      I select item two and press Ok = message to confirm for run aplication

      I want run the application without the confirmation message: Sample:

      I select item two and press Ok = run selected item

      To suppress the confirm message?????????

      This is you original code:

      Code:
      if selected <= 1 then
      
      		-- Instructs the user to choose something...
      		Dialog.Message("Note:", "Please select an item from the drop-down box.");
      	
      	elseif selected == 2 then
      
      		-- Confirms that the user really wants to run the exe.
      		result = Dialog.Message("Confirm", "Are you sure you would like to \"Do This?\"", MB_YESNO, MB_ICONINFORMATION, MB_DEFBUTTON1);
      		
      		-- If the user clicks the Yes button...
      		if (result == IDYES) then
      		
      		    -- Run the notepad exe.
      		    File.Run("******\\****** Pinnacle Studio Plus 9.3.5 Unlocker.exe", "", "", SW_SHOWNORMAL, false); --replace file name and path with your exe...
      		
      		end
      		
      	
      	elseif selected == 3 then
      		
      		-- Confirms that the user really wants to run the exe.
      		result = Dialog.Message("Confirm", "Are you sure you would like to \"Do This?\"", MB_YESNO, MB_ICONINFORMATION, MB_DEFBUTTON1);
      		
      		-- If the user clicks the Yes button...
      		if (result == IDYES) then
      		
      		    -- Run the mspaint exe.
      		    File.Run("Plugins\\******.exe", "", "", SW_SHOWNORMAL, false); --replace file name and path with your exe...
      		
      		end
      
      	elseif selected == 4 then
      		
      		-- Confirms that the user really wants to run the exe.
      		result = Dialog.Message("Confirm", "Are you sure you would like to \"Do This?\"", MB_YESNO, MB_ICONINFORMATION, MB_DEFBUTTON1);
      		
      		-- If the user clicks the Yes button...
      		if (result == IDYES) then
      		
      		    -- Run the calculator exe.
      		    File.Run("Plugins\\******.for.plugins.exe", "", "", SW_SHOWNORMAL, false); --replace file name and path with your exe...
      		
      		end
      
      end

      Comment

      • BaUDi0
        Forum Member
        • Jan 2005
        • 3

        #4
        SOLVED!!!!!!!!!!!


        This is a code for Skeep the messages:

        Code:
        if selected <= 1 then
        
        		-- Instructs the user to choose something...
        		Dialog.Message("Note:", "Please select an item from the drop-down box.");
        		
        		end
        	
        	if selected == 2 then
        
        		-- Confirms that the user really wants to run the exe.
        		result = File.Run("******\\****** Pinnacle Studio Plus 9.3.5 Unlocker.exe", "", "", SW_SHOWNORMAL, false);
        		
        		end		
        	
        	if selected == 3 then
        		
        		-- Confirms that the user really wants to run the exe.
        		result = File.Run("Plugins\\******.exe", "", "", SW_SHOWNORMAL, false);
        		
        		end
        
        	if selected == 4 then
        		
        		-- Confirms that the user really wants to run the exe.
        		result = File.Run("Plugins\\******.for.plugins.exe", "", "", SW_SHOWNORMAL, false);
        		
        		end

        Thanks for you help.


        PD: if it must correct...

        Comment

        • sferguson
          Indigo Rose Customer
          • Oct 2003
          • 164

          #5
          Glad to help
          -Scott F.

          Comment

          Working...
          X