Normal Topic Command Cheat sheet (Read 2430 times)
billgordon
Junior Member
**
Offline


No personal text

Posts: 61
Joined: Dec 31st, 2003
Command Cheat sheet
Jan 17th, 2005 at 4:17pm
Print Post Print Post  
Has anyone put together a list of every command from the initial release till this latest version?

Would you be willing to share it with us all?

This post by the COW has been so helpful I was hoping to find something like this for all commands. 


Subroutines and Functions new to 1.0.5
======================================

@Application() as string
Returns the current appliction title as it appears on the Menu Tree. 

@AsynchShell( command as string ) as int
Just like @Shell, except it doesn't wait. That way you can launch another program and Sesame will keep doing while that program runs.

ClearDefaultTab()
See: SetDefaultTab. This command clears the "default tab".

CloseSlate()
The window that "WriteLn" writes to - is called the "Slate". This command closes it.

@ContractTreeItem( mname as string ) as int
Closes a particular tree item on the command menus.

@Database() as string
Returns the database name to which the current form is bound.

@ExpandTreeItem( mname as string ) as int
Opens or expands a particular tree item on a command menu.

ForceGroupBreak(level as int)
The reports in Sesame 1.0.5 can have additional "nesting" group headers and footers. This allows you to "break" at different "levels" within the group. ForceGroupBreak allows you to use complex conditions to force a break in any of these nesting groups headers/footers. In other words, you can use SBasic conditionals (the "if" statement) to force a group break in a report  on any condition you can think of.

@HideTreeItem( mname as string ) as int
Forces a tree item on a command tree to disappear.

OpenSlate()
The window that WriteLn writes to is called the "Slate". This command will open it if it is not already open.

PopupSelectPosition(p as int, xx as int, yy as int)
This command allows you set where on the screen, window, or form the popup menus (UserSelect, PopupMenu, etc..) appear.

PrintBox(boxtype as int, xpos as int, ypos as int, width as int, height as int)
This command is like PrintString, but prints a box or frame instead of text.

PrintImage(val as string, xpos as int, ypos as int, width as int, height as int)
This command is like PrintString but prints an image instead of text.

@QuestionUser( q as string, def as string ) as string
This is like @AskUser, but instead of using buttons for the choices it uses a text input box - allowing any answer.

@ReLabelTreeItem( mname as string, new_name as string ) as int
This command lets the programmer rename/relabel the command menu tree items.

@RevealTreeItem( mname as string ) as int
This command reveals a tree item previously hidden with HideTreeItem.

@ServerDate() as string
This command returns the date on the server, which might be different than the date on the client.

@ServerTime() as string
This function returns the time of day on the server - which might be different from the time of day on the client.

SetDefaultTab(level as string)
This command lets the programmer set a "tab" that the program will bring to the top when the current tab (form) is closed. That way, when the user hits Escape, the program can always go back to the same form.

@StandAlone() as int
This functions returns true if the current form is running without a parent. It could be used to prevent users from using a subform unless it is embedded in its parent form (or vice-versa).

@Timestamp() as int
This function returns an integer representing the timestamp of the current record - in seconds. This command is useful for generating unique IDs, comparing records, sorting, etc...

@TreeItemExpansion( mname as string ) as int
Returns whether a tree item is expanded or not.

@TreeItemVisibility( mname as string ) as int
Returns whether a tree item is hidden or not.

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



Posts: 2530
Joined: Nov 22nd, 2002
Re: Command Cheat sheet
Reply #1 - Jan 17th, 2005 at 7:19pm
Print Post Print Post  
I know this isn't exactly what you are looking for, but here is a list of all of the SBasic "built-ins" with parameters, return values, and abbreviations, in alphabetic order.

Please note that some of these commands are not documented in any of the releases. This indicates that that command is still in alpha or beta cycle testing, and should be used only with the most care:

