Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Problem with exec(); #187142
03/05/08 13:23
03/05/08 13:23
Joined: Sep 2007
Posts: 48
Deutschland
H
HoopyDerFrood Offline OP
Newbie
HoopyDerFrood  Offline OP
Newbie
H

Joined: Sep 2007
Posts: 48
Deutschland
Hello,

I try to execute a Program with the A7 using the exec(); command.

Code:

function exectest()
{
exec("KleinesEinmaleins.exe", ""); //a simple C console application
beep(); // to let me hear the function was started
}

function DebugKeyBinds_startup()
{
on_m = exectest;
}



And nothing happend. I hear the beep, so the function is executed but this is everything. Absolut no reaction. The Programm "KleinesEinmaleins.exe" is located in the main Folder so the engine should find it. I tryed to place it in an Folder I included with PATH "" but there was no difference.

Could anyone help me with this Problem?

Thank you in advance.

Re: Problem with exec(); [Re: HoopyDerFrood] #187143
03/05/08 14:13
03/05/08 14:13
Joined: Aug 2007
Posts: 44
QLD, Australia
Serex Offline
Newbie
Serex  Offline
Newbie

Joined: Aug 2007
Posts: 44
QLD, Australia
I cannot see any problems with your code. I however would like to see you check to see if the file exists before trying to execute it. So something like...

Code:
  
function exectest()
{
var file_handle = file_open_read("KleinesEinmaleins.exe");

if (file_handle != 0) // if the file exists
{
exec("KleinesEinmaleins.exe", ""); // A simple C console application
}
else
{
beep();
}
}



The application will beep if the file isn't found.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1