Page 1 of 1

[4 beta 6] #PB_Program_Hide makes my program not work?

Posted: Wed Mar 15, 2006 5:01 pm
by Trond
I have a file called c:\map.bmp. If I use the following code, the file c:\map2.bmp is NOT created.

Code: Select all

DeleteFile("c:\map2.bmp")
RunProgram("cmd", "/C copy c:\map.bmp + c:\map.bmp + c:\map.bmp c:\map2.bmp", "", #PB_Program_Hide | #PB_Program_Wait)
Debug FileSize("c:\map2.bmp")
This code, however, works like it's supposed to. The file c:\map2.bmp is now created.

Code: Select all

DeleteFile("c:\map2.bmp")
RunProgram("cmd", "/C copy c:\map.bmp + c:\map.bmp + c:\map.bmp c:\map2.bmp", "", #PB_Program_Wait)
Debug FileSize("c:\map2.bmp")
Question: What did I not understand about the #PB_Program_Hide flag?

RunProgram issue ?

Posted: Wed Mar 15, 2006 5:54 pm
by tOnGAs
I too have some troube with RunProgram. This kind of code does not work :

Code: Select all

RunProgram("C:\Program Files\GNUWin32\bin\diff.exe", file_a$ + " " + file_b $+ " >C:\diffoutput.txt", "",#PB_Program_Wait)
The 'diffoutput.txt' file is never created.

Re: RunProgram issue ?

Posted: Wed Mar 15, 2006 8:02 pm
by Fred
tOnGAs wrote:I too have some troube with RunProgram. This kind of code does not work :

Code: Select all

RunProgram("C:\Program Files\GNUWin32\bin\diff.exe", file_a$ + " " + file_b $+ " >C:\diffoutput.txt", "",#PB_Program_Wait)
The 'diffoutput.txt' file is never created.
The redirection is a feature of the shell command line, it's doesn't work with the RunProgram(). The v4 provide some easy way to get this tough.

Re: RunProgram issue ?

Posted: Wed Mar 15, 2006 9:22 pm
by Trond
Fred wrote:
tOnGAs wrote:I too have some troube with RunProgram. This kind of code does not work :

Code: Select all

RunProgram("C:\Program Files\GNUWin32\bin\diff.exe", file_a$ + " " + file_b $+ " >C:\diffoutput.txt", "",#PB_Program_Wait)
The 'diffoutput.txt' file is never created.
The redirection is a feature of the shell command line, it's doesn't work with the RunProgram(). The v4 provide some easy way to get this tough.

Code: Select all

RunProgram("cmd", "/C C:\Program Files\GNUWin32\bin\diff.exe " + file_a$ + " " + file_b $+ " >C:\diffoutput.txt", "",#PB_Program_Wait)
But what is wrong with my code?