returned exit code 0 / script wird abgebrochen
Verfasst: Donnerstag 4. September 2008, 13:43
Bin ein wenig am ausprobieren und habe folgendes Test Skript:
Wie egsagt, der Sinn ist begrenzt ist nur zum ausprobieren, was möglich ist. Ich Frage mich jetzt aber wieso das Skript abgerochen wird an der genannten stelle?
Code: Alles auswählen
from win32com.client import GetActiveObject
cfapp = GetActiveObject("ChemFinder11.Application")
cfdoc = cfapp.ActiveDocument
cfrset = cfdoc.Recordset
cfmol = cfdoc.Fields("Structure")
cfid = cfdoc.Fields("Mol_ID")
current_MolID = cfrset.Value(cfid.index)
print current_MolID
#Path = "C:/Joos/temp.cdx"
#mol.Write(Path)
while not cfrset.EOF:
mol = cfrset.Value(cfmol.index)
print "Mol_ID: " + str(cfrset.Value(cfid.index))
print "Atom Count: " + str(mol.Atoms.Count)
cfrset.MoveNext()
#hier wir das skript abgebrochen mit exid code 0.
cfrset.MoveFirst
while cfrset.Value(cfid.index) < current_MolID:
mol = cfrset.Value(cfmol.index)
print "Mol_ID: " + str(cfrset.Value(cfid.index))
print "Atom Count: " + str(mol.Atoms.Count)
cfrset.MoveNext()
cfrset = 0
cfdoc = 0
cfapp = 0
mol = 0