WIZ-WNEW01.ALT

This is an OutWit Tutorial file.


Testing Browser...
OutWit Hub - New Features
Application walkthrough: What's New in Version 3.0
userSpace.setWizardPreferences = function setWizardPreferences(){ wizardKit.setWizardPref("browse.maxPageLoadTime", "30000"); wizardKit.setWizardPref("browse.maxPageProcessTime", "30000"); wizardKit.setWizardPref("browse.maxPageResponseTime", "30000"); wizardKit.setWizardPref("browse.tempo.min", "4000"); wizardKit.setWizardPref("browse.tempo.max", "4000"); wizardKit.setWizardPref("applyScraper.tempo.sameDomainOnly", true); wizardKit.setWizardPref("applyScraper.tempo.min", "4000"); wizardKit.setWizardPref("applyScraper.tempo.max", "4000"); wizardKit.setWizardPref("applyScraper.tempo.sameDomainOnly", true); wizardKit.setWizardPref("pauseDuration", 0); wizardKit.setWizardPref("pauseInterval", 0); wizardKit.setWizardPref("images.ondemandonly", false); wizardKit.setWizardPref("page.ignorePlugins", true); wizardKit.setWizardPref("page.ignoreImages", false); wizardKit.setWizardPref("tableMinRows", "1"); wizardKit.setWizardPref("DOMSourceDontWarn", true); } userSpace.updateFocus = userSpace.updateFocus || function (){ //witscript.wait(500); var top = wizard.getPosition().top; var left = wizard.getPosition().left; if((top != userSpace.top || left != userSpace.left )){ witscript.menus.tools.preferences.click(); //alert("clicked"); userSpace.top = wizard.getPosition().top; userSpace.left = wizard.getPosition().left; } }
//alert(witscript.version()); userSpace.eyeCatcherOK = true; if (/Firefox\/[23]\./.test(navigator.userAgent)){ alert("OutWit wizards cannot run on your version of Firefox. Please update to the current version and try again."); wizard.close(); } else if (!("witscript" in window) || !witscript.version || !witscript.version("3.0")){ alert("This wizard is not compatible with your version of the OutWit Kernel. Please download the latest version (3.0 or higher)"); wizard.close(); } $(".owui-wizard-homelink").html("Hub Tutorials"); userSpace.setWizardPreferences();
witscript.views.page.display(); wizardKit.hideCatch(); wizardKit.hideLog(); wizardKit.say(this.parentNode);

Version 3.0 - New Features

The present tutorial is destined to users of OutWit Hub 1.0 and 2 who want an idea of the novelties in this version.
If you do not know the application and want to discover the main functions, you should start with the "Quick Overview" tutorial.

//alert(thisIsATestWithALongVariableName.titi.tata); $("#warning").html("");
wizardKit.say(this.parentNode);

OutWit's built-in Tutorial and Wizard System.

For users of 1.0 and 2.0, the important addition in version 2.1 was the WitScript Engine. It allows us to create tutorials like this one.

wizardKit.say(this.parentNode); wizardKit.hideCatch(); wizardKit.hideLog(); witscript.views.page.load("http://www.outwit.com/");

While this window is showing instructions, the user interface of OutWit Hub remains operational.

You can still interact normally with the application and you can move this tutorial window around on the screen to see the parts of the interface that you want.

userSpace.GFList =""; userSpace.GFDescription = ""; $("#GFList").html(""); $("#GFDescription").html(""); $("#GFpresentationParagraph").html("New features have been added throughout the application."); wizardKit.say(this.parentNode);

General Features

userSpace.generalFeatures = []; userSpace.generalFeatures.push({title : "Real-Time Export Preview.", description : "The Export Preview Panel located at the left of each view, displays the data as it will be exported in the selected format.<br /><br />The Edit button at the top right of the Export Preview panel gives access to the Export Layout Editor, where you can choose which column should be exported, in what order, with what separator and in what style."});
if(userSpace.updateFocusTimer){ window.clearInterval(userSpace.updateFocusTimer) userSpace.updateFocusTimer = null; }; $("#GFpresentationParagraph").html(""); var step = Number(wizard.stepNumber()-1); userSpace.GFList =""; userSpace.GFDescription = ""; for(var i=0;i <= step;i++){ userSpace.GFList = "<li class='note'>"+userSpace.generalFeatures[i].title+"</li>"; } userSpace.GFDescription = userSpace.generalFeatures[step].description; $("#GFList").html(userSpace.GFList); $("#GFDescription").html(userSpace.GFDescription); wizardKit.say((userSpace.generalFeatures[step].title + "..." + userSpace.generalFeatures[step].description.replace(/<[^<>]+>/g," "))); wizardKit.hideCatch(); wizardKit.hideLog(); witscript.views.links.display(); witscript.menutree.focus(); witscript.views.links.previewSplitter.uncollapse() witscript.views.links.exportPreview.exportType.setValue("excel") witscript.views.links.exportPreview.setAttribute("width",400) //resize: function(dimension, steps, stepOffset, tempo, doBack, callback) wizardKit.resize(views.links.exportPreview, "width", 15, 2,100,true); wizardKit.eyeCatcher(views.links.exportPreview.layoutRenderer,1,1,0,0); witscript.wait(1500); witscript.views.links.exportPreview.exportType.setValue("csv") wizardKit.eyeCatcher(views.links.exportPreview.layoutRenderer,1,1,0,0); witscript.wait(1500); witscript.views.links.exportPreview.exportType.setValue("html")
witscript.views.links.exportPreview.layoutRenderer.unhighlight();
userSpace.generalFeatures.push({title : "Page display at the top, on every view.", description : "If you drag down the Info Bar at the top of any view, you can now see the page you are working on, at the same time as the data extracted from it."});
var step = Number(wizard.stepNumber()-1); if(userSpace.updateFocusTimer){ window.clearInterval(userSpace.updateFocusTimer) userSpace.updateFocusTimer = null; }; userSpace.GFList = ""; userSpace.GFDescription = ""; for(var i=0;i <= step;i++){ userSpace.GFList = userSpace.GFList + "<li class='note'>"+userSpace.generalFeatures[i].title+"</li>"; } userSpace.GFDescription = userSpace.generalFeatures[step].description; $("#GFList").html(userSpace.GFList); $("#GFDescription").html(userSpace.GFDescription); wizardKit.say((userSpace.generalFeatures[step].title + "..." + userSpace.generalFeatures[step].description.replace(/<[^<>]+>/g," "))); wizardKit.hideCatch(); wizardKit.hideLog(); witscript.views.images.display(); witscript.menutree.focus(); wizardKit.showLog(0); witscript.views.page.setAttribute("height",200) wizardKit.eyeCatcher(witscript.page,1,1,0,0);
userSpace.generalFeatures.push({title : "Moveable Log Panel.", description : "The Log Panel can be resized to leave space to the current page or document. Date and time are displayed, if the width is sufficient."});
var step = Number(wizard.stepNumber()-1); if(userSpace.updateFocusTimer){ window.clearInterval(userSpace.updateFocusTimer) userSpace.updateFocusTimer = null; }; userSpace.GFList = ""; userSpace.GFDescription = ""; for(var i=0;i <= step;i++){ userSpace.GFList = userSpace.GFList + "<li class='note'>"+userSpace.generalFeatures[i].title+"</li>"; } userSpace.GFDescription = userSpace.generalFeatures[step].description; $("#GFList").html(userSpace.GFList); $("#GFDescription").html(userSpace.GFDescription); wizardKit.say((userSpace.generalFeatures[step].title + "..." + userSpace.generalFeatures[step].description.replace(/<[^<>]+>/g," "))); wizardKit.hideCatch(); wizardKit.hideLog(); witscript.views.images.display(); witscript.menutree.focus(); wizardKit.showLog(0); witscript.wait(500); witscript.views.page.setAttribute("height",200) witscript.wait(500); witscript.page.logPanel.resize("width", null, 500, 800); wizardKit.eyeCatcher(witscript.page,1,1,0,0);
witscript.views.links.exportPreview.layoutRenderer.unhighlight();
userSpace.generalFeatures.push({title : "More Advanced Preference Settings.", description : "Proxy settings, non-latin character words handling, finer settings for complex AJAX extraction..."});
var step = Number(wizard.stepNumber()-1); witscript.views.page.display(); witscript.menutree.focus(); userSpace.GFList = ""; userSpace.GFDescription = ""; for(var i=0;i <= step;i++){ userSpace.GFList = userSpace.GFList + "<li class='note'>"+userSpace.generalFeatures[i].title+"</li>"; } userSpace.GFDescription = userSpace.generalFeatures[step].description; $("#GFList").html(userSpace.GFList); $("#GFDescription").html(userSpace.GFDescription); wizardKit.say((userSpace.generalFeatures[step].title + "..." + userSpace.generalFeatures[step].description.replace(/<[^<>]+>/g," "))); witscript.openPreferences("Advanced"); userSpace.top = wizard.getPosition().top; userSpace.left = wizard.getPosition().left; witscript.menus.tools.preferences.click(); userSpace.updateFocusTimer = userSpace.updateFocusTimer|| window.setInterval(userSpace.updateFocus,500);
userSpace.generalFeatures.push({title : "Export and Download file renaming.", description : "A preference now allows to define the renaming format of export files and downloads."});
var step = Number(wizard.stepNumber()-1); witscript.views.page.display(); witscript.menutree.focus(); userSpace.GFList = ""; userSpace.GFDescription = ""; for(var i=0;i <= step;i++){ userSpace.GFList = userSpace.GFList + "<li class='note'>"+userSpace.generalFeatures[i].title+"</li>"; } userSpace.GFDescription = userSpace.generalFeatures[step].description; $("#GFList").html(userSpace.GFList); $("#GFDescription").html(userSpace.GFDescription); wizardKit.say(userSpace.generalFeatures[step].title + "..." + userSpace.generalFeatures[step].description.replace(/<[^<>]+>/g," ")); witscript.openPreferences("Export"); userSpace.top = wizard.getPosition().top; userSpace.left = wizard.getPosition().left; witscript.menus.tools.preferences.click(); userSpace.updateFocusTimer = userSpace.updateFocusTimer || window.setInterval(userSpace.updateFocus,500);
window.clearInterval(userSpace.updateFocusTimer); userSpace.updateFocusTimer = null;
userSpace.generalFeatures.push({title : "Ordinal ID column for more precise selections.", description : "A new Ordinal column was added to all datasheets (hidden by default, check it in the column picker in the upper right corner to see it). This column contains an ID composed of three numbers, separated by dots (order of the page in an exploration, order of the data block within the page and order of occurrence, within the block). This is very useful to select specific items or ranges of items with the <em>'selectIf'</em> textbox, or in a macro."});
if(userSpace.updateFocusTimer){ window.clearInterval(userSpace.updateFocusTimer) userSpace.updateFocusTimer = null; }; witscript.views.lists.datasheet.showColumn("ordinal"); witscript.views.lists.display(); witscript.views.page.setAttribute("height",0) // doesn't work wizardKit.hideLog(); wizardKit.hideCatch(); //alert(Object.keys(views.lists.datasheet.headers)); witscript.wait(500); wizardKit.eyeCatcher(views.lists.datasheet.headers.Ordinal,1,1,0,0); //wizardKit.eyeCatcher(views.lists.datasheet,.12,.1,0,-20); var step = Number(wizard.stepNumber()-1); userSpace.GFList = ""; userSpace.GFDescription = ""; for(var i=0;i <= step;i++){ userSpace.GFList = userSpace.GFList + "<li class='note'>"+userSpace.generalFeatures[i].title+"</li>"; } userSpace.GFDescription = userSpace.generalFeatures[step].description; $("#GFList").html(userSpace.GFList); $("#GFDescription").html(userSpace.GFDescription); wizardKit.say(userSpace.generalFeatures[step].title + "..." + userSpace.generalFeatures[step].description.replace(/<[^<>]+>/g," "));
window.clearInterval(userSpace.updateFocusTimer); userSpace.updateFocusTimer = null;
userSpace.generalFeatures.push({title : "A revamped right-click menu.", description : "The right-click menu of all datasheets in the application was reorganized and includes a number of additional features like Replace, Rename Column, Select Block, Delete Columns with less than X values, Delete Unselected, Split Cells, Clean Up..."});
witscript.views.links.display(); wizardKit.hideCatch(); var step = Number(wizard.stepNumber()-1); userSpace.GFList = ""; userSpace.GFDescription = ""; for(var i=0;i <= step;i++){ userSpace.GFList = userSpace.GFList + "<li class='note'>"+userSpace.generalFeatures[i].title+"</li>"; } userSpace.GFDescription = userSpace.generalFeatures[step].description; $("#GFList").html(userSpace.GFList); $("#GFDescription").html(userSpace.GFDescription); wizardKit.say(userSpace.generalFeatures[step].title + "..." + userSpace.generalFeatures[step].description.replace(/<[^<>]+>/g," ")); //alert(Object.keys(views.links)); witscript.menutree.focus(); witscript.wait(200); witscript.views.links.focus(); witscript.views.links.datasheet.clickCell(5,"page url","right");
userSpace.SFList =""; userSpace.SFDescription = ""; $("#SFList").html(""); $("#SFDescription").html(""); $("#SFpresentationParagraph").html("Many new scraper directives and fonctions were added for more control in your custom extractions.<br /><br />(Your old scrapers should work fine. If you notice different behaviors, however, they probably come from the improvements in function interpretation, variable handling, etc.)"); wizardKit.say(this.parentNode);

Scraper Features

userSpace.scraperFeatures = []; userSpace.scraperFeatures.push({title : "New #pause# directive.", description : "#pause# in the description field and a number in the replace field will instruct the Hub to wait for the given number of seconds when the scraper line matches."});
witscript.views.page.load("http://www.outwit.com"); var step = Number(wizard.stepNumber()-1); wizardKit.hideCatch(); wizardKit.hideLog(); witscript.views.scrapers.display(); try{ var currentAutomator = views.scrapers.manager.currentAutomator(); if (currentAutomator && currentAutomator.automatorId == -1) { witscript.views.scrapers.editor.manageButton.click(); } }catch(e){alert(e.stack)}; try{ if (!userSpace.automatorName || userSpace.automatorName != currentAutomator.name) { witscript.wait(300); witscript.views.scrapers.manager.createAutomator("Tutorial - Scraper New Features"); witscript.wait(300); userSpace.automatorName = views.scrapers.manager.currentAutomator().name; witscript.views.scrapers.editor.url.setValue("A-String-To-Be-Found-In-The-URL"); } witscript.views.scrapers.editor.sourceSelector.static.click() }catch(e){alert(e)}; witscript.menutree.focus(); userSpace.SFList =""; userSpace.SFDescription = ""; userSpace.SFpresentationParagraph = ""; for(var i=0;i <= step;i++){ userSpace.SFList = "<li class='note'>"+userSpace.scraperFeatures[i].title+"</li>"; } userSpace.SFDescription = userSpace.scraperFeatures[step].description; $("#SFList").html(userSpace.SFList); $("#SFDescription").html(userSpace.SFDescription); $("#SFpresentationParagraph").html(""); wizardKit.say(userSpace.scraperFeatures[step].title.replace(/#/g,"") + "..." + userSpace.scraperFeatures[step].description.replace(/<[^<>]+>/g," ").replace(/#/g,"")); witscript.views.scrapers.editor.display(); witscript.views.scrapers.editor.datasheet.focus(); witscript.views.scrapers.editor.datasheet.select(0); if (userSpace.eyeCatcherOK) wizardKit.eyeCatcher(views.scrapers.editor,.5,.5,0,20); wizardKit.typeCellValue(views.scrapers.editor.datasheet, 0, 2, "#pause#"); wizardKit.typeCellValue(views.scrapers.editor.datasheet, 0, 5, 'some criterion'); wizardKit.typeCellValue(views.scrapers.editor.datasheet, 0, 6, '10'); witscript.menutree.focus(); witscript.views.scrapers.editor.saveButton.click();
userSpace.scraperFeatures.push({title : "Queue of URLs to explore.", description : "The <span pronunciation='add to queue'>#addToQueue#</span> directive, together with the <span pronunciation='next to visit'>#nextToVisit()#</span> function, allows you to grab interesting URLs with your scraper then explore them in the same browse process."});
var step = Number(wizard.stepNumber()-1); witscript.views.scrapers.display(); userSpace.SFList = ""; userSpace.SFDescription = ""; for(var i=0;i <= step;i++){ userSpace.SFList = userSpace.SFList + "<li class='note'>"+userSpace.scraperFeatures[i].title+"</li>"; } userSpace.SFDescription = userSpace.scraperFeatures[step].description; $("#SFList").html(userSpace.SFList); $("#SFDescription").html(userSpace.SFDescription); //wizardKit.say(userSpace.scraperFeatures[step].title + "..." + userSpace.scraperFeatures[step].description.replace(/<[^<>]+>/g," ").replace(/#/g,"")); wizardKit.say(userSpace.scraperFeatures[step].title + "..." + userSpace.scraperFeatures[step].description.replace(/#/g,"")); witscript.views.scrapers.editor.display(); witscript.views.scrapers.editor.datasheet.focus(); witscript.views.scrapers.editor.datasheet.select(2); if (userSpace.eyeCatcherOK) wizardKit.eyeCatcher(views.scrapers.editor,.5,.5,0,60); wizardKit.typeCellValue(views.scrapers.editor.datasheet, 2, 2, "#addToQueue#"); wizardKit.typeCellValue(views.scrapers.editor.datasheet, 2, 3, '<a href="'); wizardKit.typeCellValue(views.scrapers.editor.datasheet, 2, 4, '"'); wizardKit.typeCellValue(views.scrapers.editor.datasheet, 3, 2, "#nextPage#"); wizardKit.typeCellValue(views.scrapers.editor.datasheet, 3, 6, '#nextToVisit()#'); witscript.views.scrapers.editor.display(); witscript.menutree.focus(); witscript.views.scrapers.editor.saveButton.click();
userSpace.scraperFeatures.push({title : "Total and Concatenation Functions.", description : "You can now compute the #SUM#, #AVERAGE#, #MIN#, #MAX#, #COUNT#, and the #CONCAT# of all the matches for a scraper line. For this, enter the corresponding function in the Replace field."});
var step = Number(wizard.stepNumber()-1); witscript.views.scrapers.display(); wizardKit.hideCatch(); userSpace.SFList = ""; userSpace.SFDescription = ""; for(var i=0;i <= step;i++){ userSpace.SFList = userSpace.SFList + "<li class='note'>"+userSpace.scraperFeatures[i].title+"</li>"; } userSpace.SFDescription = userSpace.scraperFeatures[step].description; $("#SFList").html(userSpace.SFList); $("#SFDescription").html(userSpace.SFDescription); wizardKit.say(userSpace.scraperFeatures[step].title + "..." + userSpace.scraperFeatures[step].description.replace(/<[^<>]+>/g," ").replace(/#/g,"").replace(/CONCAT/,"concatenation")); witscript.views.scrapers.editor.display(); witscript.views.scrapers.editor.datasheet.focus(); witscript.views.scrapers.editor.datasheet.select(5); wizardKit.typeCellValue(views.scrapers.editor.datasheet, 5, 2, "Nb of links"); wizardKit.typeCellValue(views.scrapers.editor.datasheet, 5, 3, '<h2><a href="'); wizardKit.typeCellValue(views.scrapers.editor.datasheet, 5, 4, '"'); wizardKit.typeCellValue(views.scrapers.editor.datasheet, 5, 6, '#COUNT#'); witscript.views.scrapers.editor.display(); witscript.menutree.focus(); witscript.views.scrapers.editor.saveButton.click();



Our Tour is Now Over.

witscript.views.page.display(); wizardKit.say(this.parentNode); $(".owui-wizard-homelink").attr("style","color: #DFFFF9 !important; float:left;").html("More Tutorials");

These, however, were only a few of the most important new features of this version. Please check out the help center for detailed information on all the exploration and extraction functions of the application.

We will progressively publish more tutorials to lead you through the main features of OutWit Hub. Stay tuned.