Author |
Message |
skootles
![](http://bb.domaindlx.com/plixo/domokun.gif)
|
Posted: Wed Mar 01, 2006 9:02 pm Post subject: Check if a process is running |
|
|
I was wondering if it's possible in turing to check if a process is running. Say, for example, I have MSN running. The process name is "MsnMsgr.exe" in the task manager. Is there any way in turing to detect if a process is running? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Andy
|
Posted: Wed Mar 01, 2006 9:55 pm Post subject: (No subject) |
|
|
no it cant, turing doesn have access to system resources |
|
|
|
|
![](images/spacer.gif) |
jamonathin
![](http://compsci.ca/v3/uploads/user_avatars/57683465145f851a43dd9a.gif)
|
Posted: Wed Mar 01, 2006 11:17 pm Post subject: (No subject) |
|
|
You can always cheat, like this:
code: |
if Sys.Exec ("C:\\Windows\\system32\\taskmgr.exe") then
end if |
Just like I can run a calculator program in 2 lines:
code: |
if Sys.Exec ("C:\\Windows\\system32\\calc.exe") then
end if
|
![Laughing Laughing](http://compsci.ca/v3/images/smiles/icon_lol.gif) |
|
|
|
|
![](images/spacer.gif) |
MysticVegeta
![](http://www.geocities.com/ohsoinsane/my_avatar.JPG)
|
Posted: Thu Mar 02, 2006 2:40 pm Post subject: (No subject) |
|
|
err, actually you can run calc in 1 line, Start -> run -> cmd -> calc.exe. But thats not the point.. lol. He wants to know how to "check" if soemthing is running and that cannot be done unless you run the program your self which I donnt think he wants tod o. |
|
|
|
|
![](images/spacer.gif) |
md
![](http://compsci.ca/v3/uploads/user_avatars/1849317514ed6c4399768d.png)
|
Posted: Thu Mar 02, 2006 6:38 pm Post subject: (No subject) |
|
|
Surely there must be a way to add libraries to turing; ones that use functions written in a different language? I know that windows provides system calls for process management that would do what you want, but I doubt that the native windows APIs have been interfaced to turing. |
|
|
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
Posted: Thu Mar 02, 2006 8:00 pm Post subject: (No subject) |
|
|
There is. You can bring the function in with the external keyword. This is how most of Turing's built-in functions/procedures work.
However, where that C++ (or others?) function is located is the important question. |
|
|
|
|
![](images/spacer.gif) |
[Gandalf]
![](http://compsci.ca/v3/uploads/user_avatars/189297994e4c716fec7f1.png)
|
Posted: Thu Mar 02, 2006 8:43 pm Post subject: (No subject) |
|
|
Really? How would you go about that?
The functions that are called using external, I believe, are located in the turing.pdb file and/or hardcoded in the executable file. If there is a way to somehow add a function from another language, I would be very interested to know how. |
|
|
|
|
![](images/spacer.gif) |
|