Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming

Reply
 
LinkBack Thread Tools
Old 05-11-08   #1 (permalink)
*cough* Stock *cough*
 
Ulquiorra's Avatar
 
intel nvidia

Join Date: May 2008
Location: rotherham
Posts: 4

Rep: 0 Ulquiorra Unknown
Unique Rep: 0
Trader Rating: 0
Red face opening programs within pascal

hello everyone

Im trying to open a .exe from within pascal programing languge ive looked everywhere and cnt find how to

is it possible?

Thank you in advance for your help
__________________
System: First own commie XD
CPU
Q6600
Memory
3 GB
Graphics Card
8600gt
Hard Drive
500gb internal 500gb external
Case
medion media center pc
CPU cooling
box cooler
OS
windows vista home preimium
Monitor
HP LP1965
Ulquiorra is offline   Reply With Quote
Old 05-21-08   #2 (permalink)
New to Overclock.net
 
Join Date: May 2008
Location: Nottingham, UK
Posts: 24

Rep: 7 Stormwolf Unknown
Unique Rep: 5
Trader Rating: 0
Default

I've not tried this in Pascal (it's been a long time since I tried anything in Pascal tbh) but there should be an 'exec' procedure to which you pass the path to the program (including it's name) and a string of command line args

Example from Turbo Pascal's Help file:

Code:
{ Example for DosExitCode and Exec }

{$M $4000,0,0 }   { 16K stack, no heap }
uses Dos;
var
 ProgramName, CmdLine: string;
begin
 Write('Program to Exec (full path): ');
 ReadLn(ProgramName);
 Write('Command line to pass to ',
       ProgramName, ': ');
 ReadLn(CmdLine);
 WriteLn('About to Exec...');
 SwapVectors;
 Exec(ProgramName, CmdLine);
 SwapVectors;
 WriteLn('...back from Exec');
 if DosError <> 0 then{ Error? }
   WriteLn('Dos error #', DosError)
 else
   WriteLn('Exec successful. ',
           'Child process exit code = ',
           DosExitCode);
end.
Hope that helps
Stormwolf is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 07:52 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.17990 seconds with 8 queries