Commands descriptions (in alphabetical order):
Types of Parameters descriptions:
In the function descriptions below, arguments to functions are preceded by their type. Types are described in the following table.
Type | Description | Example |
text | Text string | 'ABC', 'Click OK to continue', 'Welcome to Program X' |
int | Integer | 34, 0, 20 |
num | Real number | 10.54, 200.5, 1 |
bool | Boolean (true or false) | 0 or 1 only |
expr | Expression to be evaluated | winver(), if(getvar(3),2,5), msg('A or B?','A','B') |
Default Startup URL
When EZ Presentation first starts, it needs to decide which HTML file is the "start" of your presentation. Click here to see how it decides.
Other Important Information:
Links that use EZ Presentation commands must NOT use the TARGET=_BLANK option of the <a href> tag, or the EZ Presentation commands will not be processed. You can use TARGET=_BLANK for regular HTML links within your presentation.
Full descriptions of commands (in alphabetical order)
Command name: | add |
Brief description: | add two integers |
Usage syntax: | add(expr:EXPRESSION1,expr:EXPRESSION2) |
Examples of usage: | add(5,getvar(3)), setvar(2,add(1,getvar(2))) |
Notes: | Simple addition of two integer expressions. Useful for incrementing values. |
Command name: | browse |
Brief description: | browse (navigate) to a different URL |
Usage syntax: | browse(text:URL,[bool:NEWWIN]) |
Examples of usage: | browse('intro.htm') navigate away from current page to
intro.htm browse('license.htm',1) popup a separate browser to display license.htm browse('ezp:seq(browse('quiknote.htm'),winsize(200,150))',1) create a small popup browser window browse('ftp://ftp.yoursite.com') browse to an FTP site if(winver()>=400,browse('install.htm'),msg('Driver not available for your version of Windows')) Browse to the install page only if they have a recent enough version of Windows |
Notes: | The link seq:browse('page.htm') is equivalent to just linking to page.htm. But browse() lets you control how you browse, lets you conditionally link to a page, control the size of popup windows, etc. |
Command name: | exit |
Brief description: | exit the browse application |
Usage syntax: | exit() |
Examples of usage: | exit() |
Notes: | Immediately ends the application (e.g. seq(exit(),msg('Hello')) would not perform the msg() command. |
Command name: | getregint | ||||||||||
Brief description: | getregint -- get an integer registry value | ||||||||||
Usage syntax: | getregint(text:KEY,text:ITEM,[int:DEFAULT]) | ||||||||||
Examples of usage: |
getregint('hkey_current_user\Software\myprog','language') |
||||||||||
Notes: | Key names correspond to standard registry key names and
must start with one of the following 10 prefixes (case insensitive):
|
Command name: | getvar |
Brief description: | getvar -- get an integer value stored with setvar |
Usage syntax: | getvar(int:VARNUM) |
Examples of usage: | getvar(1), getvar(7) |
Notes: | There are 10 variable slots, so you can getvar(1) thru getvar(10) |
Command name: | if |
Brief description: | perform conditional tests |
Usage syntax: | if(expr:EXPR1=expr:EXPR2,cmd:IFTRUE,cmd:IFFALSE)
you can compare 2 expressions with: |
Examples of usage: | if(msg('Which?','A','B')=0,msg('You
clicked A'),msg('You clicked B')) if(winver()>=500,browse('Win2kXPInstall.htm'),browse('Win9xInstall.htm')) if(winver()>=500,playsound('FullSong.wma'),playsound('ShortSong.wav')) |
Notes: | The if() command lets you add logic to your presentation. |
Command name: | msg |
Brief description: | display a message box or ask the user a question |
Usage syntax: | msg(text:MESSAGE,[text:BUTTON1],[text:BUTTON2]) |
Examples of usage: | msg('Click OK to Continue') msg('Do you want to install?','Yes I do','Not now'); |
Notes: | Message boxes with 2 buttons return a 0 if button 1 is pressed, or 1 if button 2 is pressed. |
Command name: | open |
Brief description: | open an application, file, or folder |
Usage syntax: | open(text:FILE) |
Examples of usage: | open('test.exe') open('readme.doc') open('c:\program files\myprog\sample files'); |
Notes: | Launches any application, file or folder, as if you entered the FILE into the Run window of the Windows Start menu. |
Command name: | playsound |
Brief description: | play a sound/audio file |
Usage syntax: | playsound(text:FILENAME) |
Examples of usage: | playsound('sample.mp3') |
Notes: | Supported audio formats depend on the Windows installation. All machines can play WAV files, and most all can play MP3. Only machines with Media Play 6.4 or later can play WMA files. |
Command name: | playvideo |
Brief description: | play a video file |
Usage syntax: | playvideo(text:FILENAME) |
Examples of usage: | playvideo('sample.avi') |
Notes: | Supported video formats depend on the Windows installation. Make sure you encode with a standard AVI encoder and your video files will play on virtually any Windows 95/98/ME/2000/XP machine. Most modern machines will also show WMV and other video formats. (Technical note: playback is through an MCI window). |
Command name: | seq |
Brief description: | performs a sequence of commands in order |
Usage syntax: | seq(cmd:COMMAND1,[cmd:COMMAND2],...,[cmd:COMMANDN]) |
Examples of usage: | seq(play('Sound1.mp3'),browse('next.htm'),playvideo('Sound2.avi')) |
Notes: | This is useful for doing multiple things, for example, in response to a single click on a link, or multiple things in an if() statement. |
Command name: | setregint | ||||||||||
Brief description: | setregint -- set an integer registry value | ||||||||||
Usage syntax: | setregint(text:KEY,text:ITEM,int:VALUE) | ||||||||||
Examples of usage: | setregint('hkcu\software\myprog','preference',1) setregint('hkey_local_machine\Software\myprog','firstrun',1) |
||||||||||
Notes: | Key names correspond to standard registry key names and
must start with one of the following 10 prefixes (case insensitive):
|
Command name: | setvar |
Brief description: | setvar -- store an integer value |
Usage syntax: | setvar(int:VARNUM,expr:EXPRESSION) |
Examples of usage: | setvar(1,winver) setvar(2,msg('Play sound?','Yes','No')) setvar(5,add(1,getvar(5))) could be used to indicate how many times a link is clicked |
Notes: | All builtin variables default to 0. VARNUM can be from 1 to 10 (i.e. there are 10 builtin variables) |
Command name: | wait |
Brief description: | pause for a specified time |
Usage syntax: | wait(num:SECONDS) |
Examples of usage: | wait(10) wait 10 seconds wait(2.5) wait 2.5 seconds seq(playsound('sound1.wav'),wait(10),playsound('sound2.wav')) |
Notes: | Useful in a seq() command to delay the next command in the sequence from starting. |
Command name: | winsize |
Brief description: | change the size of the EZ Presentation window |
Usage syntax: | winsize(int:PIXELWIDTH,int:PIXELHEIGHT) |
Examples of usage: | winsize(400,200) make the browser 400 pixels by 200
browse('ezp:seq(browse('quiknote.htm'),winsize(200,150))',1) create a small popup browser window |
Notes: | This is mostly useful for doing multiple things, for example, in response to a single click on a link, or multiple things in an if() statement. |
Command name: | winver | ||||||||||||||||
Brief description: | returns the user's version of windows | ||||||||||||||||
Usage syntax: | winver() | ||||||||||||||||
Examples of usage: | if (winver()>=500,msg('You have Win 2000 or XP')) | ||||||||||||||||
Notes: |
|