david7
19th August 2013, 16:44
Hi,
I have a program that kills other processes. I have noticed that the kill() function (http://www.baanboard.com/programmers_manual_baanerp_help_functions_processes_kill) does not work in webtop! :mad: :(
Is there an alternative function? (for example there is an alternative for app_start())
Thanks
~ D7
bhushanchanda
19th August 2013, 17:18
Hi David,
What are you trying to do? If possible do post your script so that others can understand your requirement and can let you know if there are any way arounds.
david7
19th August 2013, 17:24
Thanks Bhushan for the reply.
In a certain condition, I need to forcefully close another session (one that I did not activate through my code), or kill its process. I used to do so using the kill function in worktop, but this function does not work in webtop. Is there an alternative one? Or any other way to close sessions like that in webtop?
~ D7
bhushanchanda
19th August 2013, 17:39
Well,
I would say, kill() works in Webtop too. I have used it many times. For example, if I want to launch a customized session from a standard session using a form command, I would put kill(parent) in before.program of my customized session to kill the standard session and it works fine.
david7
19th August 2013, 17:54
That is strange! I have a working session in webtop. I use it a lot. I have only added the kill function and it stopped working! I got a message: "No session was started!"
My webtop version is 8.6. Do you think it was fixed in an update? Or what could be the reason?
Thanks again for your replies.
bhushanchanda
19th August 2013, 18:00
Hmm,
That might be possible. We have 10.4 with Build ZA0064. BTW, I am still not sure how are you trying to kill the session.
david7
19th August 2013, 18:04
Any other ideas?
bhushanchanda
19th August 2013, 18:12
Is the session you are trying to kill, a customized session? If yes, then its quite simple. Else, if its a standard session, you will need to use a wrapper.
I would not suggest as I have not tried the above method as kill works for me. But, if you put something like this in that session you can achieve what you want.
string program.code(13)
before.program:
import("prog.name$",program.code)
if program.code = "XYZ" then | XYZ is your session
end()
endif