Normal Topic New 2.0 SBasic commands by category (Read 965 times)
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
New 2.0 SBasic commands by category
Mar 19th, 2006 at 6:58pm
Print Post Print Post  
I built this list for the Lanticans, but thought the folks on the Forum might want to see it as well.

Networking
==========
@AcceptNetworkConnection(serverName as string, port as int) as int
       ; Lets other networked programs connect to Sesame.

@OpenNetworkConnection(serverName as string, port as int) as int
       ; Lets Sesame connect to any other TCP/IP server accepting connections.

CloseNetworkConnection(netID as int)
       ; Closes a network connection opened with @AcceptNetworkConnection or @OpenNetworkConnection.

@NetworkRead(netID as int, lengthLimit as int, timeOut as int) as string
       ; Allows a read operation on a network connection setup by @AcceptNetworkConnection or @OpenNetworkConnection.

NetworkWrite(netID as int, str as string)
       ; Allows a write operation on a network connection setup by @AcceptNetworkConnection or @OpenNetworkConnection.

@AlternateServer(server_name as string, port1 as int, port2 as int) as int
       ; Allows Sesame client to connect to a different Sesame server temporarily.

CloseAlternateServer()
       ; Restores the original connection between the client and its server after a call to @AlternateServer.

HTPPGetHTML(servername as string, path as string, id as string, port as int)
       ; Connects to a web server (HTTP) and gets a web page from it based on "path".

HTTPPostHTML(servername as string, path as string, id as string, port as int, post_string as string) as string
       ; Connects to a web server (HTTP) and gets a web page from it based on "path", posting the information
       ; in the "post_string".


Form Building and Viewing
=========================
@FormAsDialog(FormName as string) as string
       ; Allows SBasic to use the specified form as a dialog box. It waits until the user is done
       ; with the dialog before returning the dialog information as a string array.

@OpenWindow(x as int, y as int, w as int, h as int, label as string) as int
       ; Opens a blank window to be used with @AddWidget.

@AddWidget(type as int, xx as int, yy as int, ww as int, hh as int, lab as string) as int
       ; Adds a widget (an Layout Element) to a window opened with @OpenWindow.

WidgetAttribute(id as int, attr as int, val as string)
       ; Sets attributes of widgets added to a window opened with @OpenWindow.

@RunWindow as string
       ; "Runs" a window opened with @OpenWindow, waiting until the user closes the window.

FormViewType(form as string, type as int)
@FormViewType(form as string) as int
       ; Toggles a form between form view and table view, or returns the current view type.

@Attribute(var fieldName as string, attr_id as int) as string
Attribute(var fieldName as string, attr_id as int, attr as string)
       ; Gets or sets LE attributes, like colors, fonts, read-only, etc...

@FormWindowParams() as string
       ; Returns a string representing the geometry (x;y;w;h) of the form's window.

HideTabPage(var fieldname as string, page_no as int)
       ; Hides a tab page on the specified tab set.

RestoreTabPages(var fieldname as string)
       ; Unhides any tab pages that have been hidden with HideTabPage.

@OffsetX() as int
@OffsetY() as int
       ; Returns the scroll offset of the current form.

@PopupChoiceList(list as string, header as string) as string
       ; Displays a choice list with scrolling and alphabetic selection.

@PopupStringEditor(content as string, title as string, width as int, height as int, x_cor as int, y_cor as int) as string
       ; Popsup a small text editor, returning a string to be used in programming.

StaticChart(chart_type as int, x as int, y as int, w as int, h as int, values as string, labels as string) as int
StaticDrawCircle(var fieldName as string, x as int, y as int, r as int)
StaticDrawClear(var fieldName as string)
StaticDrawColor(var fieldName as string, r as int, g as int, b as int)
StaticDrawEndPolygon(var fieldName as string)
StaticDrawFont(var fieldName as string, text as string, size as int)
StaticDrawImage(var fieldName as string, filename as string, x as int, y as int, [[ww as int, hh as int], off_x as int, off_y as int])
StaticDrawLine(var fieldName as string, x1 as int, y1 as int, x2 as int, y2 as int)
StaticDrawPoint(var fieldName as string, x as int, y as int)
StaticDrawPolygonVertex(var fieldName as string, x as int, y as int)
StaticDrawRectangle(var fieldName as string, x as int, y as int, w as int, h as int, filled as int)
StaticDrawStartPolygon(var fieldName as string)
StaticDrawText(var fieldName as string, text as string, x as int, y as int)
StaticRemoveChart(ChartNumber as int)
       ; Draw various thing on the surface of a form, in geometric relation to a specific static box on that form.

Form/Record/Result Set/Spec Management
======================================
DeleteRecord()
       ; Deletes a record.

