Sketchify Tutorial Scripting sketchify.sf.net Željko Obrenović

Slides:



Advertisements
Similar presentations
Microsoft® Small Basic
Advertisements

Programming Paradigms and languages
 2007 Dr. Natheer Khasawneh. Chapter 13. Graphical User Interface Concepts: Part 1.
Sketchify Tutorial Timers sketchify.sf.net Željko Obrenović
Sketchify Tutorial Defining Interaction and Logic in Sketchify sketchify.sf.net Željko Obrenović
Sketchify Tutorial Variables sketchify.sf.net Željko Obrenović
Sketchify Tutorial Macros sketchify.sf.net Željko Obrenović
Basic HTML. HTML Background November 1990, first created by Tim Berners Lee, the father/inventor of WWW Knighted by Queen Victoria in 2004 Hypertext is.
Sketchify Tutorial Exercises sketchify.sf.net Željko Obrenović
Sketchify Tutorial Graphics and Animation in Sketchify sketchify.sf.net Željko Obrenović
Sketchify Tutorial Getting Started – Creating a New Project sketchify.sf.net Željko Obrenović
Sketchify Tutorial External Spreadsheets sketchify.sf.net Željko Obrenović
Fundamentals of Programming in Visual Basic 3.1 Visual basic Objects Visual Basic programs display a Windows style screen (called a form) with boxes into.
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
Sketchlet Tutorial Defining Interaction and Logic in Sketchlet sketchlet.sf.net Željko Obrenović obren.info/
Sketchlet Tutorial Screen Poking sketchlet.sf.net Željko Obrenović obren.info/
Sketchlet Tutorial Actions sketchlet.sf.net Željko Obrenović obren.info/
Chapter 3 Introduction to Event Handling and Windows Forms Applications.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Getting Started Example ICS2O curriculum
WORKING WITH MACROS CHAPTER 10 WORKING WITH MACROS.
Cosc 5/4730 Scripting layer for Android (SL4A). Android scripting SL4A brings scripting languages to the android, by allowing you edit and execute scripts.
Spring Quarter 2002 De Anza College1 Chapter 10 – Rollovers Simple Rollovers Swap images  Stack two images on top of one another  When mouse over an.
Javascript and the Web Whys and Hows of Javascript.
DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.
Copyright 2007, Information Builders. Slide 1 Maintain & JavaScript: Two Great Tools that Work Great Together Mark Derwin and Mark Rawls Information Builders.
Server vs Client-side validation. JavaScript JavaScript is an object-based language. JavaScript is based on manipulating objects by modifying an object’s.
“Automate Anything You See” Uses image recognition to identify and control GUI components Useful when there is no easy access to a GUI's internal or source.
Bertrand Bellenot ROOT Users Workshop Mar ROOT GUI Builder Status & Plans ROOT & External GUI World MFC, FOX, Qt, PVSS… Snapshot of the Future.
DEVSView: A DEVS Visualization Tool Wilson Venhola.
The Bean Counter: A JavaScript Program
David Streader Computer Science Victoria University of Wellington Copyright: David Streader, Victoria University of Wellington While loops and the UI API.
Sketchify Tutorial Defining Interaction and Logic in Sketchify sketchify.sf.net Željko Obrenović
Introduction to Matlab & Data Analysis
PYTHON. Python is a high-level, interpreted, interactive and object- oriented scripting language. Python was designed to be highly readable which uses.
2. Introduction to the Visual Studio.NET IDE. Chapter Outline Overview of the Visual Studio.NET IDE Overview of the Visual Studio.NET IDE Menu Bar and.
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
® IBM Software Group © 2006 IBM Corporation “Essential” HTML Tags and Page Development Techniques This Learning Module describes the standard HTML tags.
1 Extend is a simulation tool to create models quickly, with all the blocks you need and without even having to type an equation. You can use a series.
JavaScript - A Web Script Language Fred Durao
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
Windows Programming, C.-S. Shieh, KUAS EC, Chapter 0 Overview.
9-Nov-97Tri-Ada '971 TASH An Alternative to the Windows API TRI-Ada ‘97 Terry J. Westley
Contents : What is Silverlight? Silverlight Overview Silverlight Toolkit Overview Timeline & Packaging Silverlight V1.0 & V1.1 Properties of V1.0 Properties.
Sketchlet Tutorial Scripting sketchlet.sf.net Željko Obrenović obren.info/
G RAPHICS & I NTERACTIVE P ROGRAMMING Lecture 2 More Programming with Processing.
Python Lesson 1 1. Starter Create the following Excel spreadsheet and complete the calculations using formulae: 2 Add A1 and B1 A2 minus B2 A3 times B3.
Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott.
Sketchify Tutorial Mapping Design to Display Space sketchify.sf.net Željko Obrenović
Sketchify Tutorial Getting Started – Creating a New Project sketchify.sf.net Željko Obrenović
PATTERN RECOGNITION LAB 8 TA : Nouf Al-Harbi::
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
JavaScript and Ajax (JavaScript Environment) Week 6 Web site:
Adding Interactivity Comp 140 Fall Web 2.0 Major change in internet usage –From mostly static pages Text Graphics Simple links –To new paradigm.
CIS 205—Web Design & Development Flash Chapter 3 Working with Symbols and Interactivity.
Introduction to.
The Front End Module A comprehensive and sophisticated method of designing and managing User Interfaces Developed and Supplied By :- World Computers Ltd.
Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott.
JavaScript is a programming language designed for Web pages.
Donna J. Kain, Clarkson University
An Introduction to Computers and Visual Basic
Henning Schulzrinne Advanced Programming
Andrew J. Ko & Brad A. Myers Carnegie Mellon University
Tutorial 12 – Security Panel Application Introducing the Select Case Multiple-Selection Statement Outline Test-Driving the Security Panel Application.
Tutorial 6 Creating Dynamic Pages
DREAMWEAVER MX 2004 Chapter 7 Working with Layers
Using Functions
An Introduction to Computers and Visual Basic
JavaScript Basics What is JavaScript?
Presentation transcript:

