runprogram() changed?

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by willinyork.

Hi ho,

I've just tried re-compiling a program I wrote ages ago (it worked before) but now I'm getting a "a string is expected" error at a line which runs an external program. I've looked through the PB docs and saw that there is an optional "working directory" parameter for the command (I don't remember this being here before) but still cannot get my command to work (my directory and filename is stored as part of a$)

This is the code, as it was in the original version:

If RunProgram("c:\aiff2vag.exe",Chr(32)+a$,1)
EndIf

I'm probably missing something very simple here, but I have no idea what :)

Thanks!
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

RunProgram("c:\aiff2vag.exe",Chr(32)+a$,"", 1)

should work.


Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> RunProgram("c:\aiff2vag.exe",Chr(32)+a$,"", 1)

You don't need a space for the parameter$ argument, either.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by willinyork.

Lovely :) Many thanks :)
Post Reply