@(fn as string) as string
@Ab(x as double) as double
@Abs(x as double) as double
@AccessStringArray(str as string, type as int) as string
@Ad() as boolean
@Add() as boolean
AddToTranslationTable(s_from as string, s_to as string)
AlternateDefaultPrinter(printer as string)
@AppendStringArray(str1 as string, str2 as string) as string
@Application() as string
@As(s as string) as int
@Asc(s as string) as int
@AskUser(x as string, y as string, z as string) as boolean
@AsynchShell(command as string) as int
@Av(... as double) as double
@Avg(... as double) as double
@BeenHere() as int
BeenHere(state as int)
BooleanElement(var a as array, ... as int) as boolean
@Calendar(startDate as date, title as string) as date
CancelPage()
@Cgr(pv as double, fv as double, np as double) as double
@Ch(ascii as int) as char
CharElement(var a as array, ... as int) as char
@Chr(ascii as int) as char
Clear(var ... as string)
ClearDefaultTab()
@CloseCommandArea() as int
CloseCommandArea(rn as int)
CloseSlate()
Cls()
@Color(var fieldName as string, textColor as int, backgrColor as int)
@CompareStringArray(str1 as string, str2 as string) as int
@ContainsStringArray(str1 as string, str2 as string, type as int) as string
@ContractTreeItem(mname as string) as int
@ConvertStringArrayBySeparator(str as string) as string
@CountStringArray(str as string) as int
@CreateNewRecord() as int
@CurrentElement() as string
@CursorPosition(var fieldName) as int
CursorPosition(var fieldName, position as int)
@D(dateStr as string) as date
@Da() as date
@Database() as string
@Date() as date
DateElement(var a as array, ... as int) as date
@De(s as string, start as int, num as int) as string
@Decimals(currency as string, places as int) as string
@DeferredMacro(mname as string)
@Del(s as string, start as int, num as int) as string
@DeleteStringArray(str1 as string, pos as int) as string
@Di(var ... as string)
@DifferenceStringArray(str1 as string, str2 as string) as string
DimLimit(n as int, var a as array) as int
Dims(var a as array) as int
@Ditto(var ... as string)
@Dm(d as date) as int
@Dom(d as date) as int
DoubleElement(var a as array, ... as int) as double
@Dow$(d as date) as string
@Dow(d as date) as int
@Dw$(d as date) as string
@Dw(d as date) as int
@ElementBoundTo(var fieldName as string) as string
@ElementBoundToType(var fieldName as string) as int
@ElementIndexByName(name as string) as int
@ElementName(var fieldName as string) as string
@ElementNameByIndex(index as int) as string
@ElementType(var fieldName as string) as int
ElementType(var a as array) as string
@Error() as boolean
@Ex(x as double, y as double) as double
@Exit()
@Exp(x as double, y as double) as double
@ExpandTreeItem(mname as string) as int
@Fedit()
@Field(fn as string) as string
FileClose(handle as int)
FileDelete(fileName as string)
FileExists(fileName as string) as boolean
FileGetErrorMsg(errorCode as int) as string
FileGetLastError() as int
FileOpen(fileName as string) as int
FilePos(handle as int) as int
FileReadChar(handle as int) as char
FileReadln(handle as int, var s as string)
FileSeek(handle as int, filePos as int)
FileSize(handle as int) as int
FileWrite(handle as int, ... as string)
FileWriteln(handle as int, ... as string)
@Filename() as string
@FindStringArray(str1 as string, str2 as string) as int
FinishPage()
@Fn() as string
ForceGroupBreak(level as int)
ForceRedraw()
FormCommit(FormName as string)
FormFieldValue(formName as string, fieldName as string, instance as int, val as string)
@FormFieldValue(formName as string, fieldName as string, instance as int) as string
@FormIsStandalone() as int
@FormNewRecord(formName as string) as int
@FormResultSetCurrentPosition(formName as string) as int
FormResultSetCurrentPosition(formName as string, rn as int)
@FormResultSetTotal(formName as string) as int
@FormWillClose() as int
@Frac(d as double) as double
@Fv(pa as double, i as double, np as double) as double
@GetFromKeyboard() as int
GiveToKeyboard()
@GlobalValue(name as string) as string
GlobalValue(name as string, value as string)
@Group() as string
@Height(var fieldName as string) as int
Height(var fieldName as string, val as int)
@Help(var fieldName as string)
@Hgt(var fieldName as string) as int
Hgt(var fieldName as string, val as int)
@HideTreeItem(mname as string) as int
@Hp(var fieldName as string)
@ImagePath() as string
@In(s as string, substr as string) as int
@Insert(filename as string) as string
@InsertStringArray(str1 as string, str2 as string, pos as int) as string
@Instr(s as string, substr as string) as int
@Int(x as double) as double
IntElement(var a as array, ... as int) as int
@Ir(pv as double, pa as double, np as double) as double
@IsBlank(var fieldName as string) as boolean
@IsNew() as boolean
@IsNotifyForm() as int
@It(x as double) as double
@Label(var fieldName as string) as string
Label(var fieldName as string, val as string)
@Layout() as string
@Left(s as string, n as int) as string
@Len(s as string) as int
@LoadCopySpec(mname as string) as int
@LoadExportSpec(mname as string) as int
@LoadImportSpec(mname as string) as int
@LoadMassUpdateSpec(mname as string) as int
@LoadRetrieveSpec(mname as string) as int
@LoadSortSpec(mname as string) as int
Loiter(count as int)
@Lookup(key as string, column as int) as string
Lookup(key as string, column as int, var field as string)
@LookupR(key as string, column as int) as string
LookupR(key as string, column as int, var field as string)
@Lt(s as string, n as int) as string
@Lu(key as string, column as int) as string
Lu(key as string, column as int, var field as string)
@Lur(key as string, column as int) as string
Lur(key as string, column as int, var field as string)
@Macro(mname as string)
@Max(... as double) as double
@Md(s as string, start as int, num as int) as string
@Mid(s as string, start as int, num as int) as string
@Min(... as double) as double
@Mn(... as double) as double
@Mod(x as double, y as double) as double
@Mode() as int
@Modified() as boolean
@Month$(d as date) as string
@Month(d as date) as int
@Msg(s as string)
@MsgBox(x as string, y as string, z as string)
@Mt$(d as date) as string
@Mt(d as date) as int
@Mx(... as double) as double
NewPage(width as int, height as int)
@Newline() as string
@Nl() as string
@Nmb(increment as int) as int
@Nmb() as int
@NotifyForm() as int
NotifyForm(notifyFlag as int)
@Num(s as string) as string
@Number(increment as int) as int
@Number() as int
@NumberOfElements() as int
OpenSlate()
@PageExtentX() as int
PageExtentX(xx as int) as int
@PageExtentY() as int
PageExtentY(yy as int) as int
@Platform() as string
@Play(... as string)
@Pmt(pv as double, i as double, np as double) as double
PopulateListElement(var fieldName as string, val as string)
@PopupChoiceList(list as string, header as string) as string
@PopupMenu(list as string, header as string) as string
PopupSelectPosition(p as int, xx as int, yy as int)
PrintBox(boxtype as int, xpos as int, ypos as int, width as int, height as int)
PrintImage(val as string, xpos as int, ypos as int, width as int, height as int)
PrintPageMargin(left as int, top as int, right as int, bottom as int)
PrintPageOrientation(orient as int)
PrintPagePaper(paper as int)
PrintPageReset()
PrintString(val as string, xpos as int, ypos as int, width as int, font as string, fontsize as int, measure_only as int)
@PromptForUserInput(q as string, def as string) as string
@Pv(pa as double, i as double, np as double) as double
@QuestionUser(q as string, def as string) as string
RGBColor(var fieldName as string, r1 as int, g1 as int, b1 as int, r2 as int, g2 as int, b2 as int)
Random(n as double) as double
ReadChar() as char
ReadLn(var s as string)
@ReadOnly(var fieldName as string) as int
ReadOnly(var fieldName as string, val as int)
@RecordModifiedDate() as date
@RecordModifiedTime() as time
@RelabelTreeItem(mname as string, new_name as string) as int
RemoveRecordFromResultSet()
@Replace(s as string, old as string, new as string) as string
@ReplaceByPosition(s as string, new as string, position as int, len as int) as string
@ReplaceStringArray(str1 as string, str2 as string, index as int) as string
@Replfir(s as string, old as string, new as string) as string
@Repllas(s as string, old as string, new as string) as string
@Rest(x as string, y as string) as boolean
RestoreDefaultPrinter()
RestoreStringArraySeparator()
@ResultSetCurrentPosition() as int
ResultSetCurrentPosition(rn as int)
@ResultSetTotal() as int
@RevealTreeItem(mname as string) as int
ReviseTranslationTable(s_from as string, s_to as string)
@Right(s as string, n as int) as string
@Rnd(x as double, places as int) as double
@Round(x as double, places as int) as double
@Rt(s as string, n as int) as string
@RunExitProgrammingOnCloseForm()
RunExitProgrammingOnCloseForm(state as int)
@Save()
@SearchStringArray(str1 as string, str2 as string) as string
@Select(n as int, ... as string) as string
@SelectTreeItem(mname as string) as int
@SendMail(Server as string, Subject as string, SenderUserId as string, DestUserIds as string, CcUserIds as string, BccUserIds as string, MessageBody as string) as int
@ServerDate() as string
@ServerTime() as string
SetBooleanElement(newValue as boolean, var a as array, ... as int)
SetCharElement(newValue as char, var a as array, ... as int)
SetDateElement(newValue as date, var a as array, ... as int)
SetDefaultTab(level as string)
SetDoubleElement(newValue as double, var a as array, ... as int)
SetIntElement(newValue as int, var a as array, ... as int)
SetStringArraySeparator(str as string)
SetStringElement(newValue as string, var a as array, ... as int)
SetThisElement(element_name as string)
SetTimeElement(newValue as time, var a as array, ... as int)
SetTooltip(var fieldName as string, tt_text as string)
@Sgn(x as double) as int
@Shell(command as string) as int
@SortStringArray(str as string, type as int) as string
Split(var s as string, delimiters as string) as string
@Sq(x as double) as double
@Sqrt(x as double) as double
@Standalone() as int
@Std(... as double) as double
@Str(s as string) as string
@StringArrayElementList() as string
StringElement(var a as array, ... as int) as string
@SubformVisibility(formName as string) as int
SubformVisibility(formName as string, rn as int)
@Sum(... as double) as double
@T(timeStr as string) as time
@TD(x as date) as date
@TM(x as double) as double
@TN(x as double) as double
@TT(x as time) as time
@TY(x as boolean) as boolean
Tab(n as int) as string
@Text(n as int, s as string) as string
ThrowFocus(var fieldName as string)
@Time() as time
TimeElement(var a as array, ... as int) as time
@Timestamp() as int
@Tme() as time
@ToDate(x as date) as date
ToLower(s as string) as string
@ToMoney(x as double) as double
@ToNumber(x as double) as double
@ToTime(x as time) as time
ToUpper(s as string) as string
@ToYesNo(x as boolean) as boolean
@TreeItemExpansion(mname as string) as int
@TreeItemVisibility(mname as string) as int
@Txt(n as int, s as string) as string
@Ud() as boolean
@UnionStringArray(str1 as string, str2 as string) as string
@UniqueStringArray(str1 as string) as string
UnsetThisElement()
@Update() as boolean
@Us(list as string) as string
Us(list as string, var field as string)
@UserSelect(list as string) as string
UserSelect(list as string, var field as string)
@Userid() as string
@Usl(list as string) as string
Usl(list as string, var field as string)
@Var(... as double) as double
@Visibility(var fieldName as string) as int
Visibility(var fieldName as string, val as int)
@Width(var fieldName as string) as int
Width(var fieldName as string, val as int)
Write(... as string)
WriteLn(... as string)
@Wth(var fieldName as string) as int
Wth(var fieldName as string, val as int)
@XLR(fn as string, key as string, xkf as string, lf as string) as string
@XListValues(fn as string, xf as string) as string
@XLookup(fn as string, key as string, xkf as string, lf as string) as string
XLookup(fn as string, key as string, xkf as string, xlf as string, var df as string)
@XLookupAll(fn as string, key as string, xkf as string, lf as string) as string
@XLookupR(fn as string, key as string, xkf as string, lf as string) as string
XLookupR(fn as string, key as string, xkf as string, xlf as string, var df as string)
@XLookupSourceList(fn as string, key as string, xkf as string, lf as string) as string
@XLookupSourceListAll(fn as string, key as string, xkf as string, lf as string) as string
@XPos(var fieldName as string) as int
XPos(var fieldName as string, val as int)
XPost(fn as string, xk as string, kvf as string, entry as string, xtf as string, ... as string)
XPostR(fn as string, xk as string, kvf as string, entry as string, xtf as string, ... as string)
XPostall(fn as string, xk as string, kvf as string, entry as string, xtf as string, ... as string)
@XUserSelect(fn as string, xf as string) as string
XUserSelect(fn as string, xf as string, var df as string)
@XUserSelectR(fn as string, xf as string, xdf as string, startr as string, endr as string) as string
XUserSelectR(fn as string, xf as string, xdf as string, startr as string, endr as string, var df as string)
Xlr(fn as string, key as string, xkf as string, xlf as string, var df as string)
@Xlu(fn as string, key as string, xkf as string, lf as string) as string
Xlu(fn as string, key as string, xkf as string, xlf as string, var df as string)
@Xus(list as string, xf as string) as string
Xus(fn as string, xf as string, var df as string)
@Xusr(fn as string, xf as string, xdf as string, startr as string, endr as string) as string
Xusr(fn as string, xf as string, xdf as string, startr as string, endr as string, var df as string)
@YPos(var fieldName as string) as int
YPos(var fieldName as string, val as int)
@Year(d as date) as int
@Yr(d as date) as int
  

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