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

Just starting out? Need help? Post your questions and find answers here.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

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

Post 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?
tOnGAs
User
User
Posts: 12
Joined: Tue Aug 31, 2004 12:08 pm
Location: France

RunProgram issue ?

Post 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.
PB 3.93 Registered User
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: RunProgram issue ?

Post 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.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: RunProgram issue ?

Post 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?
Post Reply