Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accepting command line argument

Status
Not open for further replies.

acl03

MIS
Jun 13, 2005
1,077
US
I have never used powerbuilder (i've used vb). Is there an easy way to write a program that displays nothing to the end user, accepts a command line argument, and runs a shell command?

Basically, i need the app to run from the command line, and accept a URL as a command line argument, like this:
Code:
c:\> myApp.exe [URL unfurl="true"]http://www.yahoo.com[/URL]
I then want the app to take the url (as a string) and execute this windows shell command, opening the URL in Internet Explorer:

Code:
"c:\program files\internet explorer\iexplore.exe" "[URL unfurl="true"]http://www.yahoo.com"[/URL]

Any ideas?



Thanks,
Andrew
 
Try this
Code:
run( "c:\program files\internet explorer\iexplore.exe [URL unfurl="true"]http://www.yahoo.com")[/URL]
 
Use the open event in the application object of your PB application. Then read the commandline input variable and make the Run as suggested.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top