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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Try to Run within Clipper Application an "http..." calling but not wor

Status
Not open for further replies.

Chrisdws

Programmer
Mar 3, 2011
5
i have a clipper application and within the code i run a "start" command. in my old pc (that i have just for programming with Clipper since so many years..) i run win/98 and at a separate window with the relative site is opening. so with win/98 the command is working perfect. But not when i run this software from a win/xp pc. can somebody help me ?
(from the forum i read and unsuccesfuly tried to..
copy cmd.exe to the current folder
copy command.com to the current folder
to include the /separate switch on the command line.
the error message that i see (i see this at the bottom of my dos screen) is somehting like "wrong command or wrong file name" (thisis the error meaning as it is at other language..
can someone help me ?
(when i run the command f.e. del *.ntx it works ok
but not when i call an http site..
(when i have a command line (direc c:\> then its working fine writting the same command like c:\>start http:// e.t.c.
but not inside my appl !!
thanks in advandce..and the lucky that will help me i will tell how to open direct gogle maps direct at the right address inside from clipper appl !!
 
I haven't had a Clipper question in AGES!

I can't say for certain what the problem is - or directly what your solution should be... but I can point down the right path to find it.

Instead of calling the command you want directly, write the instructions to a batch file (located in the same folder as your .exe) and run that - if it doesn't run first time, the batch file will still be there and you can open a DOS window and run it manually. That way you can see if there are any errors thrown up.

The other thing to do, arguably first, is to run a different batch file that you set up OUTSIDE of your application that does work and then try to run that from inside your Clipper application.

It's a bit trial and error, but it should point you in the right direction.

Good luck

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Are you getting "Bad Command or File Name". Does it produce a "DOS" error number? Sounds like it may be a"PATH" issue, in that it can't see or find the path from inside your Clipper App.

If it isn't a Clipper based error, then the environment your running this in is causing the error. Get the exact syntac of the error and Google it, and see if you can get a better understanding about what is the actual problem running it inside your app.

Get us as much info as possible and we may be able to figure out what's up.

There are a couple of guys who check in on this forum, and Griff is one of them, that are experts with Clipper. So if you can push us some more info we may be able to help.

Jim C.
 
That's why I was suggesting that you write the command to a batch file - then run the batch file outside of Clipper to see if you can tweak it until it works, then make your app follow you newly fixed batch file.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Unfortunatelly nothing is working..and still got a message bad command e.t.c !! i have read many threads at at forum (except your kind answers) i have test many ideas and suggestion and cannot work!
when i open a command prompt and i give the command "start http:.. etc" it works fine...
if i try to call from within the clipper appl is not running
ir i try to call a batch file within the clipper applic then the batch if running but when (the batch file) executes the command start http: .. do not run..and don't understand the http: as an internal or external command !! very dissapointed.
the fact is that we still use the blinker 3.3. do you think that maybe that is the problem ? how i can upgrade/update to newer blinker 5.x or 7.x ? is there any site where i can download and test ?
other ideas for testing ? i have test many issues direct or throught other batch files..

some of the tests..below

ECHO OFF
CLS
ECHO %0 %1 %2 %3
rem (i have tried and through param to run..but not succed..)
PAUSE
ECHO START START PAUSE
ECHO "START START "PAUSE
REM // RUN cmd.exe /c "C:\Program Files\Microsoft Office\Office\WINWORD.EXE" iltopenb.doc /mILOPEN
start command.exe /c "PAUSE
start command.exe /c " /MILOPEN
PAUSE
start command.exe "PAUSE
start command.exe " /MILOPEN
PAUSE
REM "C:\Program Files\Microsoft Office\Office\WINWORD.EXE" iltopenb.doc /mILOPEN
PAUSE
 
Can you get the batch file to execute with just an echo and pause in it?

Code:
ECHO OFF
CLS
ECHO Press any key
PAUSE

If that runs then it is a path type of problem - it can't 'see' the 'start'

If it doesn't run it is an environmental problem - clipper can't 'see' the cmd.exe or command.exe or can't 'see' the batch file.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
i have also copied the command.exe and cmd.exe to the current folder...but its not help !!
while the start http:...can run properly from the command prompt...it is not running within the clipper applic (only at win/xp !!) its working ok when win/98.

the fact is that i still use blinker 3.3. \
do you think that maybe this is the problem ?
how i can upgrade/update to newer blinker 5.x or 7.x ? is there any site where i can download and test ?

other ideas ?
 
Programs linked with Blinker 3.3 should be just fine in XP - there *shouldn't* be any need to upgrade.

That said, what exactly is the code you are using to run the "start http"?

Did you try getting my 'pause' code to run.


Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
yes, as you can see at at above code that i copy/paste before i use the PAUSE command for testing purposes and it works ok.
the "start xxx " is not working....withing clipper appl. when i use the RUN (QQQQ) withing clipper.

I also tested the SWPRUNCMP(XXX) and also it is not working.

i also have copied the CMD.EXE AND COMMAND.COM at the same running folder and still not working..

Chris
 
Right, now you need to move on a step, if the 'Pause' works, you know that the correct cmd.exe or command.exe is being found and is being loaded.

Start is an 'internal' command, so there is no 'start.exe' to speak of - so the system might be struggling to find IE to load your web page.

Why not load IE specifically, and use the web page as a parameter - start by trying to load IE:

Code:
MyInstr = '"C:\program files\internet explorer\iexplore" [URL unfurl="true"]http://www.google.com'[/URL]
set console off
set alte to c:\myApps\MyApp\MyShell.bat
set alte on
? MyInstr
? pause
set alte off
set alte to
set console on

run c:\myApps\MyApp\MyShell.bat

Try that and see what you get


Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top