General functions

These functions can be used anywhere in a Sculptor program. Functions beginning with a capital letter are listed separately at the end.

abs()

Returns the absolute value of a numberic expression

access()

Check existence or permissions of a file or directory

activate_app()

Activate a window in another application

array_to_text()

Extract text from an array across element boundaries

asc()

Return the ASCII value of a character

begin()

Write a begin marker to the transaction file

browse_for_folder()

Browse for a folder or file

centre() | center()

Return a string centred within its width

chdir()

Change the current working directory

check_clipboard()

Check the type of the contents of the Windows clipboard

chmod()

Set access permissions for a file or directory

chr()

Return an alpha character from an ASCII code

close_handle()

Close the handle to a background task

cols_to_pixels()

Convert a column number to pixels

commit()

Write a commit marker to the transaction file

copyfile()

Copy a file

create_msg_queue()

Create a message queue

create_shared_memory()

Create a shared memory segment

cwd()

Return the current working directory

datatype()

Return the data type of a field

dbgmsg()

Define a Sculptor program debug message

decdate()

Convert a Sculptor day number to day, month and year

dim()

Return the number of elements or dimensions of an object

dir()

Return the files in a directory

dir_to_file()

Save the files in a directory into a Sculptor keyed file

disconnect_client()

Send a disconnect client request to a Sculptor server

encdate()

Convert a day, month and year to a Sculptor day number

encrypt()

Encrypt a text string

end_process()

Force a child process to terminate

exec_dll_method()

Call methods of a dynamic library

execute()

Execute a child process

exitcode()

Return the state of a child process

field_is_not_valid()

Validate field

fileinfo()

Retrieve size, date and time info about a file or directory

first_child()

Return a pointer to a window’s first child window

first_control()

Return a pointer to the first control in a window, group or menu

first_menu()

Return a pointer to a window’s first menu

fontmetrics()

Return a font’s average character width and character height in pixels

fromname()

Reference an object from its name

getbyte()

Return the value of a specified byte

getenv()

Return an environment variable

getstr()

Return a substring of a longer string

get_client_info()

Return information on a client connection to a Sculptor server

get_clipboard()

Retrieve the contents of the Windows clipboard

get_filename()

Get or save a file using the standard Windows dialog

get_free_textbox_content()

Retrieve the content of a free textbox

get_process_priority()

Get the priority class of a process

get_text()

Retrieve the current text from the control with focus

get_thread_priority()

Get the priority of a thread

inchar()

Return the ASCII value of the next input character

instr()

Search for a pattern in a string

isnull()

Determine whether a pointer field is pointing to anything

isblank()

Check for all null values in a field, record or array element

keycode()

Return a code with keypress information

left()

Left-justify a string

link_msg_queue()

Link to an existing message queue

link_shared_memory()

Link to a shared memory segment

load_picture()

Load a graphic image

longname()

Return the long (fully qualified) name of an object

mkdir()

Create a directory

nameof()

Return the short name of an object

nap()

Suspend the calling program

next_object()

Return a pointer to the next object at the same level

parent()

Return the parent of an object

pixels_to_cols()

Convert a pixel co-ordinate to columns

pixels_to_rows()

Convert a pixel co-ordinate to rows

playsound()

Play a sound file

post_message()

Post a standard Windows message

putenv()

Set the value of an environment variable

put_clipboard()

Paste data to the Windows clipboard

rand()

Return a pseudo-random number

read_msg_queue()

Read a message from a message queue

read_shared_memory()

Read from a shared memory segment

record_count()

Return the number of records in a Sculptor keyed file

redim()

Command to modify the size of any array dimension

remove()

Remove a file from disk storage

remove_msg_queue()

Remove a message queue

rename()

Rename a file or directory

right()

Right-justify a string

rmdir()

Delete a directory

rollback()

Undo database updates since the last begin marker

rows_to_pixels()

Convert a row number to pixels

run[ex]()

Run a Windows file

sendmail()

Start an email using the default email program (Microsoft Windows only)

send_message()

Send a standard Windows message to a C program

server_info()

Store user, platform and Sculptor version information about a server

server_time()

Store date and time info from a remote server

setbyte()

Set the value of a byte

setcursor()

Set the cursor type

set_foreground_window()

Forces a window into the foreground

setlocale()

Set or return the current locale

setstr()

Store a substring within a longer string

set_process_priority()

Set the priority class of a process

set_thread_execution_state()

Enables an application to inform the system that it is in use (Microsoft Windows only)

set_thread_priority()

Set the priority of a thread

sort()

Sort an array or a record of arrays

strlen()

Return the length of a string

system_tray_icon()

Add, modify or delete an icon in the system tray

tell()

Return the current position of a sequential file

tempname()

Return a unique temporary file name

text_to_array()

Copy characters from a text string to an array, across element boundaries

textlength()

Return the number of character positions a string will occupy in a specified font

tolower()

Fold a string to lower case

tostr()

Convert an expression to text

toupper()

Fold a string to upper case

typeof()

Return the type of an object

unlink_shared_memory()

Unlink from a shared memory segment

unlock_shared_memory()

Unlock a shared memory segment

url_exec()

Send a URL to the web browser

users()

Return user licence information

usertype()

Return the user data type of a field

write_msg_queue()

Write a message to a message queue

write_shared_memory()

Write to a shared memory segment

The following functions are not true functions, but are calls to true functions, pre-defined in the standard include file $SCULPTOR/include/sculptor.h - e.g. the function AnimatePlay() is actually a call to the function animate(). The recommended method of using functions such as animate() is to use the pre-defined function calls listed below.

Graphic animations

AnimatePlay()

Play a graphic animation

AnimateSeek()

Display a frame from a graphic animation

AnimateStop()

Stop a graphic animation from playing

Data dictionary info

FieldProp()

Return details of a specified field in a data dictionary

IndexFieldProp()

Return details of a specified field in a secondary index

OpenDotd()

Return general information about a data dictionary file

OpenIndex()

Return general information about a specified secondary index

Progress bars

SetProgressPosition()

Set and display a progress bar value

SetProgressRange()

Set the range for a progress bar

Timers

CreateTimer()

Create a timer

DestroyTimer()

Destroy a timer

StartTimer()

Start a timer

StopTimer()

Stop a timer