FKiSS 5 Specifications (UltraKiss Extensions)


 

FKiSS5

FKiSS 5 is a set of extension commands that have been specifically developed for Kisekae UltraKiss.  These commands are not supported in other viewers and have been developed to explore extensions to the FKiSS language.  Some of these extensions have been proposed by the user community.  In the UltraKisss FKiSS 5 version, labels, alarms and variables can be of an unlimited length and variables can have any name as long as it starts with a letter. Variable values can be either integers or strings.  Objects can be referenced through either a simple variable name such as 'ThisVar' or through object references followed by a variable name, such as '#ThisVar'.  

A variable that contains a numeric value can be used in any FKiSS command that requires a numeric or string value.  A variable that contains a non-numeric string, if used with an FKiSS command that expects a numeric value, will be given the value 0.

The UltraKiss FKiSS 5 extensions introduce string concatenation commands and string manipulation commands.  The concat() action statement takes an unlimited number of string arguments or variables and concatenates the values together.  The substr() action statement extracts substrings from a string or variable.  The strlen() action statement returns the number of characters in a string.  The indexof() action statement returns the character index of a specific character or substring within a string.

The UltraKiss FKiSS 5 extensions support nested if-else-endif, while-endwhile, and for-next statements.  FKiSS 5 introduces for-next iteration statements and while-endwhile loop statements.   For-next iteration provides a loop counter for repeated action statement execution.  While-endwhile looping introduces a managed loop structure that terminates when a control variable is set to zero.  Nested if-else-endif statements are possible to any reasonable depth.

The UltraKiss FKiSS 5 extensions also introduce indirect variable references to variable values.  Variable names preceded with the "$" indirect reference symbol indirectly reference the value of the named variable.  For example, the statement 'let(X,$MyVar)' sets variable X to the value of the value of $MyVar.  If '$MyVar' had the string value 'AnotherVar', variable X would be set to the value of 'AnotherVar'.  Indirect reference variables are created with let() statements.  For example, the statement 'let($MyVar,"AnotherVar")' creates the variable $MyVar that is an indirect reference to 'AnotherVar'.  Multiple levels of indirection are possible.

The UltraKiss FKiSS 5 extensions also introduce the notion of local variables within label functions.  Local variables are preceded with the "@" local variable symbol.  Local variables are unique to the currently executing event. Selective use of local variables provides support for recursive calls into label modules.  For example, the statement 'let(@Row,10)' creates a local variable '@Row' within the current event.  This variable is defined only within the scope of the label function.  

UltraKiss FKiSS 5 label functions can now accept parameter values and return a result.  The gosub() statement has been extended to enable the specification of optional parameters to the label call. The label() statement can specify optional arguments following the label name.  The argument values are referenced as local variables within the label module.  The label routine can return a value to the calling routine by setting a local variable named with the label name to the return value.  The calling routine can reference the return value through a local variable reference.  See the following example for computing the factorial of a number.

;@EventHandler
;@begin() 
;@ gosub(Factorial,5)          ; 5 is an argument to the factorial label routine
;@ notify("5! is ",@Factorial) ; the return value is in local variable @Factorial

;@label(Factorial,@N)          ; local variable @N is the function parameter
;@ iflessthan(@N,2) 
;@  let(@Factorial,@N) 
;@  exitevent() 
;@  endif() 
;@ sub(@N1,@N,1) 
;@ gosub(Factorial,@N1) 
;@ mul(@X,@N,@Factorial) 
;@ let(@Factorial,@X)          ; local variable @Factorial is the return value

New UltraKiss FKiSS 5 commands have also been defined to retrieve and set graphical user interface component values.  To facilitate constructing buttons and text boxes UltraKiss supports basic GUI components such as Labels, Buttons, Lists, Text Areas, Text Fields, Check Boxes, Radio Buttons, and Combo Boxes.  These components are treated as KiSS cels.  Passive components that do not accept input, such as labels, buttons, and read only text areas may respond to standard KiSS events such as press and release.  Input components such as check boxes, text fields, and so on intercept mouse events and their value or state can be retrieved through another event, such as a button press.   Many new UltraKiss FKiSS 5 specific commands are introduced to examine and change GUI component state.

The UltraKiss FKiSS 5 extensions also introduces new file I/O commands  open(), read(), write(), edit() and close() for reading and writing persistent files.

The UltraKiss FKiSS 5 extensions also provide support for more than 10 page sets and 10 color sets.  An unrestricted number of page or color sets may be created.

The UltraKiss FKiSS 5 extensions also introduce the mediastart() and mediastop() events and the mediaplayer() action command to manage sound files.

The UltraKiss FKiSS 5 extensions also provide support for the clone() and destroy() action commands to dynamically create and remove new objects.

The UltraKiss FKiSS 5 extensions also provide support for retrieving the host environment state information.  A new environment() action command allows for retrieval of date and time information, user information, and other system values.  A new viewer() command enables automatic execution of viewer specific functions, such as page resets, option settings, print control, menu control, and so on.

 


Events (FKiSS 5)

keypress() (UltraKiss enhanced)

Syntax: keypress(any keyboard character or key)
Example: keypress("a"), keypress("2"), keypress("right"), keypress("")

Triggered by pressing the key with that name. There is no autorepeat and there there is no difference between uppercase and lowercase characters. The keypress event will recognize all keys including cursor control keys, function keys, alt, shift, or control keys, page control keys and escape keys.  A keypress event with a zero length string ("") will recognize any key input.

Cursor keys are identified as "Left", "Right", "Up" and "Down".  Function keys are identified as "F1", "F2", ...  Control keys are identified through their names such as "Escape", "Shift", "Ctrl", "Page Up" and so on.

"Key pressed" and "key released" events are lower-level and depend on the platform and keyboard layout. They are generated whenever a key is pressed or released, and these events are the only way to find out about keys that don't generate character input (e.g., action keys, modifier keys, etc.). The key being pressed or released is indicated by the letKeyCode action method, which returns a unique code for every key.

Related events: keyrelease(), keytype()
Related actions: letkey(), letkeymap(), letkeychar(), letkeycode(), letkeymodifier(), letkeystring()

keyrelease() (UltraKiss enhanced)

Syntax: keyrelease(any keyboard character or key)
Example: keyrelease("a"), keyrelease("2"), keyrelease("right"), keyrelease("")

Triggered by releasing the key with that name. There is no difference between uppercase and lowercase characters. The keyrelease event will recognize all keys including cursor control keys, function keys, alt, shift, or control keys, page control keys and escape keys.  A keyrelease event with a zero length string ("") will recognize any key input.

Cursor keys are identified as "Left", "Right", "Up" and "Down".  Function keys are identified as "F1", "F2", ...  Control keys are identified through their names such as "Escape", "Shift", "Ctrl", "PageUp" and so on.

"Key pressed" and "key released" events are lower-level and depend on the platform and keyboard layout. These events are generated whenever a key is pressed or released, and are the only way to find out about keys that don't generate character input (e.g., action keys, modifier keys, etc.). The key being pressed or released is indicated by the letKeyCode action method, which returns a unique code for every key.

Related events: keypress(), keytype()
Related actions: letkey(), letkeymap(), letkeychar(), letkeycode(), letkeymodifier(), letkeystring()

keytype() 

Syntax: keytype(any keyboard character)
Example: keytype("a"), keytype("2"), keytype("right"), keytype("")

Triggered by typing a key with that letter/number. There can be a difference between uppercase and lowercase characters depending on the setting of the UltraKiss key case option.   A keytype event with a zero length string ("") will recognize all typed key input.

"Key typed" events are higher-level and do not depend on the platform or keyboard layout. They are generated when a character is entered, and are the preferred way to find out about character input. In the simplest case, a key typed event is produced by a combination of a key press followed by a key release. Often, however, characters are produced by series of key presses and key releases, using modifier keys such as Shift and Ctrl. No key typed events are generated for keys that don't generate characters (e.g., action keys, modifier keys, etc.).

Related events: keypress(), keyrelease()
Related actions: letkey(), letkeymap(), letkeychar(), letkeycode(), letkeymodifier(), letkeystring()

mediastart()

Syntax: mediastart(media file), 
Example: mediastart("favoritesong.mp3"), mediastart("movie.mpg") 

Triggered when the specified media file begins playing.  This event is triggered for sound files, movie files, music files, or mediaplayer files.

Related events: mediastop()
Related actions: mediaplayer(), sound(), music(), movie()

mediastop()

