Chemistry problems can be tough nuts to crack for students, particularly when the problems are of a mathematical type. Collaborative inquiry activities that are embedded in computer-supported learning environments can provide students with opportunities to construct the kind of knowledge required to solve complex chemistry problems. Yet, directing learners' collaborative inquiry in computer-supported learning environments to such useful ends remains a challenge. In this article, we introduce a new approach to facilitating learning from computer-supported collaborative inquiry. The approach we present is a collaboration script that guides pairs of learners through a sequence of inquiry activities and prompts effective interactions in an adaptive fashion. We developed an initial version of a learning environment that included the collaboration script, a simulated chemistry laboratory and a note-taking and mind-mapping tool. In an experimental study involving two conditions (scripted collaboration, unscripted collaboration), we had pairs of students work on a stoichiometry problem using the learning environment. We compared the learning outcomes and learning experiences of the two conditions, and explored learner-learner and learner-system interactions employing a case study methodology. Based on the quantitative and qualitative results, we derived a set of design recommendations for the next development cycle. Our main recommendations are to (a) inform learners about the value of the script support, (b) add algebra practice items and some general chemistry instruction to the learning environment as well as support for interrelating the multiple external representations in the simulated chemistry laboratory, (c) develop tools for assessing learners' prior knowledge and skills in collaborative inquiry learning, general chemistry and basic algebra, (d) increase the degree to which the learning environment can adapt to different learner needs, and (e) improve the interface and interaction design of the simulated chemistry laboratory.