Page 1 of 1
Posted: Tue Jan 28, 2003 5:25 am
by BackupUser
Restored from previous forum. Originally posted by DarthPuff.
ugh... hey i have an exe called Particles.exe in a folder called System thats in the same directory as the exe for the purebasic program... O_O but when i use the RunProgram("System/Particles.exe","","") it wont run... o_O why is that... i even tried putting a / before system and putting in the full name ... ex:... C:\My Documents\MySoftware\DarkHalf\Particles\v0.0.2\System\Particles.exe ... o_O this is the second alpha version of this program... the last one was done completely in darkbasic... O_O this one is a mix...
None at the moment o_O...
Posted: Tue Jan 28, 2003 5:33 am
by BackupUser
Restored from previous forum. Originally posted by DarthPuff.
i did put \ not /... i was just typing... O_O
None at the moment o_O...
Posted: Tue Jan 28, 2003 6:31 am
by BackupUser
Restored from previous forum. Originally posted by Danilo.
If Particles.exe is in the same folder like your PureBasic program,
you should use "Particles.exe" only.
If you tried with the whole Path 'c:\...' then try to include
'"' before and after. chr(34)+"c:\...."+chr(34)
On old Win9x systems spaces in the path can make some problems.
If all this doesnt work, set the correct WorkingDirectory$ for
RunProgram() - maybe its always required.
cya,
...Danilo
(registered PureBasic user)
Posted: Tue Jan 28, 2003 6:34 am
by BackupUser
Restored from previous forum. Originally posted by DarthPuff.
still didnt work... it just wont start up the program... do i need anymore stuff on it... im running win2000pro o_O... its only "RunProgram("Particles.exe")" right
None at the moment o_O...
Posted: Tue Jan 28, 2003 6:56 am
by BackupUser
Restored from previous forum. Originally posted by DarthPuff.
ugh nm.. it was a bad exe file... i compiled a new one... works great... now that i have the program open... O_O the external program... how do i close it...
None at the moment o_O...
Posted: Tue Jan 28, 2003 4:55 pm
by BackupUser
Restored from previous forum. Originally posted by El_Choni.
Try this:
Code: Select all
#STANDARD_RIGHTS_REQUIRED = $000F0000
#SYNCHRONIZE = $00100000
#PROCESS_ALL_ACCESS = #STANDARD_RIGHTS_REQUIRED+#SYNCHRONIZE+$0FFF
ProgramName.s = "Particles.exe" ; Executable file name
WindowTitle.s = "Particles" ; Put the proper window title here
RunProgram(FileName)
MessageRequester(FileName+" running?", "Kill it!", 0)
ProcessId.l
ExitCode.l
hWindow = FindWindow_(0, WindowTitle)
GetWindowThreadProcessId_(hWindow, @ProcessId)
hProcess = OpenProcess_(#PROCESS_ALL_ACCESS, #TRUE, ProcessId)
GetExitCodeProcess_(hProcess, @ExitCode)
TerminateProcess_(hProcess, ExitCode)
MessageRequester("Done?", "Press when "+FileName+" has been killed.", 0)
Bye,
El_Choni
Posted: Wed Jan 29, 2003 3:31 am
by BackupUser
Restored from previous forum. Originally posted by DarthPuff.
Thanks dude it works great...
None at the moment o_O...