Page 1 of 1
					
				Runprogram behaviour
				Posted: Tue Sep 16, 2003 10:43 am
				by Cor
				Textgadget
#txtURL contains -->  
http://www.ready4music.com
Runprogram(Getgadgettext(#txtURL),"","",2) does not fire the url
The following does work
temp.s  = Getgadgettext(#txtURL)
Runprogram(temp,"","",2) does not fire the url
Am I missing something or is it a bug?
 
			
					
				Re: Runprogram behaviour
				Posted: Tue Sep 16, 2003 11:28 am
				by PB
				> Runprogram(Getgadgettext(#txtURL),"","",2) does not fire the url
Yep, it fires fine for me with this code:
Code: Select all
If OpenWindow(1,300,250,400,200,#PB_Window_SystemMenu,"Window")
  CreateGadgetList(WindowID())
  ButtonGadget(1,20,50,60,25,"Button")
  StringGadget(2,20,100,300,20,"http://www.ready4music.com/")
  Repeat
    ev=WaitWindowEvent()
    If ev=#PB_Event_Gadget
      Select EventGadgetID()
        Case 1 ; Button.
          RunProgram(GetGadgetText(2),"","",2)
      EndSelect
    EndIf
  Until ev=#PB_EventCloseWindow
EndIf
 
			
					
				
				Posted: Wed Sep 17, 2003 7:41 am
				by Cor
				It does not fire on win95
			 
			
					
				
				Posted: Wed Sep 17, 2003 8:17 am
				by PB
				> It does not fire on win95
True!   

  Use ShellExecute instead of RunProgram like so, and it works:
Code: Select all
ShellExecute_(0,"open",GetGadgetText(2),"","",#SW_SHOW)
I think Fred intended RunProgram to be for apps only, and not web pages,
which may be why RunProgram doesn't work in this case on Win 95.
 
			
					
				
				Posted: Wed Sep 17, 2003 9:20 am
				by TronDoc
				the RunProgram(GetGadgetText(2),"","",2) version
doesn't work here on WinDoze '98 1st Ed either;
but the ShellExecute_(0,"open",GetGadgetText(2),"","",#SW_SHOW)
works just fine.
Joe
P.S. Cor! what a way to get folks to visit your site!!! <kidding>  

 
			
					
				ShellExecute()
				Posted: Thu Sep 18, 2003 5:58 pm
				by oldefoxx
				This is the Second of Two Threads I have found that mention  ShellExecute(), but I do not find it in the Help, nor does the IDE highlight or case-correct an entry of ShellExecute().  What gives?
--Never mind.  I just noted the following underscore (ShellExecute_()), meaning it is a Windows API call.  Dern!  I wish my eyes were better.
			 
			
					
				Re: ShellExecute()
				Posted: Thu Sep 18, 2003 6:08 pm
				by Pupil
				oldefoxx wrote:This is the Second of Two Threads I have found that mention  ShellExecute(), but I do not find it in the Help, nor does the IDE highlight or case-correct an entry of ShellExecute().  What gives?
It's a Win32 API command. If you place a win32.hlp file in the help folder in your PB installation you'll be able to use F1 to get help. All commands ending with an underscore '_' are API commands and as such aren't included in the PB help file.
 
			
					
				
				Posted: Fri Sep 19, 2003 12:06 am
				by Kale