SetAutocomplete(var fieldName as string, list as string)
DisableAutocomplete(var fieldName as string)
       ; Enables/Disables autocompletion of a text field based on the supplied list of values.

FormCommit(FormName as string)
       ; Commits the specified form to the engine.

FormDeleteRecord(FormName as string, instance as int)
       ; Deletes a record on the specified form.

FormExit(FormName as string)
       ; Exits (closes) the specified form.

@FormGetValues(formName as string, fieldName as string) as string
       ; Returns a string array of the values of the specified LE on the specified form for all instances of that form.

@LoadQReportSpec(mname as string) as int
       ; Loads a quick report (Runtime created report) spec.

@LoadTableSpec(mname as string) as int
       ; loads a table spec.

RunExportSpec(filename as string, separator as string, delimiter as string, tabbed as int, custom as int, no_sep as int, ignore_fixed as int, all as int, none as int, custom_delimiter as int, header as int)
       ; Runs an export spec.

RunImportSpec(filename as string)
       ; Runs an import spec.

RunMassUpdateSpec()
       ; Runs a mass update spec.

RunQuickReportSpec(mode as int, orientation as int)
       ; Runs a quick report spec.

RunSortSpec()
       ; Runs a sort spec.

RunTableSpec()
       ; Runs a table spec.

@XResultSetSearch(fn as string, rd as string, sm as int, ss as int, ... as string)
       ; Using a specified set of search parameters, create a result set.

XResultSetClose(rs as int)
       ; Close a result set opened with @XResultSetSearch.

XResultSetCreateNewRecord(rs as int)
       ; Add a new blank record to a result set.

@XResultSetCurrentForm() as int
       ; Return the result set used by the current form.

@XResultSetForm(form_name as string) as int
       ; Return the result set for a specified form.

@XResultSetCurrentPosition(rs as int) as int
XResultSetCurrentPosition(rs as int, pos as int)
       ; Get/Set the current position within a result set.

XResultSetDeleteRecord(rs as int)
       ; Delete a record from a result set.

@XResultSetPrintReport(report_name as string, rs as int, mode as int) as string
       ; Print a report using the specified result set.

XResultSetRemoveRecord(rs as int)
       ; Remove a record from the specified result set.

@XResultSetTotal(rs as int) as int
       ; Return the number of records in a result set.

@XResultSetValue(rs as int, fn as string) as string
XResultSetValue(rs as int, fn as string, val as string)
       ; Get/Set a field in a record in a result set.


Programming
===========
FormRunProgram(formName as string, le_name as string, event_number as int)
       ; Run an event program on the specified form.

RunEntryOnEvent(var fieldName as string)
       ; Runs the on entry event of the specified LE when any "unhandled" event occurs.

RemoveRunEntryOnEvent()
       ; Removes the condition created by RunEntryOnEvent.

RunEntryOnInterval(var fieldName as string, interval as int)
       ; Runs the on entry event of the specified LE at a interval specified in milleseconds.

@TriggeringElement() as string
       ; Returns the LE that triggered the current event program.


Information Management
======================
@AverageListValues(list as string) as double
       ; Returns the average of the values specified in a string array.

@ClientLocalValue(name as string) as string
ClientLocalValue(name as string, value as string)
       ; Gets/Sets a keyed value temporarily stored on the client (see: GlobalValue/@GlobalValue).

@TemplateString(template as string, str as string) as string
@DeTemplateString(template as string, str as string) as string
       ; Set/Removes an entry template from a test LE.

@IsUnique(var fieldName as string, key as string) as int
       ; Checks if a value is unique in the specified LE for all records. The value can be in search syntax.

@StringArrayAttributes(le_list as string, attr as int) as string
StringArrayAttributes(le_list as string, attr as int, value as string)
       ; Gets/Set the LE attributes from a string array.

@TimeInSeconds() as int
       ; Returns the current time in seconds since 1/1/1970.

@CreateDynamicArray(dims as int, ... as int) as int
       ; Creates a dynamic array, setting the number of dimensions and the size of each dimension.

@AccessDynamicArray(access_key as int, ... as int) as string",
AccessDynamicArray(access_key as int, value as string, ... as int)",
       ; Gets/Set values in a dynamically allocated array created be @CreateDynamicArray.

DestroyDynamicArray(access_key as int)

       ; Deallocates an array created with @CreateDynamicArray.


User I/O
========
IgnoreKey(key as int)
ClearIgnoreKey(key as int)
       ; Set/Clear a keystroke to ignore.

@EventState() as string
       ; Return information about the most recent GUI event to occur.


Math
====
@Cos(Radian as double) as double
@Sin(Radian as double) as double
@Tan(x as double) as double
       ; Trigonomic functions.

