Page 1 of 1

need help on how to open another exe using a button.

Posted: Thu May 19, 2005 6:03 am
by kane
How do I get it to open a exe in a subfolder from this exe /bob/bob.exe
thanks.

Code: Select all

IncludeFile "Common.pb"
Open_Window_0()

  Quit = 0
  Repeat
    Event = WaitWindowEvent()
    
    Select Event
      Case #PB_EventCloseWindow 
        Quit = 1
        
       Case #PB_Event_Gadget
       
        Select EventGadgetID()
        
          Case #Button_1 ; If push Exit then quit
            Quit = 1
          Case #Button_0 ; the Patch Button

          Case #Button_2
            CloseWindow(#Window_1) ; If push cancel in that, close it
            
        EndSelect
        
   EndSelect
    
      
  Until Quit = 1
  End

Posted: Thu May 19, 2005 6:34 am
by kane
ahh got it sorta...

Code: Select all

prog$="bob\bob.exe"

RunProgram(prog$)

Problem is how do I make so don't have to use full path just path from where exe is?

Posted: Thu May 19, 2005 6:37 am
by dracflamloc
"./subdir/prog.exe"

the "." signifies the current working directory
".." would mean one directory lower.

Posted: Thu May 19, 2005 6:38 am
by kane
ahh thanks so much

Posted: Thu May 19, 2005 6:49 am
by kane
another question if you don't mind how would I open a new page on the internet. so a button called register when click on it opens a webpage.

Posted: Thu May 19, 2005 3:18 pm
by Kale
kane wrote:another question if you don't mind how would I open a new page on the internet. so a button called register when click on it opens a webpage.

Code: Select all

RunProgram("http://www.registerhere.com/register.htm")

Posted: Thu May 19, 2005 4:01 pm
by kane
thanks so much :)

Posted: Thu May 19, 2005 4:21 pm
by kane
ahh ok 2 things..

when click play button need 2 examples of clicking button one stop music and another example of it closing the program.

Posted: Tue May 31, 2005 12:59 am
by kane
Problem...

I was using the prog$ way but what happends if I had a 2nd button needs open another 3rd party button what would it look like>??