Syntax: mediastop(media file), 
Example: mediastop("favoritesong.mp3"), mediastop("movie.mpg")

Triggered when the specified media file stops playing..    This event is triggered for sound files, movie files, music files, or mediaplayer files.

Related events: mediastart()
Related actions: mediaplayer(), sound(), music(), movie()



Actions (FKiSS 5)

addItem()

Syntax: addItem(string/variable A, cel/variable B)
Example: addItem(S,"list2.List"), addItem(S,ComboBox)

This is a GUI component command to add a new entry to a list or combo box component.  The new entry is added to the end of the list.

Related actions: removeItem()

 

animate()

Syntax: animate(celname/variable A,integer/variable B)
Example: animate("bunny.gif",1), animate("",0), animate(!CelGroup,1), animate(#3,0), animate(Var,Switch)

Sets the animation enable state for image cels that support frame animation.  This applies to animated GIF images.  A non-zero value enables image animation.  A zero value disables image animation.  If an object group or cel group is specified for variable A then all image cels in the group will be individually enabled or disabled.  If no cel name is specified then the animation control thread is either enabled or disabled.  If the control thread is disabled no image cels will animate.  If the control thread is enabled all enabled image cels will animate.  

 

clone()

Syntax: clone(variable A,object/variable B)
Example: clone(NewObject,#17), clone(ObjectN,#AnotherObject)

Cloning a KiSS object creates a new object number and this is returned in a variable. All image cels within the object are cloned, too, creating new image copies. Thus, a cloned object group looks and behaves like the original object group. These objects are internal and not written to the configuration file when saved. Coned objects retain all events attached to the original objects. Thus, press() and release() events apply to cloned objects as well as the original object. The letcatch() command can be used to identify the source of the press() event. This is used to identify the object number receiving the event as the receiving object may not be the same object specified on the press() command. Cloned objects are initially unmapped.

Related actions: destroy()


close() 

Syntax: close(integer variable A, string/variable B, [string/variable C, integer/variable D])
Example: close(Status,"myfile.txt"), close(N,FileName,"commit"), close(N,"EncodedFile.txt","commit",1)

Closes an external file opened for reading or writing.  If the file was opened for read only mode then closing the file simply removes reference to the file from the configuration. If the file was opened for write mode then the file will be written only if the "commit" parameter is specified on the close statement.  The file will, by default, be written to the directory from which the configuration was loaded. If this directory is read-only then the UltraKiss program base directory is used. The optional Encode integer parameter D, if non-zero, encodes the file contents when written.  Encoded files are unintelligible when viewed in as normal text files.

The status value returned in variable A will be less than zero if a close error occurred.  

String/variable C should have the value "commit" to force a write of the file to permanent storage.

Related actions: read(), write(), open()

 

concat()

Syntax: concat(variable A,string/variable B,string/variable C, ...)
Example: concat(S,"ultra","kiss","v1.0"), concat(NewString,String1,String2)

Concatenates multiple strings and stores the result in variable A.  An unlimited number of variable arguments may be provided. 

Related actions: substr()

 

confirm()

Syntax: confirm(variable A, string/variable A, string/variable B, ...)
Example: confirm(Answer,"Do you want to continue?"), confirm(N,MyMessage,ContinuedMessage)

Outputs the text in the string to a modal dialog box that provides for a YES and NO optional response.  Modal dialogs suspend the event or label execution until a response is made.  The value returned in variable A is 1 if YES was selected, 0 otherwise.  


Related actions: notify(), debug()


debug() (UltraKiss enhanced)

Syntax: debug(string/variable A,string/variable B, ...)
Example: debug("This is an error message")

Outputs the text in the string to a dialog or text file, depending on the viewer.  An unlimited number of variable arguments may be provided.  Multiple string or variable values are concatenated.

Related actions: notify()

destroy()

Syntax: destroy(object/variable A)
Example: destroy(#17), destroy(ClonedObject)

The destroy() action will remove an object definition from the KiSS configuration.  After an object is destroyed the object number can no longer be referenced.  Note that objects created through clone() commands are interim objects and are never written to the configuration file if the configuration is saved. 

Related actions: clone()

 

edit()

Syntax: edit(variable A,string/variable B, string/variable C, string/variable D, string/variable E, ... )
Example: edit(N,"myfile.txt","append","A line of text"), edit(N,File,"getText",S), edit(N,File,"replaceAll","this","that") 

Invokes simple editing commands on a text file previously opened with a file open() command.  Variable A is a status variable that returns the number of bytes in the file after the edit operation completes.  Variable A is set to -1 if an error occurs or the file is not open.  Variable B identifies the edit command.  Commands are as follows:

"append" Appends the string in variable D to the end of the file.
"replace" Replaces the first occurrence in the file of the string in variable D with the value of variable E.
"replaceall" Replaces all occurrences in the file of the string in variable D with the value of variable E.
"delete" Deletes the first occurrence in the file of the string in variable D.
"gettext" Returns, in variable D, the complete text of the file.
"settext" Sets the contents of the file to the value of variable D.
"getbody" Returns, in variable D, the body text of the file.  For HTML files this is all text between the <body> and </body> tags.


Related actions: open()

 

endwhile()

Syntax: endwhile(variable A)
Example: endwhile(B)

Signals the end of the preceding while() statement block.  The variable A should match with the variable used in a preceding while() statement.

Related actions: while()

 

environment()

Syntax: environment(variable A, string/variable B, variable C, variable D, ... )
Example: environment(User,"getUser"), environment(Date,"getDate"), environment(Year,"calendar","getYear",Calendar)

Enables access to variables and objects external to the UltraKiss environment.  The environment() command can be currently be used to obtain the registered user name, the system date and time, and access to Calendar objects that enable date manipulation.  Features available through this command are expected to change.

Environment commands, specified as variable B, are shown below.  Environment commands are not case sensitive.

"getdate" Returns the current date in variable A.  The date is a string of the form MMM DD YYYY.
"gettime" Returns the current time in variable A.  The time is a string of the form HH:MM:SS.
"getuser" Returns the UltraKiss registered user name.
"gettotalmemory" Returns the total memory, in bytes, available to the Java virtual machine.
"getfreememory" Returns the free memory, in bytes, currently available.  This may not be accurate as Java memory management may not have reclaimed all available memory.
"calendar" This invokes commands on the Calendar subsystem.  Calendar commands are specified in environment variable C as follows:
"getInstance" Returns, in variable A, a Calendar object.  This object is initialized to the integer year, month, and day values passed as environment variables D, E, and F.  If year, month, and day values are not provided the Calendar object is initialized to the current date.  The returned Calendar object can be used on subsequent Calendar commands. Examples follow

environment(MyCalendar,"calendar","getInstance",Y,M,D)
environment(Cal,"calendar","getInstance")

"getyear" Returns, in variable A, the numeric year from the specified calendar object provided in variable D.  If no calendar object obtained through a previous "getInstance" call is provided then the current year is returned.  Examples follow:

environment(Year,"calendar","getYear",Calendar)
environment(Year,"calendar","getYear")

"getmonth" Returns, in variable A, the numeric month from the specified calendar object provided in variable D.  If no calendar object obtained through a previous "getInstance" call is provided then the current month is returned.
"getdate" Returns, in variable A, the numeric date from the specified calendar object provided in variable D.  If no calendar object obtained through a previous "getInstance" call is provided then the current date is returned.
"getdayofweek" Returns, in variable A, the current day of the week of the date in the specified calendar object provided in variable D.  If no calendar object obtained through a previous "getInstance" call is provided then the current day of week is returned.  The day of week is a number from 0 to 6 in the Gregorian calendar, beginning from Sunday.
"getdaysinmonth" Returns, in variable A, the number of days in the month for the date in the specified calendar object provided in variable D.  If no calendar object obtained through a previous "getInstance" call is provided then the current month is used.  
"year" Returns, in variable A, the string representation of the year from the specified calendar object provided in variable D.  If no calendar object obtained through a previous "getInstance" call is provided then the current year is returned. 
"month" Returns, in variable A, the string representation of the month from the specified calendar object provided in variable D.  If no calendar object obtained through a previous "getInstance" call is provided then the current month is returned. Values are January, February, March, ...
"date" Returns, in variable A, the string representation of the date from the specified calendar object provided in variable D.  If no calendar object obtained through a previous "getInstance" call is provided then the current date is returned.
"dayofweek" Returns, in variable A, the string representation of the day of week from the specified calendar object provided in variable D.  If no calendar object obtained through a previous "getInstance" call is provided then the current date is used.  Values are Sunday, Monday, Tuesday, ...
"setyear" Sets the year in the Calendar object passed as environment variable D to the integer value specified in environment variable E.  A new Calendar object is returned in variable A.  If a calendar object is not passed in variable D a new Calendar instance is returned.
"setmonth" Sets the month in the Calendar object passed as environment variable D to the integer value specified in environment variable E.  A new Calendar object is returned in variable A.  If a calendar object is not passed in variable D a new Calendar instance is returned.
"setdate" Sets the date in the Calendar object passed as environment variable D to the integer value specified in environment variable E.  A new Calendar object is returned in variable A.  If a calendar object is not passed in variable D a new Calendar instance is returned.



Related actions: viewer()

 

event()

Syntax: event(string/variable A,string/variable B, [variable C, variable D, ...] )
Example: event("press","#121"), event("in",Object1,Object2)

Fires an event.  The event name is provided as variable A and the event parameters are specified in the remaining variables.  The event to be fired is identified by its signature.  The event signature is the parameter list as specified on the event declaration.  The signature must match for the event to be fired.  

for()

Syntax: for(variable A,integer/variable B,integer/variable C[,integer/variable D])
Example: for(A,1,10), for(Index,Start,Stop,-1)


Initiates a for-next iteration loop.  Variable A is the control variable that is set to the iteration index.  Integer/variable B is the starting value for the loop.  Variable A is initialized to this value on the first iteration of the loop. Integer/variable C is the loop termination value.  The loop ends when Variable A is greater than  integer/variable C and the step interval is positive, or less than integer/variable C and the step interval is negative.  Integer/variable D is an optional step value.  If integer/variable D is not specified the step value defaults to 1.  At the end of every loop iteration Variable A is incremented by the step value. 

Related actions: next()

 

getIndexOf()

Syntax: getIndexOf(integer/variable A, cel/variable B, string/variable C)
Example: getIndexOf(N,"list1.List",S), getIndexOf(N,ComboBox,"An entry")

This is a GUI component command to retrieve the selected index value in a list or combo box component.    Index values begin from 0.  The index of the specified entry is returned in variable A.  If the entry does not exist variable A is set to -1.

Related actions: getSelectedIndex()

 

getItemCount()

Syntax: getItemCount(integer/variable A, cel/variable B)
Example: getItemCount(N,"list1.List"), getItemCount(N,ComboBox)

This is a GUI component command to retrieve the count of the number if items in a list or combo box component.  The item count is returned in variable A.    

Related actions: removeItem(), getIndexOf()

 

getSelected()

Syntax: getSelected(integer/variable A, cel/variable B)
Example: getSelected(N,"button1.Button"), getSelected(N,"rb2.RadioButton"), getSelected(N,"cb3.CheckBox")

This is a GUI component command to retrieve the selected state of a button component.   If the component is selected variable A is set to 1.  If the component is not selected variable A is set to 0.

Related actions: setSelected()

 

getSelectedIndex()

Syntax: getSelectedIndex(integer/variable A, cel/variable B)
Example: getSelectedIndex(N,"list1.List"), getSelectedIndex(N,"combobox2.ComboBox")

This is a GUI component command to retrieve the selected index value in a list or combo box component.    Index values begin from 0.  If no value is selected variable A is set to -1.

Related actions: setSelectedIndex()

 

getSelectedItem()

Syntax: getSelectedItem(string/variable A, cel/variable B)
Example: getSelectedItem(Item,"combobox2.ComboBox")

This is a GUI component command to retrieve the selected value from a combo box component.    The text of the item is returned in string variable A.  If no item is selected variable A is set to the empty string.

Related actions: setSelectedItem()

 

getSelectedValue()

Syntax: getSelectedValue(string/variable A, cel/variable B)
Example: getSelectedValue(S,"list1.List"), getSelectedValue(S,"combobox2.ComboBox")

This is a GUI component command to retrieve the selected text value in a list or combo box component.    If no value is selected variable A is set to the empty string.

Related actions: setSelectedValue()

 

getText()

Syntax: getText(string/variable A, cel/variable B)
Example: getText(S,"button2.Label"), getText(S,Button)

This is a GUI component command to retrieve the text value for a component.  

Related actions: setText()

 

getValueAt()

Syntax: getValueAt(string/variable A, cel/variable B, integer/variable C )
Example: getValueAt(S,"list2.List",1), getValueAt(S,ListComponent,Index)

This is a GUI component command to retrieve the selected value at the specified index for a list component.  Index values begin from 0.  If the index is out of range variable A is set to the empty string.

Related actions: setValueAt()

 

indexof()

Syntax: indexof(variable A,string/variable B,string/variable C)
Example: indexof(N,"This is a string","is"), indexof(X,String,"abc"), indexof(N,S,S2)

Returns in variable A the starting character index in string B of substring C.  If C does not exist in B, then variable A is set to -1.  String character indexes start at 0.

Related actions: concat(), substr(), replacestr(),  strlen()

letcatch() (UltraKiss enhanced)

Syntax: letcatch(variable A, [cel group/object/cel/variable B])
Example: letcatch(WhichObject,!RunningFigure)


Sets the variable to the object that has just participated in a collision. If no object collided, the variable is set to -1.  If a cel group is specified as the optional second parameter to this command, UltraKiss returns the object group within the specified cel group that participated in the current collision event.  This form of the letcatch() command can only return a non-negative value if used within an in(), stillin() or collide() event.

This command provides a way to determine the specific object that participated in a collision.

Related actions: letcatch() in FKiSS 3


letcel()

Syntax: letcel(variable)
Example: letcel(Y)

Sets the variable to the name of the last cel that has just been pressed (clicked on). If no object has been clicked on, the variable is not set.  

Related actions: letcatch()

letcomment()

Syntax: letcomment(variable A,celname/variable B )
Example: letcomment(X,"shirt.cel"), letcomment(Comment,CelX)

Sets variable A to the comment text associated with the cel specified. If no comment text exists variable A is set to the empty string.

letframe() (UltraKiss enhanced)

Syntax: letframe(variable A, cel group/object/cel/variable B)
Example: letframe(WhichStep,!RunningFigure), letframe(F,#17), letframe(N,MyObject), letframe(F,"animated.gif")

Sets the variable A to the value of the current frame of the cel group, or if the cel group hasn't been set to a frame or has no frames, to -1.  UltraKiss object groups are implicit cel groups, too.  All image cels in an object on a page are a set.  The letframe() command for an object will return the current image frame of the object if it has been set to a frame, or -1.  Animated images will return the current frame number of the image.  

Related actions: setframe()
Related tags: !

 

letkcf() 

Syntax: letkcf(variable,celname)
Example: letkcf(L,"this.cel")

Fills the variable with the ordinal number of the active palette file for the specified image cel.  This is the number, beginning from zero, of the palette file sequence in the configuration file.  This is also the palette file number as specified on the cel configuration definition line.  If the cel is Cherry Kiss or truecolor, this command returns -1.


Related events: col()
Related actions: changecol(), letpal(), setkcf(), setpal()

letkeychar()

Syntax: letkeychar(variable )
Example: letkeychar(X)

Sets the variable to the key character of the last key pressed or typed.  This is the key letter for keys that generate character input or the name of the key for keys that do not generate input.  For example, pressing the 'A' key generates the value 'A', and pressing the 'shift' key generates the value 'Shift'.

Related events: keypress()
Related actions: letkeycode(), letkeymodifier(), letkeystring()

letkeycode()

Syntax: letkeycode(variable )
Example: letkeycode(X)

Sets the variable to the virtual key code of the last key pressed or typed.  The key code is unique for all keys.  The key code values are defined in the Virtual Key Code table.

Related events: keypress()
Related actions: letkeychar(), letkeymodifier(), letkeystring()

letkeymodifier()

Syntax: letkeymodifier(variable )
Example: letkeymodifier(String)

Sets the variable to the name of the key modifier used (alt, shift, ctrl, ctrl+shift) for the last key typed.

Related events: keypress()
Related actions: letkeychar(), letkeycode(), letkeystring()

letkeystring()

Syntax: letkeystring(variable )
Example: letkeystring(String)

Sets the variable to the last line of keys typed. This is a case sensitive string. The keystring value represents the current line of keyboard input.   The key string is reset after an Enter key has been typed.  To obtain the last full line of keyboard input, use a keyrelease event for the "Enter" key and access the value returned by letkeystring.

Related events: keytype()
Related actions: letkeychar(), letkeycode(), letkeymodifier()

 

letlevel()

Syntax: letlevel(variable A,object/variable B)
Example:  letlevel(A,#21), letlevel(N,#Object), letlevel(X,"skirt.cel")

Sets variable A to the value of the draw level, or z-order of the specified object or cel.  The draw level defines the drawing sequence for image overlays.  Objects with small draw levels are drawn on top of objects with larger draw levels.  Image cel draw levels are initially set to their ordinal sequence, or line in the configuration file. Object group draw levels are initially set to the largest (or bottom) draw level of all image cels contained within the object group.

Related actions: setlevel() 

 

letmodal()

Syntax: letmodal(variable A)
Example: letmodal(ModalObject)

Returns the modal input object group or cel.  If a modal object is set FKiSS events are only processed if they initiate from the modal source.  This command is typically used to determine if a modal input state has been set. The specified variable is set to either the integer object group number of the modal object or the string name of the model cel if a modal state exists.  If no modal state has been set this function returns the value -1.

Related actions: setmodal()

 

letpal() (UltraKiss enhanced)

Syntax: letpal(variable[,celname])
Example: letpal(N), letpal(L,"this.cel")

If the optional celname parameter is specified then this command fills the variable with the number of the active palette group for the specified image cel.  If the specified cel is Cherry Kiss or truecolor then 0 is returned.  If the optional parameter is not specified then the variable is filled with the number of the active color set or palette group in use.  


Related events: col()
Related actions: changecol(), setpal(), setkcf(), letkcf(), letpal() in FKiSS 3

 

mediaplayer()

Syntax: mediaplayer(media string/variable )
Example: mediaplayer("mysong.mid"), mediaplayer(Song), mediaplayer("playlist.lst"), mediaplayer("")

Starts the media player for the specified media file.  Sound files, movie files, or media playlist files can be specified.  Issuing mediaplayer("") stops the media player.  A media player instance is started if it is not active.  If the media player is active it will stop playing any active file and switch to play the specified file.

Related events: mediastart(), mediastop()
Related actions: sound(), music(), movie()

 

mouseRelease()

Syntax: mouseRelease()
Example: mouseRelease()

This command can be used to force a mouse release condition as if the user released the mouse button.  Release() or drop() events are fired on any object or cel that is under user mouse control.  This command is case sensitive.


move() (UltraKiss enhanced)

Syntax: move(object/variable A, pixels to right/integer variable B, pixels down/integer variable C [,noconstrain integer/string/variable D])
Example: move(#25,100,-60), move(#25,Xoffset,Yoffset), move(#MyObject,1,1), move(MyObject,1,1), move(#5,-1,-1,"noconstrain")

Moves the object the given number of pixels away from its current X/Y coordinates, on the current page. Negative values move the object up and to the left.  Variables can be used for all parameters including the move object or the movement offsets.  If an optional fourth parameter is set the movement is not constrained to fit within the playfield.  Users are encouraged to specify either the numeric value 1 or the string "noconstrain" to specify no movement constraint.  These values will be enforced in a later version of UltraKiss.

Related actions: movebyx(), movebyy(), moveto(), moverandx(), moverandy(), movetorand()

movebyx() (UltraKiss enhanced)

Syntax: movebyx(object/variable A to move, offset object/variable B, distance in pixels/integer variable C [,noconstrain integer/string/variable D])
Example: movebyx(#88,#9,100), movebyx(#88,#BaseObject,100), movebyx(#MyObject,#10,Offset), movebyx(#88,#9,100,"noconstrain")

Moves the first object to the X coordinate of the second object, plus the distance in pixels, on the current page. If the third value is positive, the first object moves to the right of the second object; if negative, to the left.  Variables can be used for all parameters including the move object or the movement offsets.  If an optional fourth parameter is set the movement is not constrained to fit within the playfield.  Users are encouraged to specify either the numeric value 1 or the string "noconstrain" to specify no movement constraint.  These values will be enforced in a later version of UltraKiss.

Related actions: move(), movebyy(), moverandx(), letobjectx()

movebyy() (UltraKiss enhanced)

Syntax: movebyy(object/variable A to move, offset object/variable B, distance in pixels/integer variable C [,noconstrain integer/string/variable D])
Example: movebyy(#88,#9,100), movebyy(#88,#BaseObject,100), movebyy(#MyObject,#10,Offset), movebyy(#88,#9,100,"noconstrain")

Moves the first object to the Y coordinate of the second object, plus the distance in pixels, on the current page. If the third value is positive, the first object is moved below the second object; if negative, then above.  Variables can be used for all parameters including the move object or the movement offsets.  If an optional fourth parameter is set the movement is not constrained to fit within the playfield.  Users are encouraged to specify either the numeric value 1 or the string "noconstrain" to specify no movement constraint.  These values will be enforced in a later version of UltraKiss.

Related actions: move(), movebyx(), moverandy(), letobjecty()

moverandx() (UltraKiss enhanced)

Syntax: moverandx(object/variable A, minimum value/integer variable B, maximum value/integer variable C [,noconstrain integer/string/variable D])
Example: moverandx(#9,100,200), moverandx(#9,-10,10), moverandx(#Object,Min,Max), moverandx(MyObject,Min,Max,"noconstrain")

Chooses a random value between the minimum and maximum value and sets the object's X coordinate to that value on the current page. If the random value is positive, the first object moves a random distance to the right; if negative, to the left.     Variables can be used for all parameters including the move object or the minimum and maximum values.  If an optional fourth parameter is set the movement is not constrained to fit within the playfield.  Users are encouraged to specify either the numeric value 1 or the string "noconstrain" to specify no movement constraint.  These values will be enforced in a later version of UltraKiss.

Related actions: move(), moverandy(), movetorand(), letobjectx()

moverandy()

Syntax: moverandy(object/variable A, minimum value/integer variable B, maximum value/integer variable C [,noconstrain integer/string/variable D])
Example: moverandy(#9,100,200), moverandy(#9,-10,10), moverandy(#Object,Min,Max), moverandy(MyObject,Min,Max,"noconstrain")

Chooses a random value between the minimum and maximum value and sets the object's Y coordinate to that value on the current page. If the random value is positive, the first object moves a random distance downwards; if negative, upwards.  Variables can be used for all parameters including the move object or the minimum and maximum values.  If an optional fourth parameter is set the movement is not constrained to fit within the playfield.  Users are encouraged to specify either the numeric value 1 or the string "noconstrain" to specify no movement constraint.  These values will be enforced in a later version of UltraKiss.

Related actions: move(), moverandx(), movetorand(), letobjecty()

moveto() (UltraKiss enhanced)

Syntax: moveto(object/variable A, X coordinate/integer variable B, Y coordinate/integer variable C [,noconstrain integer/string/variable D])
Example: moveto(#11,50,55), moveto(#Object,X,Y), moveto(MyObject,X,Y,"noconstrain")

Moves the object to the given coordinates on the current page.    Variables can be used for all parameters including the move object or the movement offsets.  If an optional fourth parameter is set the movement is not constrained to fit within the playfield.  Users are encouraged to specify either the numeric value 1 or the string "noconstrain" to specify no movement constraint.  These values will be enforced in a later version of UltraKiss.

Related actions: move(), movetorand()

movie()

Syntax: movie(video string/variable A[,integer/variable B])
Example: movie("clip.avi"), movie(MovieName), movie("cartoon.mpg",3), movie("")

Starts the specified movie image cel playing.  Movie("") stops all active movies from playing.  Movies are image cels contained within object groups and are invisible unless they are playing.  The optional repeat count integer/variable B specifies the number of repetitions for the movie.  The default value is 1.  The movie will repeat indefinitely if the repeat value is less than zero. 

Related events: mediastart(), mediastop()
Related actions: sound(), music(), mediaplayer()

music() (UltraKiss enhanced)

Syntax: music(midi file[,integer/variable])
Example: music("theblues.mid"), music(""), music("happy.rmf",3)

Plays any sound file, either once or continuously. Music("") stops all active music files from playing.   The optional repeat count integer/variable specifies the number of repetitions for the music.  The default value is 1.  The music will repeat indefinitely if the repeat value is less than zero. 

Related events: mediastart(), mediastop()
Related actions: music() in FKiSS 2, sound(), mediaplayer(), movie()

next()

Syntax: next(variable A)
Example: next(Index)

The termination statement for a for-next loop.  The variable A must be the same variable specified in a preceding for statement as the iteration control variable.   The next statement is matched to its associated for statement through this variable name.

Related actions: for()

notify() (UltraKiss enhanced)

Syntax: notify(string/variable A, string/variable B, ...)
Example: notify("This is an error message"), notify(MyMessage), notify("Hello","World")

Outputs the text in the string to a dialog box.  An unlimited number of variable arguments may be provided.  Variables are concatenated to form one string.

Related actions: notify() in FKiSS 2, debug(), confirm()


open() 

Syntax: open(integer variable A, string/variable B, string/variable C, integer/variable D)
Example: open(Status,"myfile.txt","r"), open(N,FileName,"rw"), open(N,"report.rtf","w",1)

Opens an external file for reading or writing.  When the file is opened an internal Text Object is created to maintain the file contents.  The text object file name is relative to the current KiSS configuration.  If the file is opened in read mode the external file is read and the text object is initialized.  If the KiSS configuration file was loaded from a directory then the file should exist in the directory. If the configuration was loaded from an archive then the file should exist in the archive. If the file is opened for write mode or read/write mode then a local directory object is created and the Text Object will, by default, be written to the directory from which the configuration was loaded. The text object is never written to an archive file.  If the configuration directory is read-only then the UltraKiss program base directory is used.

The status value returned in variable A will be less than zero if an open error occurred.  

String/variable C should have the value "r" to open the file for reading, "w" for writing, and "rw" to read and write the file.

Integer/variable D, if non-zero, specifies that the file contains encoded information.

Related actions: read(), write(), close()

paint()

Syntax: paint([integer/Variable A])
Example: paint(), paint(2000)

This command can be used to force a screen repaint during event execution.  Under normal conditions UltraKiss only refreshes the screen on completion of event processing.  Objects or cels that have their visibility changed through map() or unmap() or other commands are not refreshed when the action command executes.  

The optional delay parameter can be used to suspend event execution for the specified number of milliseconds to ensure that the screen refresh can be seen.

read() 

Syntax: read(integer variable A, string variable B, integer/variable C, string/variable D)
Example: read(Status,S,Line,"myfile.txt"), read(N,Line12,12,FileName)

Reads text from an external file.  The file must have been previously opened with an open() command.  The text is returned in variable B.  Variable C identifies the line to be read.  File line numbers begin from 0.  

The status value returned in variable A will be less than zero if a read error or end of file error occurred.  

Related actions: open(), write(), close()

 

removeItem()

Syntax: removeItem(component/variable A, string/variable B)
Example: removeItem("list2.List",S), removeItem(ComboBox,S)

This is a GUI component command to remove an entry from a list or combo box component.  If the entry does not exist in the component nothing is done.

Related actions: addItem(), removeAll()

 

removeAll()

Syntax: removeAll(component/variable B)
Example: removeAll("list2.List"), removeAll(ComboBox)

This is a GUI component command to remove all entries from a list or combo box component.

Related actions: removeItem()

 

replacestr()

Syntax: replacestr(variable A,string/variable B,string/variable C,string/variable D)
Example: replacestr(Result,String,Substring1,Substring2)

Replaces substring variable C in string variable B with substring variable D and returns the result in variable A.  This command can be used for selective string editing.  If variable D is the empty string then the substring specified by variable C is removed from the string B.  If the substring variable C does not exist in string variable B then the value of variable A is not changed. 

Related actions: concat(), substr(), indexof()

setAttributes()

Syntax: setAttributes(component/variable A, string/variable B)
Example: setAttributes("Start.Button","text=Start"), setAttributes(List,"wrap,vsb")

This is a GUI component command to programmatically set the attributes of a component object.  Attributes are specified as shown for the %attributes tag.  

Related tags: %attributes

 

setframe()  (UltraKiss enhanced)

Syntax: setframe(cel group/object/cel/variable A, integer/variable B)
Example: setframe(!RunningFigure,8), setframe(#17,F), setframe("animated.gif",0), setframe("ambiguous.cel",-1)

Sets the cel group frame to the value of the specified variable.  All cels in this group with the required frame are mapped and all cels in this group not in this frame are unmapped.  If the cel group is set to an invalid frame all cels will be unmapped.  UltraKiss object groups are implicit cel groups, too.  The setframe() command for an object will map the specified image in the object and unmap all other image cels.  Ambiguous cels are also cel groups.  The setframe() command, when applied to a cel name, can be used to map a specific cel image.  Ambiguous cels are numbered based upon their specification order in the configuration file.  Animated images will set the specified frame of the image.  

Related actions: letframe()
Related tags: !

setkcf()

Syntax: setkcf(object/cel/variable A,integer/variable B)
Example: setkcf(#10,2), setkcf(#Object,N), setkcf("my.cel",5)

Sets a specific palette file for the image cel.  A palette file is defined by its ordinal number as found by the '%' definition lines in the configuration file.  These numbers are also used on image cel definition lines.  The setkcf() command modifies the image cel, or all image cels in the object or cel group, to use the specified palette file.  

Related events: col()
Related actions: changecol(), setpal(), letkcf(), letpal()

 

setlevel()

Syntax: setlevel(object/cel/variable A, integer/variable B)
Example: setlevel(#10,23), setlevel(#Object,N)

Sets the draw level of the specified object group or cel to the specified value.  Draw levels must be 0 or greater.  The draw level for an image cel or object group specifies the drawing order for the object.  Objects with small draw levels are drawn on top of objects with larger draw levels.  Image cel draw levels are initially set to their ordinal sequence, or line in the configuration file. Object group draw levels are initially set to the largest (or bottom) draw level of all image cels contained within the object group.

Related actions: letlevel() 

 

setmodal()

Syntax: setmodal(object/cel/variable A)
Example: setmodal(#10), setmodal("mycel.cel"), setmodal(Modal), setmodal()

Sets a modal input state for the specified object group or cel.  If a modal object is set FKiSS events are only processed if they initiate from the modal source.  This command is typically used to ensure that screens such as password entry screens are completed before other events are processed.  For example, if a modal state is set on an object group, press() and release() events will only be interpreted for mouse clicks on cels contained within the object group.  Modal state is cleared with a no-argument setmodal() command.

Related actions: letmodal()

 

setpal()

Syntax: setpal(object/cel/variable A,integer/variable B)
Example: setpal(#10,2), setpal(#Object,N), setpal("my.cel",5)

Sets a specific palette group from the cel palette that must be used when drawing the image cel.  

A palette group, for definition purposes, is an offset number that identifies a specific palette in a KCF file that contains multiple palettes. The setpal() command will color the named cel [or all cels in the object or cel group] according to the colors found in the selected palette group in the KCF file associated with the cel. If the palette group does not exist in the KCF file the cel colors are not changed. This is identical to changing the color set except that this command applies only to the identified cel/object/celgroup, rather than all cels on the page. To apply the required palette group to all cels on the page the changecol() command must be used.

Given a palette file with 36 palette groups in it, color cycling can be performed with FKiSS as follows:

%ultrakiss.kcf ; a palette file with 36 groups
#1 ultrakiss.cel *0 : 0 ; a cel that uses ultrakiss.kcf

;@ alarm(1)
;@ letpal(pal,"ultrakiss.cel") ; get the current palette on display
;@ add(pal,pal,1) ; get the next palette to display
;@ mod(pal,pal,36) ; at end of cycle?
;@ setpal("ultrakiss.cel",pal) ; show the next palette 
;@ timer(1,100)

Related events: col()
Related actions: changecol(), setkcf(), letkcf(), letpal() 

 

setSelected()

Syntax: setSelected(component/variable A, integer/string/variable B)
Example: setSelected("button1.Button",0), setSelected("rb2.RadioButton",1), setSelected("cb3.CheckBox","true")

This is a GUI component command to set the selected state of a button component.   Button components are buttons, radio buttons, or toggle buttons.  If the value for variable B is an integer and non-zero the component is selected.  If B is a string variable and the value is "1" or "true" the button is selected.

Related actions: getSelected()

 

setSelectedIndex()

Syntax: setSelectedIndex(component/variable A, integer/variable B)
Example: setSelectedIndex("list1.List",N), setSelectedIndex("combobox2.ComboBox",3)

This is a GUI component command to set the selected index value in a list or combo box component.  If the index is out of range then the selected value in the component is cleared.

Related actions: getSelectedIndex()

 

setSelectedItem()

Syntax: setSelectedItem(component/variable A, string/variable B)
Example: setSelectedItem("combobox2.ComboBox","myitem")

This is a GUI component command to set the selected value in a combo box component.    If the specified value does not exist as an item in the combo box nothing happens.

Related actions: getSelectedItem()

 

setSelectedValue()

Syntax: setSelectedValue(component/variable A, string/variable B)
Example: setSelectedValue("list1.List",S), setSelectedValue("combobox2.ComboBox","Entry 2")

This is a GUI component command to set the selected text value in a list or combo box component.  

Related actions: getSelectedValue()

 

setText()

Syntax: setText(component/variable A, string/variable B)
Example: setText("button2.Label","Press Me"), setText("textfield3.TextField","This is some text"), setText(Button,S)

This is a GUI component command to set the text value for a component.    

Related actions: getText()

 

setValueAt()

Syntax: setValueAt(component/variable A, integer/variable B, string/variable C)
Example: setValueAt("list2.List",1,S), setValueAt(S,N,ComboBoxComponent)

This is a GUI component command to set the selected value at the specified index for a list component.  Index values begin from 0.  If the index is out of range variable A the component is not set.

Related actions: getValueAt()

 

showstatus()

Syntax: showstatus(string/variable)
Example: showstatus("This is a message"), showstatus(StatusMsg)

The showstatus action displays the associated message in the UltraKiss program status bar.

Related actions: debug(), notify(), confirm()

 

signal()

Syntax: signal(variable A)
Example: signal(Lock)

Signals all events currently waiting on the specified synchronization lock.   Events can suspend execution through the use of a wait() command.  Suspended events require a signal() command to notify them that execution can now proceed.

This command can be used to synchronize concurrent activities.  For example, an animation activity may suspend itself and wait for completion of a synchronized audio stream that signals the event on completion of audio playback.

Related actions: wait()

 

sleep()

Syntax: sleep(integer/variable A)
Example: sleep(2000), sleep(Delay)

Suspends the current event execution for the specified time in milliseconds.

Related actions: wait(), signal()

 

sound() (UltraKiss enhanced)

Syntax: sound(music file[,integer/variable])
Example: sound("creak.wav"), sound(whooo.au,3), sound("")

Plays any sound file or sequencer file in either wav or au format.  Sound("") stops all active sounds from playing.  The optional repeat count integer/variable specifies the number of repetitions for the sound.  The default value is 1.  The sound will repeat indefinitely if the repeat value is less than zero. 

Related events: mediastart(), mediastop()
Related actions: sound() in FKiSS 1, music(), movie(), mediaplayer()

 

sqrt()

Syntax: sqrt(Variable A, integer/Variable B)
Example: sqrt(N,12), sqrt(N,X)

This command computes the integer square root of an integer number.  The value returned is the floor of the real valued number that is the square root.  Thus, the value returned for the square root of 4 is 2, as is the value returned for the square root of 5, 6, 7, and so on.

 

strlen() 

Syntax: strlen(Variable,String/Variable)
Example: strlen(N,"mystring"), strlen(X,ThisString)

This command returns the length of the string argument in the variable.  If the string does not exist the value returned is 0. 

Related actions: concat(), substr(), indexof()


substr()

Syntax: substr(variable A,string/variable B,integer/variable C,[integer/variable D])
Example: substr(S,"abcdef",0,4), substr(String,MainString,Start,End)

Isolates a substring from the string/variable B, beginning at the character index integer/variable C, and ending at character index integer/variable D - 1.  Thus the length of the substring is D-C.  The substring is returned in variable A.  Character indexes start from 0.  If the optional end variable D is not specified the substring returned is the remainder of the string beginning from variable C.

Related actions: concat(), replacestr(), indexof(), strlen()

transparent() (UltraKiss enhanced)

Syntax: transparent(celname/object, number[,unbound])
Examples: transparent("celB.cel",50), transparent(#30,-10), transparent(#10,-10,"unbound")

Alters the transparency of the cel or all cels in the object by adding the number value to it, to a maximum of 255 and a minimum of 0. Positive values make the cel/object more transparent, negative values more opaque.  The sequence of transparent(#X,-255), transparent(#X,80) will yield a final image transparency of 80 regardless of the initial transparency. 

If the optional unbound parameter is set then the transparency change can exceed the bounds of 255 and 0.  This bounded transparency has created a non-invertible transparency function. Relative image transparency differences between images can be lost if different images within an object have different transparencies. UltraKiss provides an invertible, unbounded transparency function as an UltraKiss extension to ensure that object transparency adjustments are fully undoable, i.e. transparent(transparent(#X,Y),-Y) = #X for all images in X.

Related actions: let transparent() in FKiSS4, lettransparent()
Related tags: %t

 

viewer() 

Syntax: viewer(command,arg1,arg2,...)
Examples: viewer("open","readme.txt"), viewer("select"), viewer("restart"), viewer(OpenCommand,FileName), viewer("option","invertghost","true")

The viewer() command provides access to viewer specific services from within a KiSS set.  This command can be used to automatically open KiSS documentation files or configuration (CNF) files packaged within KiSS archives.  It can also be used to set or clear most program options dynamically during set execution.

The viewer() command currently implements the following sub-commands:

"reset" This causes a viewer reset, similar to invoking the View-Reset menu function.
"restart" This causes a viewer restart, similar to invoking the View-Restart menu function.
"option" This sets or clears UltraKiss viewer options.  Arg1 is the option name, and Arg 2 is the new value. Option names are provided in the table below.  Arg2 must be specified as "true" or "false" to set boolean values. 
Option Type Description

"sound"

boolean Enables audio output

"movie"

boolean Enables video output

"event"

boolean Enables event processing for the data set

"animate"

boolean Activates GIF animation for new data sets

"timer"

boolean Activates the timer for the data set

"editenable"

boolean If set, editing functions are enabled

"debugmouse"

boolean Shows attributes of the selected object in the program status bar

"debugcontrol"

boolean Writes program control messages to the log file

"debugload"

boolean Writes data set load messages to the log file

"debugedit"

boolean Writes editing status messages to the log file

"debugimage"

boolean Writes image edit status messages to the log file

"debugevent"

boolean Writes FKiSS event traces to the log file

"debugaction"

boolean Writes FKiSS action traces to the log file

"debugvariable"

boolean Writes FKiSS variable assignment traces to the log file

"debugfkiss"

boolean Writes FKiSS editing traces to the log file

"debugsound"

boolean Writes sound playback events to the log file

"debugmovie"

boolean Writes movie playback events to the log file

"debugmedia"

boolean Writes low level media stream events to the log file

"javasound"

boolean Use Java Sound for known audio files

"systemlf"

boolean Sets the user interface to match the host system

"javalf"

boolean Sets the user interface to match the Java standard

"englishon"

boolean Sets the language encoding for English

"japaneseon"

boolean Sets the language encoding for Japanese

"backup"

boolean Creates a backup file for each file written

"savesource"

boolean Copies unmodified files from the source file

"showdlprompt"

boolean Shows a save or open dialog for downloaded archive files

"loadclose"

boolean Closes the KiSS data set before loading a new set

"cacheaudio"

boolean Retains audio files in memory

"cachevideo"

boolean Retains video files in memory

"cacheimage"

boolean Retains all page images in memory

"suspendmedia"

boolean Suspends the media player on playback of a music file

"stopmusic"

boolean Stops audio playback if a new page is selected

"scaletofit"

boolean Scales the images to fit the window size

"sizetofit"

boolean Adjust the window size to fit the KiSS set playfield

"inittoolbar"

boolean Shows the toolbar

"initstatusbar"

boolean Show the status bar

"constrainmoves"

boolean Limit mouse object movement to the playfield area

"constrainfkiss"

boolean Limit FKiSS object movement to the playfield area

"autoscroll"

boolean Scroll the viewport when objects are dragged

"dragmove"

boolean Retain Mouse Control after FKiSS Object Movement

"releasemove"

boolean Enable FKiSS Object Moves on Mouse Controlled Objects

"dropfixdrop"

boolean Enable Catch/Drop Events on Fixed or Sticky Objects

"unfixfixdrop"

boolean Allow Fixdrop Event when Object is Unfixed

"invertghost"

boolean Invert Ghost Setting standard Boolean Logic

"mapcollide"

boolean Enable collision events on object visibility changes

"autoloop"

boolean Repeat media files in media player

"autofullscreen"

boolean Shows video movies in full screen

"mediaminimize"

boolean Minimize the player when audio playback starts

"mediacenter"

boolean Center the media player on the screen

"mediamusicresume"

boolean Resume the media player when music stops

"keepaspect"

boolean Retains the video aspect ratio on resize

"keycase"

boolean If set, key events are case sensitive

"variablecase"

boolean If set, variable names are case sensitive

"expandevents"

boolean If set, new expansion set events will add to and replace prior events

"alteditdrag"

boolean If set, the alt key must be pressed for edit selections

"importrelative"

boolean If set, imported cel names will retain directory names

"writeceloffset"

boolean If set, CEL images will retain new image offset values

"eventpause"

boolean For pause breakpoints, pause on the next event execution

"actionpause"

boolean For pause breakpoints, pause on the next action statement execution

"retainkey"

boolean Active key press is required for letkey and letkeymap

"strictsyntax"

boolean Enforce strict FKiSS syntax checks and block structure

"immediatecollide"

boolean Apply FKiSS collision events on every action statement

"eventqueues"

integer Sets the number of concurrent event processing threads

"timerperiod"

integer Sets the FKiSS timer period

"gifperiod"

integer Sets the GIF animation period

"stickyflex"

integer The maximum limit, in pixels, that sticky cels can move

"maxflex"

integer The minimum lock value that fixes cels in place

"maxlock"

integer The maximum lock value after which mouse events no longer apply

"maxpageset"

integer The number of page sets visible on the toolbar

"maxcolorset"

integer The number of color sets visible on the toolbar

"jpegquality"

integer  

"undolimit"

integer The maximum number of undo actions retained

"commentcol"

integer Sets the configuration line column for comments

"indentspace"

integer Sets the indent spacing for FKiSS statement blocks

"kissweb"

string Sets the home page URL for the UltraKiss browser

 

"select" Shows a configuration selection dialog, similar to invoking the View-Select menu function.
"open" Opens the file specified in Arg1.  If the file is a CNF configuration file a new configuration will be loaded.  If the file is a text file (TXT, RTF, HTML, LST, DOC) the text editor will be opened.  If the file is an image file (CEL, GIF, JPG, BMP) the image editor will be opened.  If the file is a media file (WAV,MP3,AU,AVI) the media player will be opened.
"view" Opens a text editor to display the specified KiSS file entity specified in Arg1.  The KiSS file entity is a file object previously opened with an 'open()' command.
"print" Opens the Print Preview subsystem to print the specified KiSS file entity specified in Arg1.    The KiSS file entity is a file object previously opened with an 'open()' command. 
"exit" Exits the program and terminates the UltraKiss viewer.  
"setmenu" Replaces the UltraKiss menu bar with a user specified menu.  Arg1, Arg2, Arg3, ... and so on specify the user menu items in pairs, where the first argument is the menu name and the second argument refers to an object group that contains a set of MenuItem or CheckBoxMenuItem GUI components for the menu.   The following command would create a three item menu bar:

viewer("menu","File",#20,"Options",#21,"Help",#23)

The object definitions should contain GUI MenuItem or CheckBoxMenuItem components as shown below:

#20  filenew.MenuItem              ; %attributes[text="New"]
#20  fileopen.MenuItem             ; %attributes[text="Open"]
#20  fileclose.MenuItem             ; %attributes[text="Close"]

#21  optionshow.CheckBoxMenuItem   ; %attributes[text="Show Colors"]
#21  optionhide.CheckBoxMenuItem     ; %attributes[text="Hide Background"]

"seticon" Replaces the UltraKiss icon image with a user specified image.  Arg1 should specify a cel name that is to be used for the icon image. 
"settitle" Sets the UltraKiss main window title.  Arg1 should specify the text string that is to be used for the window title.
"menu" Invokes an UltraKiss menu command.  Arg1 specifies the menu item to invoke.  Values are as follows:
"reset" Equivalent to a viewer("reset") command
"restart" Equivalent to a viewer("restart") command
"magnify" Increases the screen magnification by 1.66 times
"reduce" Decreases the screen magnification by 0.66 times
"scale" Shows a scale dialog for entry of a general scaling factor
"sizetofit" Adjusts the UltraKiss window to fit the current KiSS playfield size
"scaletofit" Scales the screen to fit the current UltraKiss window size
"logfile" Displays the UltraKiss log file in a text edit window
"statusbar" Inverts the visibility of the UltraKiss status bar
"toolbar" Inverts the visibility of the UltraKiss tool bar
"openweb" Launches the default web browser
"openkiss" Launches the UltraKiss web browser
"activecnf" Displays the active configuration file in a text edit window


 

wait()

Syntax: wait(variable A, [integer/variable B])
Example: wait(B), wait(Lock,2000)

Establishes a synchronization wait lock for the currently executing event.  The event suspends execution until such time as a signal notification is received or until the specified time in milliseconds has expired.  If the optional delay time is not specified the event can be suspended indefinitely. Signal notifications are provided from external events with the signal() command.

This command can be used to synchronize concurrent activities.  For example, an animation activity may suspend itself and wait for completion of a synchronized audio stream that signals the event on completion of audio playback.

Related actions: signal()

 

while()

Syntax: while(integer/variable A)
Example: while(B), while(1)

Begins a while-endwhile loop.  All action statements from the while statement up to the next endwhile statement are processed providing that the value of control integer/variable is not zero.  If the control integer/variable is zero all statements up to the next matching endwhile statement are skipped.

Related actions: endwhile()


write() 

Syntax: write(integer variable A, string variable B, string/variable D)
Example: write(Status,S,"myfile.txt"), write(N,"This is a line of text",FileName)

Writes text to an external file.  The file must have been previously opened with an open() command.  The text written is in variable B.  Line feeds are not automatically inserted.  To insert a new line character at the end of a string, use the concat() statement as shown: concat(S,S,'\n').   Variable C identifies the file to be written. 

The status value returned in variable A will be less than zero if a write error occurred.  

Related actions: open(), read(), close()

 

 


Tags (FKiSS 5)

UltraKiss requires that tags be specified in the following sequence:

; [%t <transp>] [%g] [%u] [%c <color>] [%size[w,h]] [%offset[x,y]] [[!group] [:<frame> ... ] ... ]]]
No spaces should exist between the semicolon and the start of the tag commands.  One or more spaces must exist between the end of one tag and the start of the next tag.  All tags are optional.


%size [ ]

Syntax: %size[width,height]
Example: %size[100,200]

Sets the cel size. This setting is typically used to set the movie window size or the size of a GUI component.  

Related actions: movie()


%offset [ ]

Syntax: %offset[x-number,y-number]
Example: %offset[32,128]

Sets the cel initial offset from its location.  This tag is automatically inserted by UltraKiss for cels positioned in object groups that do not maintain their own offset values.


%c  

Syntax: %c<number>
Example: %c100

Sets the cel initial transparent color.  The parameter value  is an RGB color.  This tag is used by UltraKiss to assign a transparent color to image cels that do not maintain transparency.


%attributes  

Syntax: %attributes[attribute1,attribute2,...]
Example: %attributes[read,wrap,fontstyle=bold]  %attributes[vsb,hsb,fc=65000,bc=1427635]

The %attributes tag is used to set initial attributes for UltraKiss GUI components.  The attribute parameters must be specified in a list delimited by commas, without spaces.  Text attributes should be enclosed in double quotation marks.  Valid attributes are:

Attribute Values Description
read   Sets an input component to read only, or display mode.
wrap   Enables word wrap in a text area or list.
align left,right,center Sets text alignment for Label components.
noscroll   Disables scrolling for Text Area and List components.
vsb   Shows the vertical scroll bar for scrollable components.
hsb   Shows the horizontal scroll bar for scrollable components.
bc integer Sets the component background color.  The value is an RGB integer.
fc integer Sets the component foreground color.  The value is an RGB integer.
fontname string Sets the preferred font for text display.
fontsize integer Sets the point size for the font.
fontstyle bold,italic,plain Sets the font characteristics.
multiple Enables multiple selections on a List component.
disabled integer (0,1) Sets the component as disabled.
selected integer (0,1) Sets the component, such as a CheckBox, as selected.  
text string Sets the component text.
nomargin Clears the margin or border values for the component.

 


Virtual Key Codes (FKiSS 5)

VK_ENTER = '\n';
VK_BACK_SPACE = '\b';
VK_TAB = '\t';
VK_CANCEL = 3  
VK_CLEAR = 12  
VK_SHIFT = 16  
VK_CONTROL = 17  
VK_ALT = 18  
VK_PAUSE = 19 
VK_CAPS_LOCK = 20  
VK_ESCAPE = 27  
VK_SPACE = 32  
VK_PAGE_UP = 33 
VK_PAGE_DOWN = 34 
VK_END = 35 
VK_HOME = 36 
VK_LEFT = 37  
VK_UP = 38  
VK_RIGHT = 39  
VK_DOWN = 40  
VK_COMMA = 44  
VK_MINUS = 45  
VK_PERIOD = 46  
VK_SLASH = 47  

/** VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
VK_0 = 48  
VK_1 = 49  
VK_2 = 50  
VK_3 = 51 
VK_4 = 52  
VK_5 = 53  
VK_6 = 54  
VK_7 = 55  
VK_8 = 56  
VK_9 = 57  

VK_SEMICOLON = 59  
K_EQUALS = 61  

/** VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
VK_A = 65  
VK_B = 66  
VK_C = 67  
VK_D = 68  
VK_E = 69  
VK_F = 70  
 VK_G = 71  
 VK_H = 72  
 VK_I = 73  
 VK_J = 74  
 VK_K = 75  
 VK_L = 76  
 VK_M = 77  
 VK_N = 78  
 VK_O = 79  
 VK_P = 80  
 VK_Q = 81  
 VK_R = 82  
 VK_S = 83  
 VK_T = 84  
 VK_U = 85  
 VK_V = 86  
 VK_W = 87  
 VK_X = 88  
 VK_Y = 89  
 VK_Z = 90  

 VK_OPEN_BRACKET = 91  
 VK_BACK_SLASH = 92  
 VK_CLOSE_BRACKET = 93  

 VK_NUMPAD0 = 96  
 VK_NUMPAD1 = 97  
 VK_NUMPAD2 = 98  
 VK_NUMPAD3 = 99  
 VK_NUMPAD4 = 100 
 VK_NUMPAD5 = 101  
 VK_NUMPAD6 = 102  
 VK_NUMPAD7 = 103  
 VK_NUMPAD8 = 104  
 VK_NUMPAD9 = 105  
 VK_MULTIPLY = 106 
 VK_ADD = 107  
 VK_SEPARATER = 108  
 VK_SUBTRACT = 109  
 VK_DECIMAL = 110  
 VK_DIVIDE = 111  
 VK_DELETE = 127  
 VK_NUM_LOCK = 144  
 VK_SCROLL_LOCK = 145  

 VK_F1 = 112
 VK_F2 = 113
 VK_F3 = 114 
 VK_F4 = 115 
 VK_F5 = 116 
 VK_F6 = 117 
 VK_F7 = 118 
 VK_F8 = 119 
 VK_F9 = 120 
 VK_F10 = 121 
 VK_F11 = 122 
 VK_F12 = 123 

/* F13 - F24 are used on IBM 3270 keyboard; use random range for constants. */
 VK_F13 = 61440 
 VK_F14 = 61441 
 VK_F15 = 61442 
 VK_F16 = 61443 
 VK_F17 = 61444 
 VK_F18 = 61445 
 VK_F19 = 61446 
 VK_F20 = 61447 
 VK_F21 = 61448 
 VK_F22 = 61449 
 VK_F23 = 61450 
 VK_F24 = 61451 

 VK_PRINTSCREEN = 154 
 VK_INSERT = 155 
 VK_HELP = 156 
 VK_META = 157 

 VK_BACK_QUOTE = 192
 VK_QUOTE = 222

/** for KeyPad cursor arrow keys */
 VK_KP_UP = 224
 VK_KP_DOWN = 225 
 VK_KP_LEFT = 226 
 VK_KP_RIGHT = 227 

/* For European keyboards */
 VK_DEAD_GRAVE = 128 
 VK_DEAD_ACUTE = 129 
 VK_DEAD_CIRCUMFLEX = 130 
 VK_DEAD_TILDE = 131 
 VK_DEAD_MACRON = 132 
 VK_DEAD_BREVE = 133 
 VK_DEAD_ABOVEDOT = 134 
 VK_DEAD_DIAERESIS = 135 
 VK_DEAD_ABOVERING = 136 
 VK_DEAD_DOUBLEACUTE = 137 
 VK_DEAD_CARON = 138 
 VK_DEAD_CEDILLA = 139 
 VK_DEAD_OGONEK = 140 
 VK_DEAD_IOTA = 141 
 VK_DEAD_VOICED_SOUND = 142 
 VK_DEAD_SEMIVOICED_SOUND = 143 

 VK_AMPERSAND = 150 
 VK_ASTERISK = 151 
 VK_QUOTEDBL = 152 
 VK_LESS = 153 

 VK_GREATER = 160 
 VK_BRACELEFT = 161 
 VK_BRACERIGHT = 162 

/** Constant for the "@" key. */
 VK_AT = 512 

/** Constant for the ":" key. */
 VK_COLON = 513 

/** Constant for the "^" key. */
 VK_CIRCUMFLEX = 514

/** Constant for the "$" key. */
 VK_DOLLAR = 515 

/** Constant for the Euro currency sign key. */
 VK_EURO_SIGN = 516 

/** Constant for the "!" key. */
 VK_EXCLAMATION_MARK = 517

/** Constant for the inverted exclamation mark key. */
 VK_INVERTED_EXCLAMATION_MARK = 518 

/** Constant for the "(" key. */
 VK_LEFT_PARENTHESIS = 519 

/** Constant for the "#" key. */
 VK_NUMBER_SIGN = 520

/** Constant for the "+" key. */
 VK_PLUS = 521

/** Constant for the ")" key. */
 VK_RIGHT_PARENTHESIS = 522 

/** Constant for the "_" key. */
 VK_UNDERSCORE = 523

/* for input method support on Asian Keyboards */
 VK_FINAL = 24
 VK_CONVERT = 28
 VK_NONCONVERT = 29
 VK_ACCEPT = 30
 VK_MODECHANGE = 31
 VK_KANA = 21
 VK_KANJI = 25

/** Constant for the Alphanumeric function key. */
/* Japanese PC 106 keyboard */
 VK_ALPHANUMERIC = 240

/** Constant for the Katakana function key. */
/* Japanese PC 106 keyboard */
 VK_KATAKANA = 241

/** Constant for the Hiragana function key. */
/* Japanese PC 106 keyboard */
 VK_HIRAGANA = 242

/** Constant for the Full-Width Characters function key. */
/* Japanese PC 106 keyboard */
 VK_FULL_WIDTH = 243

/** Constant for the Half-Width Characters function key. */
/* Japanese PC 106 keyboard */
 VK_HALF_WIDTH = 244

/** Constant for the Roman Characters function key. */
/* Japanese PC 106 keyboard */
 VK_ROMAN_CHARACTERS = 245

/** Constant for the All Candidates function key. */
/* Japanese PC 106 keyboard - VK_CONVERT + ALT */
 VK_ALL_CANDIDATES = 256

/** Constant for the Previous Candidate function key. */
/* Japanese PC 106 keyboard - VK_CONVERT + SHIFT */
 VK_PREVIOUS_CANDIDATE = 257

/** Constant for the Code Input function key. */
/* Japanese PC 106 keyboard - VK_ALPHANUMERIC + ALT */
 VK_CODE_INPUT = 258

/** Constant for the Japanese-Katakana function key.
* This key switches to a Japanese input method and selects its Katakana input mode. */
/* Japanese Macintosh keyboard - VK_JAPANESE_HIRAGANA + SHIFT */
 VK_JAPANESE_KATAKANA = 259

/** Constant for the Japanese-Hiragana function key.
* This key switches to a Japanese input method and selects its Hiragana input mode. */
/* Japanese Macintosh keyboard */
 VK_JAPANESE_HIRAGANA = 260

/** Constant for the Japanese-Roman function key.
* This key switches to a Japanese input method and selects its Roman-Direct input mode. */
/* Japanese Macintosh keyboard */
 VK_JAPANESE_ROMAN = 261

/* for Sun keyboards */
 VK_CUT = 65489 
 VK_COPY = 65485 
 VK_PASTE = 65487 
 VK_UNDO = 65483 
 VK_AGAIN = 65481 
 VK_FIND = 65488 
 VK_PROPS = 65482 
 VK_STOP = 65480 

/** Constant for the Compose function key. */
 VK_COMPOSE = 65312 

/** Constant for the AltGraph modifier key. */
 VK_ALT_GRAPH = 65406 

 


Prior Document:  FKiSS 4 Specifications

Copyright (c) 2003 WSM Information System Inc.