winole prob or not

J

Junkone

hello
i am chcking if i have the app amibroker instance running. if it is, i
want to close it smoothly. however i land into a ole problem here. it
only quits 1 instance at a single run. for eg. if i i have 3
instances running and i execute the following script. it will close 1
instance leaving 2 open. if i run it again, it will close another
instance leaving 1 open. is it a win32ole prob or amibroker prob.

def closeAB
application = WIN32OLE.new("Broker.Application")
application.quit
puts "called to close"
end

# Everything
ProcTable.ps.each { |p|
if(p.caption =="Broker.exe") then
# close amibroker
puts " found ab"
closeAB

end
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,274
Messages
2,571,368
Members
48,060
Latest member
JerrodSimc

Latest Threads

Top