Sketchify Tutorial Scripting sketchify.sf.net Željko Obrenović

Scripts In Sketchify scripting languages can be used to quickly outline the behavior of sketches Scripts are proven, highly productive and simple to learn and use end-user development paradigm Define more complex interaction scenarios, without requiring intensive programming

Scripts We currently support several higher-level scripting languages including Javascript, Python, BeanShell, and Groovy (experimental support for Ruby, TCL, Sleep, Haskell, and Prolog)

Sketchify Extends Scripting Languages Sketchify Scripting Extensions – Working with Variables – Getting User Input – Working with Region and Sketch Properties – Pause and Wait – Graphics

Extensions – Working with Variables amico.update(String variable, String value) amico.update(String variable, int value) amico.update(String variable, double value) String amico.get(String variable) String amico.getString(String variable) int amico.getInteger(String variable) double amico.getDouble(String variable) int amico.getCount(String variable) int amico.getTimestamp(String variable)

Extensions – Showing Message and Getting User Input amico.showMessage(String message) String amico.ask(String question) String amico.askString(String question) int amico.askInteger(String question) double amico.askDouble(String question)

Extensions – Working with Region Properties setRegionProperty(int number, String property, String value) setRegionProperty(int number, String property, int value) setRegionProperty(int number, String property, double value) String getRegionProperty(int number, String property) String getRegionPropertyAsString(int number, String property) int getRegionPropertyAsInteger(int number, String property) double getRegionPropertyAsDouble(int number, String property)

Extensions – Working with Sketch Properties setSketchProperty(String property, String value) setSketchProperty(String property, int value) setSketchProperty(String property, double value) String getSketchProperty(String property) String getSketchPropertyAsString(String property) int getSketchPropertyAsInteger(String property) double getSketchPropertyAsDouble(String property)

Extensions – Pause and Wait amico.pause(double seconds) amico.waitForUpdate(String variable) amico.waitUntil(String expression)

Extensions – Graphics amico.clearCanvas() amico.repaint() amico.setColor(int r, int g, int b) amico.setColor(int r, int g, int b, int transparency) amico.setTransparency(float transparency) amico.setLineWidth(double width) amico.setFont(String name, String style, int size) amico.translate(int x, int y) amico.rotate(double angle, int x, int y) amico.scale(double x, double y) amico.shear(double x, double y)};

Extensions – Graphics amico.drawText(String text, int x, int y) amico.drawLine(int x1, int y1, int x2, int y2) amico.drawRect(int x, int y, int w, int h) amico.drawEllipse(int x, int y, int w, int h) amico.drawCircle(int center_x, int center_y, int r) amico.fillRect(int x, int y, int w, int h) amico.fillEllipse(int x, int y, int w, int h) amico.fillCircle(int center_x, int center_y, int r) amico.drawImage(String strPathOrURL, int x, int y) amico.drawImage(String strPathOrURL, int x, int y, int w, int h) amico.getTextWidth(String text) amico.getTextHeight(String text)

Variable Declarations Inside Scripts Sketchify Variable NameDeclaration in scripts position xposition_x motion-intensitymotion_intensity aa When a script is called, Sketchify variables will be redeclared within the script Variables may be renamed to satify naming convention of scripting languages Read-only, use amico.update to change the value of a Sketchify variable

Script Editor

Example amico.clearCanvas(); n = amico.askInteger("Number of lines:"); for (i = 0; i < n; i++) { amico.drawLine(i * 10, 100, i* 20, 200); }

Merging Image Generated by Scripts and Background Sketch Image Scripts draw in a separate layer on top of the sketch The image from this layer can be merged with the background sketch image (i.e. it becomes a part of that image) Merge the image generated by scripts with the background sketch image Clear the image generated by scripts

Calling Scripts Scripts can be called from several places – On active region mouse events – On sketch events (entry or exit) – On variable updates ("On Variable Update" actions) – On keyboard events – From other macros, as one of the commands Drag-and-Drop on any sketch or region event Directly specify in settings

Drop Event Anchors Anchors for connecting sketch events (on entry, on exit, on variable update, on keyboard event) by drag-and-drop of variables, timers and macros. You can also double-click on these icons to open current settings for these events and properties. Anchors for connecting region events (region overlap, discrete mouse events, continues mouse events) by drag-and-drop of variables, timers and macros. You can also double-click on these icons to open current settings for these events and properties.

Drag-and-drop of the script on the mouse event icon of the active region.

Directly Specify in Settings

To Learn More About Scripting Languages JavaScript – – – BeanShell – Groovy – Python – …