@DefinedRound(x as double, places as int, direction as int) as double
       ; Round a value, specifying whether to round up or down.

Operating System and File System
================================
CreateAProcess(command as string)
       ; Create and run a process.

@RedirectProcess(command as string, feed as string) as string
       ; Create and run a process sending it standard input and capturing its standard output.

@CreateDirectory(directory as string) as boolean
       ; Create a directory on the client.

@DirectoryExists(directory as string) as boolean
       ; Check if a directory exists already.

@LocalListDirectory(path as string) as string
       ; Return a directory listing on the client.

@ServerListDirectory(path as string) as string
       ; Return a directory listing on the server.

FileOverWrite(fileName as string, ... as string) as int
       ; Create (or overwrite) a file in a single operation.

@GetLocalEnvVar(var as string) as string
       ; Get a environment variable on the client.

@GetServerEnvVar(var as string) as string
       ; Get a environment variable on the server.

@LocalFileDialog(title as string, filter as string) as string
       ; Bring up a file dialog representing the client's files and directories.

@ServerFileDialog(title as string, instruction as string, filter as string) as string
       ; Bring up a file dialog representing the server's files and directories.

SetAltImagePath(var fieldName as string, path as string)
       ; Temporarily use a different image path.


General Sesame Management
=========================
DeferredOpenApplication(filename as string)
       ; Open a different application as soon as this one is done running programming.

@ErrorType as int
       ; Returns an error type related to the value of @Error.

@ListApplicationForms as string
       ; List the forms in the current application.

@ListApplicationReports as string
       ; List the reports in the current application.

@ListDatabases as string
       ; List the databases in the current application.

@ListFormsByDatabase(db_name as string, ... as string) as string
       ; List the forms in the specified database.

@ListReportsByDatabase(db_name as string) as string
       ; List the reports in the specified database.

@UserParameter(index as int) as string
       ; Get the value of a user specified startup parameter.

@WarningLevel() as int
WarningLevel(level as int)
       ; Get/Set the warning level.

AddCommandToMenubar(command as string, shortcut as string, program as string)
       ; Adds a command to the main pulldown menus.

EnableMenubarItem(item as string)
DisableMenubarItem(item as string)
       ; Enables/Disables a command on the main pulldown menus.

RemoveMenubarItem(item as string)
       ; Removes a command from the main pulldown menus.


Printing and Reports
====================
NewDocument(copies as int)
       ; Creates a new document for PrintString (etc...) commands.

FinishDocument(copies as int)
       ; Prints the specified number of copies of the document (created with NewDocument).

MergeFilePrint(filename as string, extension as string, start_match as string, end_match as string, matches as string, new_filename as string, fold as int)
       ; Prints a file after substituting tags in that file with record values. It prints one copy of the file for each record in the result set.

@PrintAForm(plural as int, background as int, orientation as int, show_dialog as int, paper_type as int, left as int, top as int, right as int, bottom as int, columns as int, rows as int)
       ; Prints a form.

@PrintAReport(reportName as string, r_mode as int, orient as int, show_diag as int, p_width as int, p_height as int, l_margin as int, t_margin as int, r_margin as int, b_margin as int) as string
       ; Prints a report.

PrintRGBColor(red as int, green as int, blue as int)
       ; Set a color for printing.

ReportHTMLFilter(match as string, replace as string, action as int)
       ; Filters an HTML report, acting at each instance of the "match" string with the "replace" string. The action can be to delete the
       ; match string, or insert the replace string before the match string, or replace the match string with the replace string, or append the
       ; replace string after the match string.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: New 2.0 SBasic commands by category
Reply #1 - Mar 21st, 2006 at 8:52pm
Print Post Print Post  
Argh!  TEASE!!
  

**
Captain Infinity
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: New 2.0 SBasic commands by category
Reply #2 - Mar 21st, 2006 at 8:57pm
Print Post Print Post  
Quote:
Argh!  TEASE!!


Not intentially. This is just a byproduct of putting things together preliminary to the actually documentation team.

Anything of particular interest?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: New 2.0 SBasic commands by category
Reply #3 - Mar 21st, 2006 at 11:39pm
Print Post Print Post  
Ray has pointed out that there is a mistake in the printing commands:
Quote:
Printing and Reports
====================
NewDocument(copies as int)
   ; Creates a new document for PrintString (etc...) commands.

FinishDocument(copies as int)
   ; Prints the specified number of copies of the document (created with NewDocument).


Should be:

Printing and Reports
====================
NewDocument(copies as int)
   ; Creates a new document for PrintString (etc...) commands.

FinishDocument()
   ; Prints the number of copies of the document as specified in the NewDocument call.

  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged