Function.Intrinsic.General

From GAB Help
Jump to: navigation, search

Available commands

Contents

Function.Intrinsic.API.AppActivate

Syntax

Function.Intrinsic.API.AppActivate(title/thread ID)

Function.Intrinsic.API.AppActivate(title/thread ID, wait)

Arguments

title/thread ID
wait

Examples

Remarks


Function.Intrinsic.API.ChangeCaption

ChangeCaption allows the user to change what is displayed on the screen for the program for any control, such as the form, labels, etc.

Syntax

Function.Intrinsic.API.ChangeCaption (Long, String)

Arguments

Long

Window Handle for the control

String

New Caption for the control

Example

Function.Intrinsic.API.ChangeCaption (1, “New Form Caption”)

Remarks


Function.Intrinsic.API.CreateFileAssociation

This function creates a file association to an executable program.

Syntax

Function.Intrinsic.API.CreateFileAssociation(extension, association name, FQ program to call, verb)

Arguments

Example

Function.Intrinsic.api.createfileassociation("CNG","GAB Program","c:\windows\system32\notepad.exe","Open")

Remarks

Users executing this command need write access to the HKCR registry key.


Function.Intrinsic.API.ExtractIcon

This function returns the instance handle of the icon within the specified EXE.

Syntax

Function.Intrinsic.API.ExtractIcon(exe name, icon index, long return)

Arguments

Example

Remarks


Function.Intrinsic.API.FindWindow

Syntax

Function.Intrinsic.API.FindWindow(Window text, hwnd ret)

Arguments

Window Text

Windows text -string

hwnd Return

Long Variable to store the hwnd

Example

Variable.local.iHwnd.declare(Long)
Function.Intrinsic.API.FindWindow(“Program Screen”,variable.local.iHwnd)

Remarks


Function.Intrinsic.API.FlashWindowCount

This command flashes the specified window and the associated bar in the Windows taskbar. The frequency is expressed in milliseconds, but a value of zero causes the window to flash at the default cursor flash rate. The window will flash the number of times specified in the count parameter.

Syntax

Function.Intrinsic.API.FlashWindowCount(window handle, frequency, count)

Arguments

None

Example

Remarks

None


Function.Intrinsic.API.GetHandleFromPID

Syntax

Function.Intrinsic.API.GetHandleFromPID(PID, hWnd return)

Arguments

Example

Remarks


Function.Intrinsic.API.GetHandleFromPosition

Syntax

Function.Intrinsic.API.GetHandleFromPosition(x, y, Return Variable)

Arguments

X - X Coordinate

Long Data Type

Y - Y Coordinate

Long Data Type

Return Variable

Handle - Long Data Type

Example

Function.Intrinsic.API.GetHandleFromPosition(variable.local.x, variable.local.y, variable.local.iHdl)

Remarks


Function.Intrinsic.API.GetMouseButtonState

Gets screen’s current mouse state.

Syntax

Function.Intrinisc.API.GetMouseButtonState(Button[s], Boolean Ret)

Arguments

Button[s]

Name of Button[s]

Y Ret

Boolean Variable Type

Example

Function.Intrinsic.API.GetMouseButtonState(gui.F_Test.cmdTest, variable.local.bMouse)

Remarks


Function.Intrinsic.API.GetMousePosition

Gets screen’s current mouse location

Syntax

Function.Intrinisc.API.GetMousePosition(X Ret, Y Ret)

Arguments

X Ret

Float Variable Type (in Pixels)

Y Ret

Float Variable Type (In Pixels)

Example

Function.Intrinsic.API.GetMousePosition(variable.local.x, variable.local.y)

Remarks


Function.Intrinsic.API.GetWindowDimensions

Syntax

Function.Intrinsic.API.GetWindowDimensions(Handle, X ret, Y ret)

Arguments

Handle

Windows handle

X Return

Long Variable to store the x-coordinate

Y Return

Long Variable to store the y-coordinate

Example

Variable.local.iHdl.declare(Long)
Variable.local.iX.Declare(Long)
Variable.local.iY.Declare(Long)
Function.intrinsic.file.GetHandle(variable.local.iHdl)
Function.Intrinsic.API.GetWindowDimensions(variable.local.iHdl, variable.local.iX, variable.local.iY)

Remarks


Function.Intrinsic.API.GetWindowList

Function.Intrinsic.API.GetWindowList

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.API.GetWindowPosition

Syntax

Function.Intrinsic.API.GetWindowPosition(Handle, X ret, Y ret)

Arguments

Handle

Windows handle

X Return

Long Variable to store the x-coordinate

Y Return

Long Variable to store the y-coordinate

Example

Variable.local.iHdl.declare(Long)
Variable.local.iX.Declare(Long)
Variable.local.iY.Declare(Long)
Function.Intrinsic.API.GetWindowPosition(variable.local.iHdl, variable.local.iX, variable.local.iY) 

Remarks


Function.Intrinsic.API.GetWindowText

Syntax

Function.Intrinsic.API.GetWindowText(Handle,Ret Text)

Arguments

Handle

Windows handle of the Window

Ret Text

String Variable for the returned Text

Example

Function.Intrinsic.API.GetWindowText(Variable.Local.iHdl, Variable.Local.sText)

Remarks


Function.Intrinsic.API.HideWindow

Hides current window if the user wants to show another screen

Syntax

Function.Intrinsic.API.HideWindow (Long)

Arguments

Long

Window Handle for the control

Example

Function.Intrinsic.API.HideWindow (1)

Remarks


Function.Intrinsic.API.LockWindowUpdate

Disables drawing in the window

Syntax

Function.Intrinsic.API.LockWindowUpdate (hWnd)

Arguments

hWnd - Window handle long variable

Example

Function.Intrinsic.API.LockWindowUpdate(variable.screen.main!txtbox1.hWnd)

Remarks

Locks textbox from the draw function


Function.Intrinsic.API.ReadRegistryKey

Syntax

Function.Intrinsic.API.ReadRegistryKey(base, key, subkey name, string return)

Arguments

Base

Base types see Remarks

Key

Path to Item

SubKey Name

Specific Item under the Key

String Return

String Variable returned with the registry key info

Example

Variable.Local.sRet.declare(string)
f.in.API.ReadRegistryKey("HKLM","SOFTWARE\ODBC\ODBC.INI\GLOBAL_PLA","ServerName",v.lo.sret)
f.in.ui.msgbox(v.lo.sret)
This will give the Server name and port for the Global_Pla ODBC connection 

Remarks

  • Base can be: HKLM(hkey local machine), HKCR (hkey classes root), HKCC (hkey current config), HKCU (hkey current user), HKPD (hkey performance data), HKU (hkey user)


Function.Intrinsic.API.SendMessageL

Wraps a windows send message – forces the last parameter to be a long

Syntax

Function.Intrinsic.API.SendMessageL(HWND, WM, Long Parameter, Long Parameter)

Arguments

HWND

Window Handle number – long variable

WM

Windows Message number – long variable

Long Param

1st parameter always a long(integer)

Long Param

2nd Parameter in this instance it is a long

Example

Remarks

  • Advanced Feature – Caution may cause Blue Screen (BSOD)


Function.Intrinsic.API.SendMessageS

Wraps a windows send message – Makes the last parameter a string type

Syntax

Function.Intrinsic.API.SendMessageS(HWND, WM, Long Parameter, String Parameter)

Arguments

HWND

Window Handle number – long variable

WM

Windows Message number – long variable

Long Param

1st parameter always a long(integer)

String Param

2nd Parameter in this instance it is a string

Example

Remarks

  • Advanced Feature – Caution may cause Blue Screen (BSOD)


Function.Intrinsic.API.SendMessageU

Wraps a windows send message

Syntax

Function.Intrinsic.API.SendMessageL(HWND, WM, Long Parameter, Variant Parameter)

Arguments

HWND

Window Handle number – long variable

WM

Windows Message number – long variable

Long Param

1st parameter always a long(integer)

Variant Param

2nd Parameter in this instance it is a variant

Example


Remarks

  • Advanced Feature – Caution may cause Blue Screen (BSOD)


Function.Intrinsic.API.SetAlwaysonTop

This function sets the "always on top" property of the specified window.

Syntax

Function.Intrinsic.API.SetAlwaysOnTop(handle, boolean)

Arguments

Example

Function.Intrinsic.API.SetAlwaysOnTop(v.caller.handle,true)

Remarks


Function.Intrinsic.API.SetAlwaysOnTop

This function sets the "always on top" property of the specified window.

Syntax

Function.Intrinsic.API.SetAlwaysOnTop(handle, boolean)

Arguments

handle
boolean

Examples

Remarks


Function.Intrinsic.API.SetControlFocus

Sets the focus to the control you pass the Window Handle for

Syntax

Function.Intrinsic.API.SETCONTROLFOCUS(Window Handle)

Arguments

Window Handle

Long

Example

Remarks


Function.Intrinsic.API.SetMouseCliPregion

Tells program the current mouse clip region

Syntax

Function.Intrinisc.API.SetMouseClipRegion(X1,Y1,X2,Y2)

Arguments

X1

Float Variable/Value Type (in Pixels)

Y1

Float Variable/Value Type (In Pixels)

X2

Float Variable/Value Type (in Pixels)

Y2

Float Variable/Value Type (In Pixels)

Example

Function.Intrinsic.API.SetMouseClipRegion(variable.local.x1, variable.local.y1, variable.local.x2, variable.local.y2)

Remarks


Function.Intrinsic.API.SetMousePosition

Tells program the desired current mouse location

Syntax

Function.Intrinisc.API.SetMousePosition(X, Y)

Arguments

X

Float Variable/Value Type (in Pixels)

Y

Float Variable/Value Type (In Pixels)

Example

Function.Intrinsic.API.SetMousePosition(1235,1)

Remarks


Function.Intrinsic.API.SetParent

Makes one control the “parent” of another control

Syntax

Function.Intrinsic.API.SetParent (Long, Long)

Arguments

Long

Window Handle for the Child Control

Long

Window Handle for the Parent Control

Example

Function.Intrinsic.API.SetParent (3, 2)

Remarks


Function.Intrinsic.API.SetWindowFocus

Syntax

Function.Intrinsic.API.SetWindowFocus(Handle)

Arguments

Handle

Windows Handle - Long Data Type

Example

Function.Intrinsic.API.SetWindowFocus(1)

Remarks


Function.Intrinsic.API.SetWindowPosition

Syntax

Function.Intrinsic.API.SetWindowPosition(Handle, X , Y) or

Function.Intrinsic.API.SetWindowPosition(Handle, X , Y,Width, Height)

Arguments

Handle

Windows handle

X

Long to store the x-coordinate

Y

Long to store the y-coordinate

Width

Float to store width of Window

Height

Float to store width of Window

Example

Variable.local.iHdl.declare(Long)
Variable.local.iX.Declare(Long)
Variable.local.iY.Declare(Long)
Function.Intrinsic.API.SetWindowPosition(variable.local.iHdl, variable.local.iX, variable.local.iY) 

Remarks


Function.Intrinsic.API.SetWindowPositions

Syntax

Function.Intrinsic.API.SetWindowPositions(ParentHandle, Child Handle, Mode)

Arguments

Parent Handle

Windows handle

Parent Handle

Windows handle

Mode

1 – center child on Parent

2 – Left-bottom align child on parent

3 – right top align child on parent

4 – left-bottom align child on parent (shift left)

5 – right top align child on parent (shift up)

6 – Left, bottom placement, stretch width

7 – right, top placement, stretch height

8 – left, bottom placement, stretch width, and shift up

9 – right, top placement, stretch height, and shift left

10 – child masks parent

Example

Function.Intrinsic.API.SetWindowPositions(variable.local.iPHdl, variable.local.iCHdl,3)

Remarks


Function.Intrinsic.API.SetWindowText

Syntax

Function.Intrinsic.API.SetWindowText(Handle,Text)

Arguments

Handle

Windows handle of the Window

Text

String Value or Variable

Example

Function.Intrinsic.API.SetWindowText(Variable.Local.iHdl,”Please change the Text”)

Remarks


Function.Intrinsic.API.UnhideWindow

Will unhide a window the user wants to show again

Syntax

Function.Intrinsic.API.UnHideWindow (Long)

Arguments

Long - Window Handle for the control

Example

Function.Intrinsic.API.UnHideWindow (000001)

Remarks


Function.Intrinsic.API.UnlockWindowUpdate

Enables drawing in the window

Syntax

Function.Intrinsic.API.UnLockWindowUpdate (iWnd)

Arguments

iWnd

Window handle long variable

Example

Function.Intrinsic.API.UnLockWindowUpdate(variable.screen.main!txtbox1.hWnd)

Remarks

Locks textbox from the draw function


Function.Intrinsic.BDF.Clone

This command copies the structure, without data, from a BDF already loaded into memory with Function.Intrinsic.BDF.Load to a new BDF entity.

Syntax

Function.Intrinsic.BDF.Clone(source BDF, target BDF)

Arguments

Source BDF

The specified BDF already loaded in memory

Target BDF

Name of the new BDF entity

Example

Function.Intrinsic.BDF.Load(“AUX002”, “AUX002”)
Function.Intrinsic.BDF.Clone(“AUX002”,“Clone”)
-Copies AUX002 structure and names the copy Clone 

Remarks

  • The target BDF name should not already exist.
  • While BDFs allow for random access reads, they do not allow for deletion, or for insertion anywhere other than the end of the BDF set. If you JUST need to append a record to the end of a BDF, you can do the following:

Load -> WriteRow -> Save

Otherwise, you need to do the following:

Load (sBDF) -> Clone (sBDF to tBDF) -> ReadRow (from sBDF) -> WriteRow (to tBDF) -> Save


Function.Intrinsic.BDF.Load

Some screens in Global Shop present data in listviews or grids; this data is not directly accessible through the Variable.Passed namespace. Instead, this function can be used to load the bulk information into a memory object.

Syntax

Function.Intrinsic.BDF.Load(name, ID)

Arguments

Example

Remarks

  • While BDFs allow for random access reads, they do not allow for deletion, or for insertion anywhere other than the end of the BDF set. If you JUST need to append a record to the end of a BDF, you can do the following:

Load -> WriteRow -> Save

  • Otherwise, you need to do the following:

Load (sBDF) -> Clone (sBDF to tBDF) -> ReadRow (from sBDF) -> WriteRow (to tBDF) -> Save


Function.Intrinsic.BDF.ReadColumnCount

This function returns the number of columns in the BDF memory object. The BDF memory object is populated with the Function.Intrinsic.BDF.Load function.

Syntax

Function.Intrinsic.BDF.ReadColumnCount(name, long return)

Arguments

Example

Remarks


Function.Intrinsic.BDF.ReadColumnDataType

This function returns the column data types of the BDF memory object, in a string delimited with *!*. Function.Intrinsic.String.Split can be used to separate the string. The BDF memory object is populated with the Function.Intrinsic.BDF.Load function.

Syntax

Function.Intrinsic.BDF.ReadColumnDataType(name, string return)

Arguments

Returned data types are:

S (string), N (numeric), and D (date).

Example

Remarks


Function.Intrinsic.BDF.ReadColumnTitle

Returns the column titles of the BDF memory object

Syntax

Function.Intrinsic.BDF.READCOLUMNTITLE(Name, String Return)

Arguments

Name

String Name of the BDF memory object

String Return

String Return of Column titles

Example

Remarks

  • The return is a *!* delimited string. Use Function.Intrinsic.String.Split to parse it.
  • The BDF memory object is populated with the Function.Intrinsic.BDF.Load function.


Function.Intrinsic.BDF.ReadKey

This function returns the key of a specified BDF object.

Syntax

Function.Intrinsic.BDF.ReadKey(name, string return)

Arguments

Example

Remarks

  • The BDF memory object is populated with the Function.Intrinsic.BDF.Load function.


Function.Intrinsic.BDF.ReadRow

This function returns an entire row of data from a BDF memory object, in a string delimited with |~|. Function.Intrinsic.String.Split can be used to separate the string. The BDF memory object is populated with the Function.Intrinsic.BDF.Load function.

Syntax

Function.Intrinsic.BDF.ReadRow(name, row, string return)

Arguments

Example

Remarks

  • While BDFs allow for random access reads, they do not allow for deletion, or for insertion anywhere other than the end of the BDF set. If you JUST need to append a record to the end of a BDF, you can do the following:

Load -> WriteRow -> Save

  • Otherwise, you need to do the following:

Load (sBDF) -> Clone (sBDF to tBDF) -> ReadRow (from sBDF) -> WriteRow (to tBDF) -> Save


Function.Intrinsic.BDF.ReadRowCount

This function returns the number of rows in the BDF memory object. The BDF memory object is populated with the Function.Intrinsic.BDF.Load function.

Syntax

Function.Intrinsic.BDF.ReadRowCount(name, long return)

Argument

Example

Remarks


Function.Intrinsic.BDF.ReadTitle

This function returns the title of a specified BDF object. The BDF memory object is populated with the Function.Intrinsic.BDF.Load function.

Syntax

Function.Intrinsic.BDF.ReadTitle(name, string return)

Arguments

Example

Remarks


Function.Intrinsic.BDF.Save

This function saves a BDF in memory, back to the source BDF filename linked to the passed ID.

Syntax

Function.Intrinsic.BDF.Save(BDF name, ID)

Argument

BDF Name

Name of new clones BDF entity

ID

ID of source BDF

Example

Function.Intrinsic.BDF.WriteRow(“Clone”,v.local.sReadRow)
Function.Intrinsic.BDF.Save(“Clone”, “AUX002”)
-Saves the created BDF named Clone over the original BDF named AUX002 

Remarks

  • While BDFs allow for random access reads, they do not allow for deletion, or for insertion anywhere other than the end of the BDF set. If you JUST need to append a record to the end of a BDF, you can do the following:

Load -> WriteRow -> Save

  • Otherwise, you need to do the following:

Load (sBDF) -> Clone (sBDF to tBDF) -> ReadRow (from sBDF) -> WriteRow (to tBDF) -> Save


Function.Intrinsic.BDF.SeekRow

This function allows you to search a specified BDF column for a value.

Syntax

Function.Intrinsic.BDF.SeekRow(name, column, starting row, search string, long return)

Arguments

Example

Remarks

The starting row can be specified in order to find multiple occurances. The BDF memory object is populated with the Function.Intrinsic.BDF.Load function.


Function.Intrinsic.BDF.SetColumnTitle

This function sets the column title of the specified column of the specified BDF object.  The BDF memory object is populated with the Function.Intrinsic.BDF.Load function.

Syntax

Function.Intrinsic.BDF.SetColumnTitle(BDF name, column ordinal, column title)

Arguments

BDF name
column ordinal
column title)

Examples

Remarks


Function.Intrinsic.BDF.TextMatrix

This function returns a single cell of data from a BDF memory object.

Syntax

Function.Intrinsic.BDF.TextMatrix(name, column, row, return)

Arguments

Example

Remarks

  • The returned value is cast automatically to the appropriate variable data type. The BDF memory object is populated with the Function.Intrinsic.BDF.Load function.


Function.Intrinsic.BDF.WriteRow

This function writes a new row to the specified BDF memory object.

Syntax

Function.Intrinsic.BDF.WriteRow(target BDF, string)

Argument

Target BDF

Name of the new BDF entity

String Return

String Returned with data in the row

Example

Function.Intrinsic.BDF.WriteRow(“Clone”,V.local.sReadRow)
-Writes data from sReadRow into BDF named Clone 

Remarks

  • WriteRow does not enforce that you have the proper number of columns, the proper delimiter, or use the proper data types - that is the responsibility of the programmer.
  • While BDFs allow for random access reads, they do not allow for deletion, or for insertion anywhere other than the end of the BDF set. If you JUST need to append a record to the end of a BDF, you can do the following:

Load -> WriteRow -> Save

  • Otherwise, you need to do the following:

Load (sBDF) -> Clone (sBDF to tBDF) -> ReadRow (from sBDF) -> WriteRow (to tBDF) -> Save


Function.Intrinsic.Control For ExitFor Next

If you know how many times you want to loop (ex. number of months in a year), you can use a FOR loop. A FOR loop requires a control variable (usually a LOCAL variable declared as a LONG).

Below is a pseudo-code example:

for i = 1 to number of days in the month

add up the labor hours for day i

store the result of the sum in a bucket for day i

next I

Syntax

Function.Intrinsic.Control.For(Control Var [Long/Float], Start Number [Long/Float], End Number [Long/Float], Step number [Long/Float])

Function.Intrinsic.Control.ExitFor(Control Var [Long/Float])

Function.Intrinsic.Control.Next(Control Var [Long/Float])

OR

Function.Intrinsic.Control.For(Control Var [Long/Float], Start Number [Long/Float], End Number [Long/Float])

OR

Function.Intrinsic.Control.For(Control Var [Long/Float], End Number [Long/Float])

Arguments

Control Var

Name of the For Statement

Start Number

Number to start the For function

If excluded then Start Number is assumed 0

End Number

Last number of the For Statement

Step Number

How many numbers to skip between Start and End, no 0, usually a step 1

If excluded then Step Number is assumed 1

Example

V.Local.iCount.Declare(Long)
F.Intrinsic.Control.For(V.local.iCount, 0, 10, 2)
	F.Intrinisc.Control.If(v.ODBC.con!rstTest.eof, = , True)
		F.Intrinsic.Control.ExitFor(V.Local.iCount)
	F.Intrinsic.Control.Endif
F.Intrinsic.Control.Next(V.Local.iCount) 


======Array Example======
V.Local.i.Declare(Long)
V.Local.sRetval.Declare(String)
V.Local.sPath.Declare(String)
V.Local.sRetarray.Declare(String)
f.Intrinsic.String.Build("{0}\*.*",v.Caller.ProgramsDir,v.Local.sPath)
F.Intrinsic.File.GetFileList(V.Local.sPath,Variable.Local.sRetval)
F.Intrinsic.String.Split(V.Local.sRetval,":",V.Local.sRetarray)
F.Intrinsic.Control.For(V.local.i,V.local.sRetArray.Lbound,V.local.sRetArray.Ubound,1)
	F.Intrinsic.UI.Msgbox(V.Local.sRetarray(V.Local.i))
	F.Intrinsic.Control.If(V.Local.i,=,10)
		F.Intrinsic.Control.End
	F.Intrinsic.Control.EndIf
F.Intrinsic.Control.Next(V.local.i)

======No Step Example, Step Value Assumed as 1======
V.Local.i.Declare(Long)
V.Local.sRetval.Declare(String)
V.Local.sPath.Declare(String)
V.Local.sRetarray.Declare(String)
f.Intrinsic.String.Build("{0}\*.*",v.Caller.ProgramsDir,v.Local.sPath)
F.Intrinsic.File.GetFileList(V.Local.sPath,Variable.Local.sRetval)
F.Intrinsic.String.Split(V.Local.sRetval,":",V.Local.sRetarray)
F.Intrinsic.Control.For(V.local.i,V.local.sRetArray.Lbound,V.local.sRetArray.Ubound)
	F.Intrinsic.UI.Msgbox(V.Local.sRetarray(V.Local.i))
	F.Intrinsic.Control.If(V.Local.i,=,10)
		F.Intrinsic.Control.End
	F.Intrinsic.Control.EndIf
F.Intrinsic.Control.Next(V.local.i)

======No Start and Step Example, Start Value Assumed as 0, Step Value Assumed as 1======
V.Local.i.Declare(Long)
V.Local.sRetval.Declare(String)
V.Local.sPath.Declare(String)
V.Local.sRetarray.Declare(String)
f.Intrinsic.String.Build("{0}\*.*",v.Caller.ProgramsDir,v.Local.sPath)
F.Intrinsic.File.GetFileList(V.Local.sPath,Variable.Local.sRetval)
F.Intrinsic.String.Split(V.Local.sRetval,":",V.Local.sRetarray)
F.Intrinsic.Control.For(V.local.i,V.local.sRetArray.Ubound)
	F.Intrinsic.UI.Msgbox(V.Local.sRetarray(V.Local.i))
	F.Intrinsic.Control.If(V.Local.i,=,10)
		F.Intrinsic.Control.End
	F.Intrinsic.Control.EndIf
F.Intrinsic.Control.Next(V.local.i)

Remarks

  • In the above example the FOR function will go from 0 to 10 by 2’s.
  • Do not enter 0 for the Step Number


Function.Intrinsic.Control.AddEventHandler

Creates an event for a comm control

Syntax

Function.intrinsic.Control.AddEventHandler(Event Name,Called Sub Name)

Arguments

Event Name

Name of the event used within the project

Called Sub Name

String name of subroutine within current script

Example

Function.Intrinsic.Control.AddEventHandler(“CommOnComm”, “Call_Comm”)

Remarks

  • For a project that uses the communication serial syntax “CommOnComm” should always be the Event Name. This will be used in the Sub Main


Function.Intrinsic.Control.AndIf

Function.Intrinsic.Control.AndIf

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Control.BLockEvents

Prevents event handlers from being called

Syntax

Function.Intrinsic.Control.BlockEvents

Arguments

Example

Remarks

  • This command does not actually stop screen and object events from firing, it only keeps the event handlers from being called.
  • This command is global in scope and applies to ALL program elements.
  • Please note that this command affects PreCallerExit and PostCallerExit.


Function.Intrinsic.Control.Callsub

Calls a sub routine designed in the GAB Editor, and Exits a sub that has been called

Syntax

Function.Intrinsic.Control.CallSub (Subname) Function.Intrinsic.Control.ExitSub (SubName)

Arguments

Subname

The name of the subroutine created in GAB

Example

Function.Intrinsic.Control.CallSub (GetPhoneNo) Function.Intrinsic.Control.ExitSub (GetPhoneNo)

Remarks

The above example calls the sub routine GetPhoneNo. The exitsub allows the user to exit a sub routine that has been called.


Function.Intrinsic.Control.Case

Function.Intrinsic.Control.Case

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Control.CaseAny

Function.Intrinsic.Control.CaseAny

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Control.CaseElse

Function.Intrinsic.Control.CaseElse

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Control.CaseRange

Function.Intrinsic.Control.CaseRange

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Control.Catch

If an exception is raised within a Try block, and no CatchWhen statements within a Try block evaluate to true, the code below Catch will execute.

Syntax

Function.Intrinsic.Control.Catch

Arguments

Example

Function.Intrinsic.Control.Catch

Remarks


Function.Intrinsic.Control.CatchWhen

CatchWhen evaluates an exception thrown within a Try block. If the thrown error matches the one specified in the function's parameter, the code below the CatchWhen will execute. If the evaluation is false, GAB will continue to the next Catch/CatchWhen.

Syntax

Function.Intrinsic.Control.CatchWhen(error number)

Arguments

Example

Function.Intrinsic.Control.CatchWhen(error number)

Remarks


Function.Intrinsic.Control.ClearErrors

This will clear out errors that have been “caught” by the Sub Routine.

Syntax

Function.Intrinsic.Control.ClearErrors

Arguments

Example

Program.Sub.Main.Start
function.intrinsic.control.errorresume(true)
 function.intrinsic.control.clearerrors
Function.Intrinsic.File.CopyFile("L:\Global\plugins\LDB.exe","L:\Global\plugins\LDBCopy.exe")
function.intrinsic.control.if(variable.ambient.errornumber,<>,0)
function.intrinsic.ui.msgbox("Copy Failed")
function.intrinsic.ui.msgbox(variable.ambient.errordescription)
function.intrinsic.control.endif   
function.intrinsic.control.clearerrors
 function.intrinsic.control.errorresume(false)
    'do other stuff
Program.Sub.Main.End 

Remarks


Function.Intrinsic.Control.Do

Creates a loop to process data

Syntax

Function.Intrinsic.Control.Do

Function.Intrinsic.Control.ExitDo

Arguments

None

Example

Variable.local.stext.declare(string)
Function.odbc.connection!testCon.openconnection(“TEST”, “Admin”, “”)
Function.odbc.connection!testCon.openrecordsetro(“testrst”, “propmeth”)
Function.intrinsic.control.Do
Function.intrinsic.control.if(variable.odbc.testCon!testrst.eof,=,True)
Function.intrinsic.control.exitdo
Function.intrinsic.control.endif
Function.intrinsic.string.cancateol(variable.local.stext, variable.local.stext)
Function.intrinsic.string.cancat(variable.local.stext, “Field PropMeth: “, variable.odbc.testCon!testrst.fieldval!propmeth, variable.local.stext)
Function.odbc.testCon!testrst.movenext
Function.intrinsic.control.loop
Function.odbc.testCon!testrst.close
Function.odbc.connection!testCon.close
Main.form1.txtData.text(variable.local.stext) 

Remarks

  • Can be used to cycle through a recordset and retrieve data from the database. Also used in conjunction with recordset movenext function.


Function.Intrinsic.Control.DoEvents

Allows user to speed up processing time

Syntax

Function.Intrinsic.Control.DoEvents

Arguments

Example

Remarks


Function.Intrinsic.Control.DoUntil

Loop that continues until…

If you aren't sure how many times you need to loop (ex. traversing a set of database records), you can use a DO loop.

Below is a pseudo-code example:

do

act on the next piece of data

if some condition is met, exit the loop

loop

Loops, like conditional statements, can be nested for multiple levels of looping. A common example of this may be processing all of the days in a month, for each month of a year, for all of your workcenters individually – that would be three nested loops.

The alternate syntax of this function allows for multiple evaluations to be chained within a single DoUntil statement. The logical operator (parameter #4) allows either AND or OR to be specified, which applies to all of the evaluations within the DoUntil statement. If AND is specified, the DoUntil is only TRUE if all of the individual evaluations are TRUE. If OR is specified, the DoUntil is TRUE if any of the individual evaluations are TRUE.

Syntax

Function.Intrinsic.Control.DoUntil(1st Argument, Evaluation Criteria, 2nd Arguments) or Function.Intrinsic.Control.DoUntil(Boolean In) or Function.Intrinsic.Control.DoUntil(left side argument, evaluation criteria, right side argument, logical operator, left side argument, evaluation criteria, right side argument, ..., left side argument, evaluation criteria, right side argument)

Arguments

1st Argument

Recordset used

Evaluation Criteria

such as =,<, >, or <>

2nd Argument

True or False

Example

Function.Intrinsic.Control.DoUntil(variable.odbc.testCon!testrst.eof, = , True)
Function.Intrinsic.Control.ExitDo
‘some functionality or processing code would go here
Function.Intrinsic.Contol.Loop

Remarks

  • The alternate syntax of this function allows for the single argument evaluation of a Boolean variable. It is the equivalent performing the following: Function.Intrinsic.Control.If(v.lo.booleanvariable,"=",True).


Function.Intrinsic.Control.Else

Function.Intrinsic.Control.Else

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Control.ElseIf

Function.Intrinsic.Control.ElseIf

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Control.End

Ends program see remarks for location

Syntax

Function.Intrinsic.Control.End

Arguments

Example

Remarks

  • Ends a program, it is used in the Unload Event for a form, or can be used in a different subroutine in the program.


Function.Intrinsic.Control.EndIf

Function.Intrinsic.Control.EndIf

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Control.EndSelect

Function.Intrinsic.Control.EndSelect

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Control.EndTry

This function compalted a Try block within GAB. This will be located after all Catch clauses, and after Finally (if present).

Syntax

Function.Intrinsic.Control.EndTry

Arguments

Example

Function.Intrinsic.Control.EndTry

Remarks


Function.Intrinsic.Control.ErrorResume

Syntax

Function.Intrinsic.Control.ErrorResume(Boolean)

Arguments

Boolean

Variable or Value of Boolean Type

Example

Program.Sub.Main.Start
function.intrinsic.control.errorresume(true)
function.intrinsic.control.clearerrors
Function.Intrinsic.File.CopyFile("L:\Global\plugins\LDB.exe","L:\Global\plugins\LDBCopy.exe")
function.intrinsic.control.if(variable.ambient.errornumber,<>,0)
function.intrinsic.ui.msgbox("Copy Failed")
function.intrinsic.ui.msgbox(variable.ambient.errordescription)
function.intrinsic.control.endif   
function.intrinsic.control.clearerrors
function.intrinsic.control.errorresume(false)
'do other stuff
Program.Sub.Main.End

Remarks

True will cause the GAB program error messages to be passed to the variables variable.ambient.errornumber and variable.ambient.errordescription. The code will resume after the error. When using the ErrorResume in a subroutine it is good to clear the errors before starting, to do this use Function.Intrinsic.Control.ClearErrors. An if statement can be used to verify that an error has/has not occurred.


Function.Intrinsic.Control.ExitDo

Function.Intrinsic.Control.ExitDo

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Control.ExitFor

Function.Intrinsic.Control.ExitFor

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Control.ExitSub

Function.Intrinsic.Control.ExitSub

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Control.ExitTry

This function immediately exits processing within a Try block, skipping everything else before EndTry, including Finally.

Syntax

Function.Intrinsic.Control.ExitTry

Arguments

Example

Function.Intrinsic.Control.ExitTry

Remarks


Function.Intrinsic.Control.Finally

This statement identifies code within a Try block that will execute upon completion of the main Try code and any Catch/CatchWhen code. Finally is optional, but should be located after any Catch/CatchWhen statements.

Syntax

Function.Intrinsic.Control.Finally

Arguments

Example

Function.Intrinsic.Control.Finally

Remarks


Function.Intrinsic.Control.For

Function.Intrinsic.Control.For

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Control.Goto

Syntax

Function.Intrinsic.Control.GOTO (Label Name)

Arguments

Label Name

Name of the Control

Example

Function.Intrinsic.Control.GOTO (gui.Form1..lblLabel1)

Remarks


Function.Intrinsic.Control.If

Selection set to process data, use psuedo-code (Native Language such as English) to describe the process

If something is true

then do this.....
and this...
and this

If something else is true

then do this.....
and this...
and this

If none of the previous conditions were true

then do this.....
and this...
and this

Syntax

Function.Intrinsic.Control.If(1st Argument, Evaluation criteria, 2nd Argument) or

Function.Intrinsic.Control.If(Boolean In)

Function.Intrinsic.Control.AndIf(1st Argument, Evaluation criteria, 2nd Argument)

Function.Intrinsic.Control.ElseIf(1st Argument,Evaluation criteria, 2nd Argument)

Function.Intrinsic.Control.Else

Function.Intrinsic.Control.EndIf

Function.Intrinsic.Control.IIf(1st Argument, Evaluation criteria, 2nd Argument, True return value, False return value, return variable)

Arguments

1st Arg

Recordset used.EOF

Evaluation Operator

“=”, “<”, “>”, “<>”,”IS”, “!=”, “=!”, “NOT”, “>=”, “<=”, “=>”, “=<”

2nd Arg

True or False

Example

#1

Variable.local.stext.declare(string)

Function.odbc.connection!testCon.openconnection(“TEST”, “Admin”, “”)

Function.odbc.connection!testCon.openrecordsetro(“testrst”, “propmeth”)

Function.intrinsic.control.Do

Function.intrinsic.control.if(variable.odbc.testCon!testrst.eof,=,True)

Function.intrinsic.control.exitdo

Function.intrinsic.control.endif

Function.intrinsic.string.cancateol(variable.local.stext, variable.local.stext)

Function.intrinsic.string.cancat(variable.local.stext, “Field PropMeth: “, variable.odbc.testCon!testrst.fieldval!propmeth, variable.local.stext)

Function.odbc.testCon!testrst.movenext

Function.intrinsic.control.loop

Function.odbc.testCon!testrst.close

Function.odbc.connection!testCon.close

Main.form1.txtData.text(variable.local.stext)

#2

Program.Sub.Main.Start

Function.Intrinsic.Control.If(2,=,0)

Function.Intrinsic.Control.AndIf(2,=,1)

Function.Intrinsic.Ui.Msgbox("IF case/AndIf")

Function.Intrinsic.Control.Elseif(1,=,1)

Function.Intrinsic.Ui.Msgbox("ELSEIF case")

Function.Intrinsic.Control.Else

Function.Intrinsic.Ui.Msgbox("ELSE case")

Function.Intrinsic.Control.Endif

Function.Intrinsic.Ui.Msgbox("The end")

Program.Sub.Main.End

#3

variable.local.bElse.set(True)

function.intrinsic.control.if(variable.local.a,=,"something")

variable.local.bElse.set(False)

'if condition code goes here

function.intrinsic.control.elseif(variable.local.a,=,"something else")

variable.local.bElse.set(False)

'elseif condition code goes here

function.intrinsic.control.endif

function.intrinsic.control.if(variable.local.bElse,=,True)

'else code goes here

function.intrinsic.control.endif

#4

Function.Intrinsic.Control.IIf(v.lo.iScrap,>=,v.lo.iScrapCap,True,False,v.lo.bWarn)

is the same as:

Function.Intrinsic.Control.If(v.lo.iScrap,>=,v.lo.iScrapCap)

Variable.local.bWarn.set(true)

Function.Intrinsic.Control.Else

Variable.local.bWarn.set(false)

Function.Intrinsic.Control.EndIf 

Remarks

  • Operators work for If statements and Do loops

“=” Equal To

“<” Less Than

“>” Greater Than

“<>” Not equal to

”IS” Is equal to

“!=” Not Equal

“=!” Not Equal

“NOT” Not equal to

“>=” Greater than or equal to

“<=” Less than or equal to

“=>”, Equal to or greater than

“=<” Equal to or less than

  • Remember to close the recordsets and the connection at the end of the sub. The endif will come before the evaluation of within the statement.
  • The alternate syntax for the If command allows for the single argument evaluation of a Boolean variable. It is the equivalent performing the following: Function.Intrinsic.Control.If(v.lo.booleanvariable,"=",True).


Function.Intrinsic.Control.IIf

This function performs an inline IF.

Syntax

Function.Intrinsic.Control.IIf(1st argument, Evaluation criteria, 2nd argument, true return value, false return value, return variable)

Arguments

1st argument
Evaluation criteria
2nd argument
true return value
false return value
return variable

Examples

Remarks


Function.Intrinsic.Control.IsinCallStack

This function returns a long integer indicating the number of active call stack entries for the specified subroutine.

Syntax

Function.Intrinsic.Control.IsInCallstack(sub name, long return)

Arguments

Sub Name

Name of Subroutine

Long Return

Returned long with data

Example

V.Local.iRet.Declare(Long)

Function.Intrinsic.Control.IsInCallStack(cmdLoad_Click,V.Local.iRet)

F.Intrinsic.Control.If(V.Local.iRet,>,1)

F.Intrinsic.Control.ExitSub

F.Intrinsic.Control.EndIf

Remarks


Function.Intrinsic.Control.IsInCallstack

This function returns a long integer indicating the number of active call stack entries for the specified subroutine.

Syntax

Function.Intrinsic.Control.IsInCallstack(sub name, long return)

Arguments

sub name
long return

Examples

Remarks


Function.Intrinsic.Control.Label

Function.Intrinsic.Control.Label

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Control.Loop

Function.Intrinsic.Control.Loop

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Control.Next

Function.Intrinsic.Control.Next

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Control.RaiseError

This command can be used to raise user-defined errors within GAB programs. Valid error numbers are from 1 to 999, and they translate to run-time errors 999,001 to 999,999.

Syntax

Function.Intrinsic.Control.RaiseError(number, text)

Arguments

Example

Remarks


Function.Intrinsic.Control.SelectCase

Select case allows the user to do different processes according to the selection

Syntax

Function.Intrinsic.Control.SelectCase(Selection)

Function.Intrinsic.Control.Case(Variable)

Function.Intrinsic.Control.CaseElse

Function.Intrinsic.Control.EndSelect

Arguments

Selection

Group that can be broken down into cases

Variable

String or Number representing the selection

Example

Program.sub.main.start

Variable.local.x.declare(long)

Variable.local.x.set(21)

Function.Intrinsic.Control.SelectCase(Variable.local.x)

Function.Intrinsic.Control.Case(10)

Function.Intrinsic.UI.MsgBox(“Ten”)

Function.Intrinsic.Control.Case(20)

Function.Intrinsic.UI.MsgBox(“Twenty”)

Function.Intrinsic.Control.Case(30)

Function.Intrinsic.UI.MsgBox(“Thirty”)

Function.Intrinsic.Control.CaseElse

Function.Intrinsic.UI.MsgBox(“Something else”)

Function.Intrinsic.Control.EndSelect

Program.sub.main.end

Remarks


Function.Intrinsic.Control.SetErrorHandler

Syntax

Function.Intrinsic.Control.SetErrorHandler(HandleName)

Arguments

HandleName

String

Example

'naming the Error Handle Label

Function.Intrinsic.Control.SetErrorHandler("ErrorHandle")

'this clears out previous errors that might still be stored

Function.Intrinsic.Control.ClearErrors

'this should give a division by zero error

Function.Intrinsic.Math.Div(10,0,V.Local.iRet)

'need to exit sub if there are no errors

Function.Intrinsic.Control.ExitSub

'when there is an error then the program will jump to this label due to getting an error

Function.Intrinsic.Control.Label("ErrorHandle")

'checking to make sure that the error isn't normal processing

Function.Intrinsic.Control.If(V.Ambient.ErrorNumber,<>,0)

  'this displays the error description based on the error number

  Function.Intrinsic.UI.Msgbox(V.Ambient.ErrorDescription)

Function.Intrinsic.Control.endif 

Remarks

  • This should be used with Function.Intrinsic.Control.Label(HandleName)


Function.Intrinsic.Control.SetVBSErrRepLev

Turns the VBS Error Log on or off.

Syntax

Function.Intrinsic.Control.SetVBSErrRepLev(Long)

Arguments

Long

1 is the default, 0 is quiet

Example

Function.Intrinsic.Control.SetVBSErrRepLev(1)

Remarks


Function.Intrinsic.Control.Try

This function starts a Try block within GAB, which should contain a Catch, and must be terminated with EndTry. Try blocks may also contain CatchWhen and Finally.

Syntax

Function.Intrinsic.Control.Try

Arguments

Example

Function.Intrinsic.Control.Try

Remarks


Function.Intrinsic.Control.UnBlockEvents

Syntax

Function.Intrinsic.Control.UnBlockEvents

Arguments

Example

Remarks

  • This command does not actually stop screen and object events from firing, it only keeps the event handlers from being called.
  • This command is global in scope and applies to ALL program elements.
  • Please note that this command affects PreCallerExit and PostCallerExit.


Function.Intrinsic.Date.BeginningOfMonth

Returns the beginning of the month based on a date passed

Syntax

Function.Intrinsic.Date.BeginningOfMonth(datePassed, DateReturned)

Arguments

DatePassed

This is a date from anytime in a month

DateReturned

This is the first day of the month returned

Example

Function.Intrinsic.date.BeginningOfMonth(“08/13/2007”,variable.local.datRet)
Returns “08/01/2007”

Remarks


Function.Intrinsic.Date.BeginningOfWeek

Returns the beginning of the week based on a date passed

Syntax

Function.Intrinsic.Date.BeginningOfWeek(Date, Date Return)

Arguments

None

Example

Function.Intrinsic.Date.BeginningOfWeek(“08/13/2007”,variable.local.datRet)
'Returns “08/12/2007”

Remarks

  • Per NLS, the beginning of the week is Sunday.


Function.Intrinsic.Date.CombineDateTime

This function returns a date type variable that holds the composite value of the passed date and time values.  This function can be helpful in instances where time values read from the database append the current date; first you would remove the bogus date component using Function.Intrinsic.Date.TimeComp, then use CombineDateTime to join the proper date component (typically from another field in the table or view).

Syntax

Function.Intrinsic.Date.CombineDateTime(date component, time component, date/time return)

Arguments

date component
time component
date/time return

Examples

Remarks


Function.Intrinsic.Date.ConvertDString

Converts a string value to a date value.

Syntax

Function.Intrinsic.Date.ConvertDString (passed string, format Designator, date return)

Arguments

Passed Sting

String value passed “01/05/2007”

Format Designator

String value to designate the format of the date returned

Return Variable

Date/Time that is returned

Example

Function.Intrinsic.Date.ConvertDString(“010107”,”MM/DD/YYYY”, variable.local.rDate)
Returns a date 01/01/2007
Function.Intrinsic.Date.ConvertDString(“010107”,”HH:NN.SS”, variable.local.rtime)
Returns a time “01:01.07”

Remarks

  • Format Designators for date:

“MMDDYY”, “MM/DD/YY”, “MMDDYYYY”, “MM/DD/YYYY”, “YYMMDD”, “YY/MM/DD”, “YYYYMMDD”, “YYYY/MM/DD”

  • Format Designators for time:

“HHNN”, “HH:NN”, “HHNNSS”, “HH:NN.SS”


Function.Intrinsic.Date.ConvertTString

Converts a string value to a date/time value.

Syntax

Function.Intrinsic.Date.ConvertTString (passed string, format Designator, date return)

Arguments

Passed Sting

String value passed “15:30”

Format Designator

String value to designate the format of the date returned

Return Variable

Date/Time that is returned

Example

Function.Intrinsic.Date.ConvertDString(“1530”,”HH:NN”, variable.local.rTime)
Returns a date 3:30 PM 

Remarks

  • Format Designators for time:

“HHNN”, “HH:NN”, “HHNNSS”, “HH:NN.SS”


Function.Intrinsic.Date.DateAdd

Dateadd function will add days, months, year, hour, or minute to a given date.

Syntax

Function.Intrinsic.Date.Dateadd (Interval, Value, Date, Return Variable)

Arguments

Interval

“D” for Day, “M” for month, “YYYY” for year, “H” for hour, and “N” for minute

Value

The amount of Interval you want to add

Date

The date to add Interval

Return Variable

Date/Time that is returned

Example

Function.Intrinsic.Date.Dateadd (D, -23, variable.local.date, variable.local.dateDate)
Returns a date that is 23 days prior to the current date

Remarks


Function.Intrinsic.Date.DateAddWorkDays

This function returns a date, given a start date and the number of workdays to add. The number of days to add is not inclusive of the start date. Monday through Friday are considered to be workdays, unless a mask is specified.

Syntax

Function.Intrinsic.Date.DateAddWorkdays(start date, number of days, date return) or

Function.Intrinsic.Date.DateAddWorkdays(start date, number of days, workday mask, date return)

Arguments

The mask is a long integer that is made up of the following components:

1 - Sunday

2 - Monday

4 - Tuesday

8 - Wednesday

16 - Thursday

32 - Friday

64 - Saturday

Example

Remarks

  • If no mask value is specified, 62 is used. Monday through Thursday would be represented with a value of 30.


Function.Intrinsic.Date.DateComp

Compares dates

Syntax

Function.Intrinsic.Date.DateComp(DateTime, Date Return)

Arguments

DateTime

The datetime

Date Return Variable

Date component

Example

Function.Intrinsic.Date.DateComp(variable.local.date, variable.local.dateRet)

Remarks


Function.Intrinsic.Date.DateDiff

Finds the difference between two dates based on the interval given.

Syntax

FUNCTION.INTRINSIC.DATE.DATEDIFF (INTERVAL, DATE1, DATE2, LONG RETURN)

Arguments

Interval
  • "YYYY" = Year
  • "Q" = Quarter
  • "M" = Month
  • "Y" = Day of Year
  • "D" = Day
  • "W" = Weekday
  • "WW" = Week
  • "H" = Hour
  • "N" = Minute
  • "S" = Second
Date1

First Date

Date2

Second Date

Long Return

Example

Function.Intrinsic.Date.DateDiff (“d”, “1/01/2007”, “2/28/2007”, variable.local.datenum) 

Remarks

You can use the DateDiff function to determine how many specified time intervals exist between two dates. For example, you might use DateDiff to calculate the number of days between two dates, or the number of weeks between today and the end of the year.

To calculate the number of days between date1 and date2, you can use either Day of year ("y") or Day ("d"). When interval is Weekday ("w"), DateDiff returns the number of weeks between the two dates. If date1 falls on a Monday, DateDiff counts the number of Mondays until date2. It counts date2 but not date1. If interval is Week ("ww"), however, the DateDiff function returns the number of calendar weeks between the two dates. It counts the number of Sundays between date1 and date2. DateDiff counts date2 if it falls on a Sunday; but it doesn't count date1, even if it does fall on a Sunday.

If date1 refers to a later point in time than date2, the DateDiff function returns a negative number.

When comparing December 31 to January 1 of the immediately succeeding year, DateDiff for Year ("yyyy") returns 1 even though only a day has elapsed.


Function.Intrinsic.Date.DateSerial

DateSerial combines information passed into a date.

Syntax

Function.Intrinsic.Date.DateSerial(YEAR, MONTH, DAY, DATE RETURN)

Arguments

Year

Year for the date

Month

Month for the date

Day

Day for the date

Date Return

Date type variable

Example

Function.Intrinsic.Date.DateSerial (2007, 01, 01, variable.local.dateret)
Returns the date based on the information passed
Variable.local.dateret = “01/01/2007” 

Remarks


Function.Intrinsic.Date.DatesFromGLPeriod

This function returns a string containing the period start and end dates, delimited with a *!*, that corresponds to the specified period and start year. If the passed period and year are not contained within the periods defined within the GL calendar, ***NONE*** will be in the string return.

Syntax

Function.Intrinsic.Date.DatesFromGLPeriod(period, year, string return)

Arguments

period
year
string return

Examples

Remarks


Function.Intrinsic.Date.DateSubtractWorkDays

This function returns a date, given a start date and the number of workdays to subtract. The number of days to subtract is not inclusive of the start date. Monday through Friday are considered to be workdays, unless a mask is specified.

Syntax

Function.Intrinsic.Date.DateSubtractWorkdays(start date, number of days, date return) or

Function.Intrinsic.Date.DateSubtractWorkdays(start date, number of days, workday mask, date return)

Arguments

The mask is a long integer that is made up of the following components:

1 - Sunday

2 - Monday

4 - Tuesday

8 - Wednesday

16 - Thursday

32 - Friday

64 - Saturday

Example

Remarks

  • If no mask value is specified, 62 is used. Monday through Thursday would be represented with a value of 30.


Function.Intrinsic.Date.DateSubtractWorkdays

This function returns a date, given a start date and the number of workdays to subtract.  The number of days to subtract is not inclusive of the start date.  Monday through Friday are considered to be workdays, unless a mask is specified.  The mask is a long integer that is made up of the following components: 1 - Sunday 2 - Monday 4 - Tuesday 8 - Wednesday 16 - Thursday 32 - Friday 64 - Saturday If no mask value is specified, 62 is used.  Monday through Thursday would be represented with a value of 30.

Syntax

Function.Intrinsic.Date.DateSubtractWorkdays(start date, number of days, date return)

Function.Intrinsic.Date.DateSubtractWorkdays(start date, number of days, workday mask, date return)

Arguments

start date
number of days
workday mask
date return

Examples

Remarks


Function.Intrinsic.Date.DateTimeSerial

Builds a date variable by separate components

Syntax

Function.Intrinsic.Date.DATETIMESERIAL(Year, Month, Day, Hour, Minute, Second, Return Variable)

Arguments

Year

Long (100 – 9999)

Month

Long (1 – 12)

Day

Long (1 – 31)

Hour

Long (0 – 23)

Minute

Long (0 – 59)

Second

Long (0 – 59)

Return Variable

Date Type Variable

Example

Remarks


Function.Intrinsic.Date.Day

Returns the day of the month from a passed date

Syntax

Function.Intrinsic.Date.Day (DATE, LONG RETURN)

Arguments

Date

Passed date

Long Return

Return the day number

Example

Function.Intrinsic.Date.Day (“11/12/2006”, variable.local.lngDay)
Returns 12 

Remarks


Function.Intrinsic.Date.EndOfMonth

Returns the end of the month based on a date passed

Syntax

Function.Intrinsic.Date.EndOfMonth(datePassed, DateReturned)

Arguments

DatePassed

This is a date from anytime in a month

DateReturned

This is the last day of the month returned

Example

Function.Intrinsic.Date.EndOfMonth(“08/13/2007”,variable.local.datRet)
Returns “08/31/2007” 

Remarks


Function.Intrinsic.Date.EndOfWeek

Returns the end of the week based on a date passed

Syntax

Function.Intrinsic.Date.EndOfWeek(date)

Arguments

Example

Remarks


Function.Intrinsic.Date.GLPeriodFromDate

This function returns a string containing the period and start year, delimited with a *!*, that corresponds to the specified date. If the passed date is not contained within the periods defined within the GL calendar, ***NONE*** will be in the string return.

Syntax

Function.Intrinsic.Date.GLPeriodFromDate(date, string return)

Arguments

date
string return

Examples

Remarks


Function.Intrinsic.Date.GLPeriodLookup

Syntax

Function.Intrinsic.Date.GLPeriodLookup(date in [date], string return [string])

Arguments

date in

date

string return

string

Examples

Remarks


Function.Intrinsic.Date.Hour

Returns the hour from the passed date

Syntax

Function.Intrinsic.Date.Hour (DATE, LONG RETURN)

Arguments

Date

Passed date

Long Return

Return the hour number

Example

Function.Intrinsic.Date.Hour (“11/12/2006 1:30:00 PM”, variable.local.lngHour)
Returns 1 

Remarks


Function.Intrinsic.Date.HoursMinutesSecondsToDecimal

This function converts the components of hours, minutes, and seconds to a floating point value indicating the decimal number of hours.

Syntax

Function.Intrinsic.Date.HoursMinutesSecondsToDecimal(hours, minutes, seconds, single return)

Arguments

hours
minutes
seconds
single return

Examples

Remarks


Function.Intrinsic.Date.IsDate

Verifies if a passed value or variable is a date in type

Syntax

Function.Intrinsic.Date.IsDate(String Date, Boolean Return)

Arguments

String Date

Date as a string

Boolean Return

Tells whether the data is a true date

Example

Function.Intrinsic.Date.IsDate(“08/06/2009”, variable.local.bDate)
Returns a True 

Remarks


Function.Intrinsic.Date.IsDST

This function returns a boolean indicating if daylight savings is in effect.

Syntax

Function.Intrinsic.Date.IsDST(bool return)

Arguments

bool return)

Examples

Remarks


Function.Intrinsic.Date.Minute

Returns the minute from the passed date

Syntax

Function.Intrinsic.Date.Minute (DATE, LONG RETURN)

Arguments

Date

Passed date

Long Return

Return the minute number

Example

Function.Intrinsic.Date.Minute (“11/12/2006 12:35:00 AM”, variable.local.lngMin)
Returns 35 

Remarks


Function.Intrinsic.Date.Month

Returns the month from a passed date

Syntax

Function.Intrinsic.Date.Month (DATE, LONG RETURN)

Arguments

Date

Passed date

Long Return

Return the month number

Example

Function.Intrinsic.Date.Month (“11/12/2006”, variable.local.lngMonth)
Returns 11 

Remarks


Function.Intrinsic.Date.Second

Returns the seconds from a passed date/time

Syntax

Function.Intrinsic.Date.Second (DATE, LONG RETURN)

Arguments

Date

Passed date

Long Return

Return the se TimeComp cond number

Example

Function.Intrinsic.Date.Second (“11/12/2006 10:25:45 AM”, variable.local.lngSec)
Returns 45

Remarks


Function.Intrinsic.Date.Timecomp

Returns the day of the month

Syntax

Function.Intrinsic.Date.TimeComp (DateTime, Time Return)

Arguments

DateTime

Passed datetime

Time Return

Return the time component

Example

Function.Intrinsic.Date.TimeComp (“11/12/2006 1:24:00 PM”, variable.local.lngDComp)
Returns 1:24:00 PM 

Remarks


Function.Intrinsic.Date.TimeSerial

Syntax

Function.Intrinsic.Date.TimeSerial(hours, minutes, date return)

Arguments

hours
minutes
date return

Examples

Remarks


Function.Intrinsic.Date.TimezoneName

This function returns a string containing the localized time zone name.

Syntax

Function.Intrinsic.Date.TimeZoneName(string return)

Arguments

Example

Remarks

  • For time zones that observe daylight savings, there will be two different time zone names in effect in the course of a year. If a program needs to deterministically act on the time zone information, it is probably a better idea to use UTCOffset.


Function.Intrinsic.Date.TimeZoneName

This function returns a string containing the localized time zone name. Note: For time zones that observe daylight savings, there will be two different time zone names in effect in the course of a year.  If a program needs to deterministically act on the time zone information, it is probably a better idea to use UTCOffset.

Syntax

Function.Intrinsic.Date.TimeZoneName(string return)

Arguments

string return)

Examples

Remarks


Function.Intrinsic.Date.UTCOffset

This function returns the local machine's hour offset from UTC (formerly GMT). The DST parameter is a boolean indicating if daylight savings should be included or excluded in the offset.

Syntax

Function.Intrinsic.Date.UTCoffset(long return) or

Function.Intrinsic.Date.UTCoffset(DST, long return)

Arguments

Example

Remarks

  • The returned value will be negative to the west of the international date line.
  • The returned value is a composite of the time zone and the regional daylight savings condition.


Function.Intrinsic.Date.UTCoffset

This function returns the local machine's hour offset from UTC (formerly GMT).  The DST parameter is a boolean indicating if daylight savings should be included or excluded in the offset. Note: The returned value will be negative to the west of the international date line.

Syntax

Function.Intrinsic.Date.UTCoffset(DST, long return)

Arguments

DST
long return)

Examples

Remarks


Function.Intrinsic.Date.WeekDay

Gives the day of the week based on the passed date

Syntax

Function.Intrinsic.Date.Weekday (Date, Long Return)

Arguments

Date

Passed date

Long Return

Return the weekday number

Example

Function.Intrinsic.Date.Weekday (“12/17/2006”, variable.local.lngWD)
Returns 1 

Remarks


Function.Intrinsic.Date.WorkDaysBetweenDates

This function returns the number of workdays between two specified dates, inclusive. Monday through Friday are considered to be workdays, unless a mask is specified.

Syntax

Function.Intrinsic.Date.WorkdaysBetweenDates(start date, end date, long return) or

Function.Intrinsic.Date.WorkdaysBetweenDates(start date, end date, workday mask, long return)

Arguments

The mask is a long integer that is made up of the following components: 1 - Sunday

2 - Monday

4 - Tuesday

8 - Wednesday

16 - Thursday

32 - Friday

64 - Saturday

Example

Remarks

  • If no mask value is specified, 62 is used. Monday through Thursday would be represented with a value of 30.


Function.Intrinsic.Date.WorkDaysRemaining

This function calculates the number of workdays (Monday through Friday) remaining in a month. In the two parameter syntax, you can pass a starting date, otherwise the current date is assumed.

Syntax

Function.Intrinsic.Date.WorkdaysRemaining(long return) or

Function.Intrinsic.Date.WorkdaysRemaining(date, long ret)

Arguments

Example

Remarks

  • The passed (or current day), is counted toward the returned total.


Function.Intrinsic.Date.Year

Returns the year based on the passed date

Syntax

Function.Intrinsic.Date.Year (DATE, LONG RETURN)

Arguments

Date

Passed date

Date Return

Return the year number

Example

Function.Intrinsic.Date.Year (“11/12/2006”, variable.local.lngYear)
Returns 2006 

Remarks


Function.Intrinsic.Debug

Overview: Syntactical errors, logic errors, and unforeseen/unhandled conditions can debilitate a program. Debugging is the process by which these factors can be identified. The GAB Executor (OCTSRS.EXE) includes a step-wise debugger for analyzing the inner workings of Global Application Builder (GAB) programs.

Using the Debugger:

GAS programs are interpreted. As such, they evaluate and execute the lines of code at runtime, rather than at compile time. The debugger will let you watch the evaluation and execution of your code. The “Current Line” textbox displays the full text of the code line in the GAB execution engine. The parameters passed to the called function are listed in the “Individual Arguments” section. If the “Evaluate” checkbox is checked, argument variables or properties are evaluated to their underlying value.

The “Variable Watcher” section allows you to peruse the local, static, and global variable stacks. Variable arrays are shown fully expanded with all elements listed. Additionally, the passed and return variables are listed.

The “Recently Executed Lines” section displays the last 16 commands executed. The “Subroutine” column shows which subroutine the executed line was in. Since GAS programs allow the calling of subroutines, and are driven on an event model, visibility of the calling subroutine is useful. The column immediately to the right of the “Subroutine” column shows the line number of the executed line. This is useful when watching control structures, like conditional logic or loops.

When the “Step Execute” checkbox is checked, the GAB Debugger will only execute a single line of code. To proceed with the code execution, the user must click the “Run” button. To disable the step mode debugging, uncheck the box and click “Run”. Step execution breakpoints can be placed in the code at design time using PROGRAM.SUB.CONTROL.STOP; this is analogous to checking “Step Execute”, but will only work if the GAB Debugger is already running.

The “Exit” button can be used to terminate a running GAS program at any time.


Function.Intrinsic.Debug.BenchMarkModeEnable

Function.Intrinsic.Debug.BenchMarkModeEnable

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Debug.BenchmarkThreshold

This function allows the programmer to set the threshold, in milliseconds, that a command must culmulatively exceed in execution, to report a time using Function.Intrinsic.Debug.BenchmarkModeEnable.  The default value is 0 milliseconds.

Syntax

Function.Intrinsic.Debug.BenchmarkThreshold(long)

Arguments

long

Examples

Remarks


Function.Intrinsic.Debug.CallwrapperDebugDisable

Turns off log files when Function.Global.General.CallWrapperAsync or Function.Global.General.CallWrapperSync is invoked

Syntax

Function.Intrinsic.Debug.CallwrapperDebugDisable

Arguments

None

Examples

Remarks

None


Function.Intrinsic.Debug.CallwrapperDebugEnable

Turns on log files when Function.Global.General.CallWrapperAsync or Function.Global.General.CallWrapperSync is invoked

Syntax

Function.Intrinsic.Debug.CallwrapperDebugEnable

Arguments

None

Examples

Remarks

None


Function.Intrinsic.Debug.CallWrapperDebugEnableSilent

Function.Intrinsic.Debug.CallWrapperDebugEnableSilent

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Debug.DumpOutputHookFile

This will dump the hook file information into a file.

Syntax

Function.Intrinsic.Debug.DumpOutputHookfile

Arguments

None

Examples

Remarks

None


Function.Intrinsic.Debug.DumpVariableList

Writes the Variables used in the GAS program in a .debug file in the user’s Temp Directory

Syntax

Function.Intrinsic.Debug.DumpVariableList

Arguments

None

Examples

Remarks

  • Causes the Variables to be written to a file in the Temp Directory that looks like the following. Must be used with Function.Intrinsic.Debug.ToggleOutputListing


Function.Intrinsic.Debug.EnableLogging

Function.Intrinsic.Debug.EnableLogging

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Debug.InvokeDebugger

One can use either the Function.Intrinsic.Debug.InvokeDebugger syntax or GAB Debugger can be invoked by placing a blank file named CION.Do in the root of the C: drive

Syntax

Function.Intrinsic.Debug.InvokeDebugger

Arguments

None

Examples

Remarks

Causes the Debugger to run while the script is running


Function.Intrinsic.Debug.InvokeDebuggerInDebug

Function.Intrinsic.Debug.InvokeDebuggerInDebug

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Debug.OverrideGSSVersion

This function allows for the testing of future version GAB commands, with a current vesion installation of Global Shop.  Note: This affects internal version checking, and not the return value of Variable.Caller.Version

Syntax

Function.Intrinsic.Debug.OverrideGSSVersion(version)

Arguments

version

Examples

Remarks


Function.Intrinsic.Debug.Print

Syntax

Function.Intrinsic.Debug.Print(Arg0, ..., arg[i])

Arguments

Arg0
...
arg

i

Examples

Remarks


Function.Intrinsic.Debug.Resume

This function can be used in conjunction with Function.Intrinsic.Control.SetErrorHandler to resume a program's execution at the point the exception was generated, after the error handling routine has finished execution.

Syntax

Function.Intrinsic.Debug.Resume

Arguments

Examples

Remarks


Function.Intrinsic.Debug.SetErrorTimeout

This command will make GAB error dialogs dismiss themselves after the specified number of seconds. GAB error dialogs normally require

Syntax

Function.Intrinsic.Debug.SetErrorTimeout(seconds)

Arguments

seconds

Examples

Remarks


Function.Intrinsic.Debug.Setla

This function sets a GAB internal value for "last action". When multiple arguments are passed to this function, they are concatenated together. This value can be read using Variable.Ambient.LastAction. The last set value also displays in the GAB error dialog.

Syntax

Function.Intrinsic.Debug.SetLA(string or variable, ....)

Arguments

None

Example

Here is a script to show how to use the SetLA, the Last Action will also show in the GAB Error message if it is present.

V.Local.iCt.Declare(Long)
V.Local.sSQL.Declare(String)
V.Local.sText.Declare(String)
f.Intrinsic.Debug.setLA("open connection to Pervasive Database")
F.ODBC.Connection!con.OpenConnection(V.Ambient.PDSN,V.Ambient.PUser,V.Ambient.PPass)
f.Intrinsic.Debug.setLA("Opening the recordset for Inventory_MSTR for Product Line FG")
F.ODBC.Connection!con.OpenRecordsetRO("rst","Select * from Inventory_MSTR where Product_Line='FG' order by Part")
f.Intrinsic.Debug.setLA("loop through recordset until there are no more parts with the specified product line")
F.Intrinsic.Control.DoUntil(V.ODBC.con!rst.EOF,=,True)
f.Intrinsic.Debug.setLA("Part is ",V.ODBC.con!rst.FieldVal!Part)
F.Intrinsic.Math.Add(V.Local.iCt,1,V.Local.iCt)
F.ODBC.con!rst.MoveNext
F.Intrinsic.Control.Loop
f.Intrinsic.Debug.SetLA("Cycled through the Inventory Records to get the count of Parts for the FG Product Line")
F.Intrinsic.String.Concat("There were ",V.Local.iCt," number of parts for this product line",V.Local.sText)
F.Intrinsic.UI.Msgbox(V.Local.sText,"")
F.Intrinsic.UI.Msgbox(V.Ambient.lastAction) 

Remarks

  • Also, the error dialog has been changed to display the last value set with Function.Intrinsic.Debug.SetLA. This is pretty much the equivalent of sLast... you should use this in programs that do anything more complicated than just changing captions.
  • Calling this function will also write a line to the log file, if logging is enabled.


Function.Intrinsic.Debug.SetLevel

Sets the debug level

Syntax

Function.Intrinsic.Debug.SetLevel or

Function.Intrinsic.Debug.SetLevel(Level)

Arguments

Level

Long (0-100)

Example

Remarks

  • If no args are given, prompts the user to enter the debug level in an Input Box.


Function.Intrinsic.Debug.SetProgramDirectory

Syntax

Function.Intrinsic.Debug.SetProgramDirectory(Override Directory)

Arguments

Override Directory

String FQP

Example

Function.Intrinsic.Debug.SetProgramDirectory(“V:\PGM”)

Remarks

  • This is for use if you have a TEST server, or by Global Shop Employees for testing purposes. This should not be in scripts sent with Global Shop Signatures.
  • The WRUN and INSTALL directories are generated from this.


Function.Intrinsic.Debug.SetScriptVersion

Assigns a version to the program

Syntax

Function.Intrinsic.Debug.SETSCRIPTVERSION(Version)

Arguments

Version

String

Example

Remarks


Function.Intrinsic.Debug.ShowCallerInfo

Dumps information from the Global Shop Screen calling the GAB Script, showing the Screen Element ID’s and Values, plus heading information.

Syntax

Function.Intrinsic.Debug.ShowCallerInfo

Arguments

None

Examples

Remarks

  • Launches a screen to display information from the calling program listing hook number, calling program, screen id’s and associated values, etc. Clicking on Dump Listing button will send a version to users default printer.


Function.Intrinsic.Debug.StartLogging

Function.Intrinsic.Debug.StartLogging

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Debug.Stop

Syntax

Function.Intrinsic.Debug.Stop(left side argument 0, evaluation criteria 0, right side argument 0, logical operator, ..., left side argument n, evaluation criteria n, right side argument n)

Arguments

left side argument 0
evaluation criteria 0
right side argument 0
logical operator
...
left side argument n
evaluation criteria n
right side argument n

Examples

Remarks


Function.Intrinsic.Debug.TimerElapsed

TimerElapsed returns, in seconds, the duration that has passed since TimerStart was invoked.

Syntax

Function.Intrinsic.Debug.TimerElapsed(name, long ret)

Arguments

Example

Remarks

  • There is an intrinsic timer named PROGRAM.
  • This command is used in conjunction with Function.Intrinsic.Debug.TimerStart.


Function.Intrinsic.Debug.TimerElapsedTicks

Function.Intrinsic.Debug.TimerElapsedTicks

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Debug.TimerStart

TimerStart allows coders to put named, second-resolution performance timers in their programs.

Syntax

Function.Intrinsic.Debug.TimerStart(name)

Arguments

Example

Remarks

  • There is an intrinsic timer named PROGRAM.
  • Calling TimerStart with a new name creates the named timer. Calling TimerStart with an existing name, resets the timer.
  • This command is used in conjunction with Function.Intrinsic.Debug.TimerElapsed.


Function.Intrinsic.Debug.ToggleOutput

Syntax

Function.Intrinsic.Debug.ToggleOutput(Boolean)

Arguments

Boolean

True or False

Example

Function.Intrinisc.Debug.ToggleOutoput(True)

Remarks


Function.Intrinsic.Debug.ToggleOutputListing

Creates a .debug file in the Users Temp Directory.

Syntax

Function.Intrinsic.Debug.ToggleOutputListing

Arguments

None

Examples

Remarks

Can be used with Function.Intrinsic.Debug.DumpVariableList


Function.Intrinsic.Debug.WatchVariable

While a program is executing in Debug, this will pause execution when the variable being watched changes according to the settings a user gives

Syntax

Function.Intrinsic.Debug.WATCHVARIABLE(Fully Qualified Variable Name) or

Function.Intrinsic.Debug.WATCHVARIABLE(Fully Qualified Variable Name, Value)

Arguments

Fully Qualified Variable Name

String variable

Value

Value

Example

Remarks

  • If no Value is given, program execution will pause whenever the variable being watched changes. If a Value is given, program execution will pause every time the variable being watched hits the set Value.


Function.Intrinsic.File.Append2File

These functions append a passed string to an existing file. The NewLine variant adds a carriage return and line feed to the existing file contents before appending the passed string.

Syntax

Function.Intrinsic.File.AppendToFile(file, string) or

Function.Intrinsic.File.Append2File(file, string)

Arguments

Example

Remarks


Function.Intrinsic.File.Append2FileNewLine

These functions append a passed string to an existing file. The NewLine variant adds a carriage return and line feed to the existing file contents before appending the passed string.

Syntax

Function.Intrinsic.File.AppendToFileNewLine(file, string) or

Function.Intrinsic.File.Append2FileNewLine(file, string)

Arguments

Example

Remarks


Function.Intrinsic.File.AppendToFile

These functions append a passed string to an existing file. The NewLine variant adds a carriage return and line feed to the existing file contents before appending the passed string.

Syntax

Function.Intrinsic.File.AppendToFile(file, string) or

Function.Intrinsic.File.Append2File(file, string)

Arguments

Example

Remarks


Function.Intrinsic.File.AppendToFileNewLine

These functions append a passed string to an existing file. The NewLine variant adds a carriage return and line feed to the existing file contents before appending the passed string.

Syntax

Function.Intrinsic.File.AppendToFileNewLine(file, string) or Function.Intrinsic.File.Append2FileNewLine(file, string)

Arguments

Example

Remarks


Function.Intrinsic.File.BinaryGet

Returns a section of the Binary File

Syntax

Function.Intrinsic.File.BinaryGet(Handle, Position, Length, Return)

Arguments

Handle

Handle for the file

Position

Long Variable or Value

Length

Long Variable or Value

Return

String

Example

Variable.Local.iHdl.declare(Long)

Variable.Local.sRet.Declare(String)

Function.Intrinsic.File.GetHandle(Variable.Local.iHdl)

Function.Intrinsic.File.OpenForBinary(“C:\TestFile.txt”,Variable.Local.ihdl)

Function.Intrinsic.File.BinaryGet(Variable.Local.iHdl, 1, 50, Variable.Local.sRet) 

Remarks


Function.Intrinsic.File.BinaryPut

Syntax

Function.Intrinsic.BinaryPut(Handle, Data)

Arguments

Handle

File Handle

Data

Data pushed to the file

Example

Function.Intrinsic.BinaryPut(iHdl, sData) 

Remarks

Use Function.Intrinsic.File.GetHandle to retrieve the Handle


Function.Intrinsic.File.CalculateMD5

Calculates the MD5

Syntax

Function.Intrinsic.File.CalculateMD5(File, Return)

Arguments

File

FQ Path to the File

Return

MD5 File

Example

Variable.Local.sFile.Declare(String)
Function.Intrinsic.File.CalculateMD5(“C:\TestFile.txt”,Variable.Local.sFile)

Remarks


Function.Intrinsic.File.ChangeDirectory

Changes the current directory to the new directory specified

Syntax

Function.Intrinsic.File.ChangeDirectory(Directory Name)

Arguments

Directory Name

Fully Qualified Name to new directory

Example

Function.Intrinsic.File.ChangeDirectory(“F:\Global\Temp”)

Remarks


Function.Intrinsic.File.CloseFile

Closes file handle that is passed

Syntax

Function.Intrinsic.File.CloseFile [file Handle]

Arguments

File Handle

Long variable for the file handle

Example

Function.Intrinsic.File.CloseFile (Variable.local.filehdl)

Remarks

  • Must use GETHANDLE function for File Handle


Function.Intrinsic.File.Compress

Creates a copy of a file that is encrypted and zipped to the source directory

Syntax

Function.Intrinsic.File.Compress(FQFN source, FQFN target)

Arguments

FQFN Source

Fully Qualified File Name of the source file

FQFN Target

Fully Qualified File Name of the target file

Example

Function.Intrinsic.File.Compress(“C:\GAB Reference Guide.doc”,”C:\GABRef”)

Remarks


Function.Intrinsic.File.CopyDirectory

This function copies files from a source directory to a target directory, including downlevel directories and files. The first overload accepts a parameter that allows for the copy to overwrite existing files without throwing an exception. The second overload controls the UI behavior of the function.

Syntax

Functions.Intrinsic.File.CopyDirectory(source directory [string], target directory [string], overwrite [Boolean], return [Boolean])

or

Functions.Intrinsic.File.CopyDirectory(source directory [string], target directory [string], UI option [long], UI cancel behavior [long], return [Boolean])

Arguments

source directory

string

target directory

string

overwrite

Boolean

return

Boolean

UI option

long

UI cancel behavior

long

Example


Remarks

  • Valid UI option values are:

2 - Error dialogs only

3 - All dialogs


  • Valid UI cancel options values are:

2 - Do nothing

3 - Throw exception (this will throw GAB run-time error 217)


Function.Intrinsic.File.CopyFile

Copies one or more files from one location to another

Syntax

Function.Intrinsic.File.CopyFile (Fully Qualified Path Source, Fully Qualified Path Target)

Arguments

Fully qualified Path Source

Path includes file name of the source file, wildcard are allowed

Fully Qualified Path Target

Fully Qualified Path including file name destination where the file or files from source are to be copied, Wildcard characters are not allowed. You have to specify file name, you cant just put the path in order to copy the file.

Example

Function.Intrinsic.File.CopyFile ("c:\mydocuments\letters\*.doc", "c:\tempfolder\filename.doc")

But you can't use:

Function.Intrinsic.File.CopyFile ( "c:\mydocuments\*\R1???97.xls", "c:\tempfolder\filename.doc")

Remarks

  • Wildcard characters can only be used in the last path component of the source argument. For example, you can use:
  • If source contains wildcard characters or target ends with a path separator (\), it is assumed that target is an existing folder in which to copy matching files. Otherwise, target is assumed to be the name of a file to create. In either case, three things can happen when an individual file is copied.
  • If target does not exist, source gets copied. This is the usual case.
  • If target is an existing file, an error occurs if overwrite is False. Otherwise, an attempt is made to copy source over the existing file.
  • If target is a directory, an error occurs.

An error also occurs if a source using wildcard characters doesn't match any files. The CopyFile method stops on the first error it encounters. No attempt is made to roll back or undo any changes made before an error occurs.


Function.Intrinsic.File.CopyOpenFile

This function copies a specified file to a specified target. While similar to Function.Intrinsic.File.CopyFile, CopyOpenFile will copy a file even if it is locked by the operating system.

Syntax

Function.Intrinsic.File.CopyOpenFile(source filename, target filename)

Arguments

None

Example

None 

Remarks

  • Since this function does not wait for any write locks to be removed, it is possible that locked files copied could have time-phasing mismatches or corruption.


Function.Intrinsic.File.CreateDir

Creates a new directory.

Syntax

Function.Intrinsic.File.CreateDir (String Fully Qualified path )

Arguments

Path

The path of the directory to create must be fully qualified

Example

Function.Intrinsic.File.CreateDir ("C:\My Documents\New Document Folder")

Remarks

  • WinIOException thrown if an error occurs.
  • Except for the last element, the specified path must designate an existing directory. The last element in the path specifies the name of the new directory to create. It is an error if a file or directory with that name exists.


Function.Intrinsic.File.DecomPress

Creates a copy of a file that is encrypted and zipped to the source directory

Syntax

Function.Intrinsic.File.Decompress(FQFN source, FQFN target)

Arguments

FQFN Source

Fully Qualified File Name of the source file

FQFN Target

Fully Qualified File Name of the target file

Example

Function.Intrinsic.File.Decompress(”C:\GABRef”, “C:\GAB Reference Guide.doc”)

Remarks


Function.Intrinsic.File.DeleteDir

Syntax

Function.Intrinsic.File.DeleteDir(FQP)

Arguments

FQP

Fully Qualified Path

Example

Function.Intrinsic.File.DeleteDir(“S:\Docs”)

Remarks

  • Deletes the Directory and all files contained within.


Function.Intrinsic.File.DeleteFile

Deletes a specified file.

Syntax

Function.Intrinsic.File.DeleteFile (Fully Qualified Path)

Arguments

Fully Qualified Path

Includes file name

Example

Function.Intrinsic.File.DeleteFile (“C:\My Documents\Delete.Doc”)

Remarks

  • An error occurs if no matching files are found. The DeleteFile method stops on the first error it encounters. No attempt is made to roll back or undo any changes that were made before an error occurred.


Function.Intrinsic.File.DirExists

Syntax

Function.Intrinsic.File.DirExists(FQP, Boolean Return)

Arguments

FQP

Fully Qualified Path

Boolean Return

Variable of Boolean Type

Example

Variable.Local.bDir.Declare(Boolean)

Function.Intrinsic.File.DirExists(“S:\Docs”, variable.local.bDir) 

Remarks

  • If the Directory exists then it will return a True


Function.Intrinsic.File.EOF

Using EOF tells the program if the “End of File” has been reached.

Syntax

Function.Intrinsic.File.EOF(filenumber long,Boolean variable)

Arguments

Filenumber

An Integer containing any valid file number.

Boolean

Boolean Variable returns True or False based on EOF

Example

variable.local.eof.declare(Boolean)
variable.local.handle.declare(long)
Function.Intrinsic.File.EOF(variable.local.handle, variable.local.eof) 

Remarks

  • Must use GETHANDLE function for File Handle
  • Use EOF to avoid the error generated by attempting to get input past the end of a file.
  • The EOF function returns False until the end of the file has been reached. With files opened for Random or Binary access, EOF returns False until the last executed Get statement is unable to read an entire record.
  • With files opened for Binary access, an attempt to read through the file using the Input function until EOF returns True generates an error. Use the LOF and Loc functions instead of EOF when reading binary files with Input, or use Get when using the EOF function. With files opened for Output, EOF always returns True.


Function.Intrinsic.File.Exists

Returns a Boolean True if File exists.

Syntax

Function.Intrinsic.File.Exists (FQ File Name, Return Variable)

Arguments

FQ File Name

Fully Qualified File name Variable or value

Return Variable

Variable that is a Boolean

Example

Function.Variable.Exists.declare (Boolean)

Function.Intrinsic.File.Exists (“C:\Hello.doc”, Variable.Local.Exists)

Remarks


Function.Intrinsic.File.File2String

Converts a file to a string

Syntax

Function.Intrinsic.File.File2String(FQN filename [string], Return [string])

Function.Intrinsic.File.File2String(FQN filename [string], Encoding [long], Return [string])

Arguments

FileName

Fully Qualified File Name

Encoding

Encoding type: 0 - Default 1 - ASCII 2 - BigEndianUnicode 3 - Unicode 4 - UTF32 5 - UTF7 6 - UTF8

String Return

Variable to hold the File information

Example

Function.Intrinsic.File.File2String(“C:\Hello.doc”, variable.local.sFile) 
Function.Intrinsic.File.File2String(“C:\HelloWEncoding.txt”, 2, variable.local.sFile)

Remarks


Function.Intrinsic.File.File2StringArray

Function.Intrinsic.File.File2StringArray

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.File.FileToString

Converts a file to a string.

Syntax

Function.Intrinsic.File.FileToString(FQN filename [string], Return [string])

Function.Intrinsic.File.FileToString(FQN filename [string], Encoding [long], Return [string])

Arguments

FileName

Fully Qualified File Name

Encoding

Encoding type: 0 - Default 1 - ASCII 2 - BigEndianUnicode 3 - Unicode 4 - UTF32 5 - UTF7 6 - UTF8

String Return

Variable to hold the File information

Example

Function.Intrinsic.File.FileToString(“C:\Hello.doc”, variable.local.sFile) 
Function.Intrinsic.File.FileToString(“C:\HelloWEncoding.txt”, 2, variable.local.sFile)

Remarks


Function.Intrinsic.File.FileToStringArray

This command will read the contents of the specified file, and split it into a string array based on the passed delimiter.

Syntax

Function.Intrinsic.File.FileToStringArray(FQN, delimiter, return string array)

Arguments

FQN
delimiter
return string array)

Examples

Remarks


Function.Intrinsic.File.GetExtensionComponent

This function returns the extension of the passed filename.

Syntax

Function.Intrinsic.File.GetExtensionComponent(filename, string return)

Arguments

filename
string return)

Examples

Remarks


Function.Intrinsic.File.GetFileAttributes

Returns a long that combines the attributes

Syntax

Function.Intrinsic.File.GetFileAttributes (FQ File Name, Return Variable)

Arguments

FQ File Name

Fully Qualified File name Variable or Value

Return Variable

Long data type variable

The return values for GetFileAttributes if the sum of the following attribute values (when present):

0 - normal

1 - read-only

2 - hidden

4 - system

16 - directory

32 - archive

8192 - not indexed

Examples

Declare variable.RetVal.Declare (long)
Function.Intrinsic.File.GetFileAttributes (“C:\Hello.doc”,.Variable.Local.RetVal) 

Remarks

  • The same file can exhibit slightly different attributes, when viewed from different clients. When testing for a particular attribute, Function.Intrinsic.Math.BitwiseL should be used on the return value (for example, performing an AND on the return for a value of 2).


Function.Intrinsic.File.GetFileDateTime

Returns the date/Time from the file

Syntax

Function.Intrinsic.File.GetFileDateTime (FQ File Name, Return Variable)

Arguments

FQ File Name

Fully Qualified File name Variable or Value

Return Variable

Date data type variable

Example

Function.Variable.RetVal.Declare (Date)
Function.Intrinsic.File.GetFileDateTime (“C:\Hello.doc”,Variable.Local.RetVal)

Remarks


Function.Intrinsic.File.GetFileDateTimeExtended

Reads a file's creation, last access, or last modified date and time

Syntax

Function.Intrinsic.File.GETFILEDATETIMEEXTENDED(Fully Qualified file name, Type, Boolean, Return Variable)

Arguments

Fully Qualified file name

String variable

Type

Long (1-3) denoting what date user wants returned.

1 – File creation date and time

2 – Last access date and time

3 – Last modified date and time

Boolean

True/False specifying whether or not to convert the time into local time.

Return Variable

Date/Time variable

Example

Remarks


Function.Intrinsic.File.GetFileList

Returns a list of the files within the Passed path

Syntax

Function.Intrinsic.File.GetFileList (FQP,[attributes], Return)

Arguments

FQP

Fully Qualified Path, Variable or Value

Attributes

1 – Read Only files, 2 – Hidden Files, 4 – System Files, 16 – directories

Return

Sting Variable delimited by colon ( : )

Example

Function.Variable.RetVal.Declare (string)

Function.Intrinsic.File.GetFileList(“C:\My Documents”, 2, Variable.Local.RetVal)

Remarks

  • Returns all files in the Fully Qualified path specified in the FQP delimited by the colon. The Attributes argument is optional.


Function.Intrinsic.File.GetFileNameFromFQN

Returns the File Name from the Fully Qualified path

Syntax

Function.Intrinsic.File.GetFileNameFromFQN (FQ File Name, Return Variable)

Arguments

FQ File Name

Fully Qualified File name Variable or Value

Return Variable

String data type variable

Example

Function.Variable.RetVal.Declare (String)

Function.Intrinsic.File.GetFileNameFromFQN (“C:\Hello.doc”, Function.Variable.RetVal)

Returns “Hello.doc” 

Remarks

  • Returns string with just the file name from the fully qualified File Name passed in the function


Function.Intrinsic.File.GetFileSize

Returns the file size of the Passed File

Syntax

Function.Intrinsic.File.GetFileSize (FQ File Name, Return Variable)

Arguments

FQ File Name

Fully Qualified File name, Variable or Value

Return Variable

Long data type variable

Example

Function.Variable.RetVal.Declare (long)

Function.Intrinsic.File.GetFileSize (“C:\Hello.doc”, Variable.local.RetVal)

Remarks

  • Returns file size in Bytes


Function.Intrinsic.File.GetFreeDiskCapacity

This function returns a float value containing free disk space on the path specified.

Syntax

Function.Intrinsic.File.GetFreeDiskCapacity(path, float return)

Arguments

path
float return

Examples

Remarks


Function.Intrinsic.File.GetHandle

Returns next available long integer for file handling

Syntax

Function.Intrinsic.File.GetHandle (Return Variable)

Arguments

Return Variable

Long data type variable

Example

Variable.local.RetVal.Declare (long)

Function.Intrinsic.File.GetHandle (Variable.local.RetVal)

Returns the next FreeFile 

Remarks


Function.Intrinsic.File.Getlof

Gets Length of File

Syntax

Function.Intrinsic.File.GetLOF(Handle, Return)

Arguments

Handle

Handle for the file

Return

Long for the length of the file

Example

Variable.Local.iHdl.declare(Long)
Variable.Local.iRet.Declare(Long)
Function.Intrinsic.File.GetHandle(Variable.Local.iHdl)
Function.Intrinsic.File.OpenForBinary(“C:\TestFile.txt”,Variable.Local.ihdl)
Function.Intrinsic.File.GetLOF(Variable.Local.iHdl, Variable.Local.iRet)

Remarks


Function.Intrinsic.File.GetPathFromFQN

Returns the Path and not the file name from the passed fully qualified file name

Syntax

Function.Intrinsic.File.GetPathFromFQN (FQ File Name, Return Variable)

Arguments

FQ File Name

Fully Qualified File name Variable or Value

Return Variable

String data type variable

Example

Function.Variable.RetVal.Declare (string)

Fucntion.Intrinsic.File.GetPathFromFQN (“C:\Hello.doc”, Function.Variable.RetVal)

Returns “C:\”

Remarks

  • This function tells you the path directory without the file name


Function.Intrinsic.File.GetScriptVersion

Reads the script version out of a GAS file

Syntax

Function.Intrinsic.File.GETSCRIPTVERSION(Fully Qualified GAB script name, Return Variable)

Arguments

Fully Qualified GAB script name

String GAS file name

Return Variable

String Script Version Number

Example

Remarks

  • Used in conjunction with Function.Intrinsic.File.SetScriptVersion.
  • If there is no version in the file, it will return -1.


Function.Intrinsic.File.GetShortPath

Function.Intrinsic.File.GetShortPath

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.File.GetTotalDiskCapacity

This function returns a float value containing total disk space on the path specified.

Syntax

Function.Intrinsic.File.GetTotalDiskCapacity(path, float return)

Arguments

path
float return

Examples

Remarks


Function.Intrinsic.File.GetUNCName

This function returns a fully-qualified UNC filename, given a fully-qualified mapped-drive filename.

Syntax

Function.Intrinsic.File.GetUNCname(filename, ret filename)

Arguments

Example

Remarks


Function.Intrinsic.File.IsFileLocked

This function determines the lock status of a file with a boolean return.

Syntax

Function.Intrinsic.File.IsFileLocked(filename, boolean return)

Arguments

Example

Remarks


Function.Intrinsic.File.IsFileNameValid

This function evaluates the passed filename to determine if is legal on Windows filesystems.

Syntax

Function.Intrinsic.File.IsFilenameValid(filename, boolean return)

Arguments

Example

Remarks


Function.Intrinsic.File.IsTarGetDateTime

This function compares the las modified date and time of the specified file to the specified date time value. If the target last modified date and time is newer than the comparison value, a True will be returned.

Syntax

Function.Intrinsic.File.IsTargetDateTime(FQ filename, compare date, boolean return)

Arguments

Example

Remarks

  • While this command can take a date and time specified as a string literal, is a better idea to use Function.Intrinsic.Date.DateTimeSerial to specify the comparison value .


Function.Intrinsic.File.IsTarGetDateTimeNewer

Syntax

Function.Intrinsic.File.ISTARGETDATETIMENEWER

Arguments

Example

Remarks


Function.Intrinsic.File.IsTarGetSizeLarger

This function compares the size of the specified file to the specified size long value. If the target size is larger than the comparison value, a True will be returned.

Syntax

Function.Intrinsic.File.IsTargetSizeLarger(FQ filename, compare size, boolean return)

Arguments

Example

Remarks


Function.Intrinsic.File.IsTarGetVersionHigher

This function compares the version of the specified file to the specified version string. If the target version number is higher than the comparison value, a True will be returned.

Syntax

Function.Intrinsic.File.IsTargetVersionHigher(FQ filename, version string, boolean return)

Arguments

Example

Remarks

  • This command works on files that carry a version in their metadata. Common version carrying files are executables and DLLs.


Function.Intrinsic.File.IsUNC

This function returns True, if the specified path is a UNC path.  Note: Local paths, sometimes using mapped drive letters, are generally not well suited for uniform access to network resources.  It may be a good idea to use Function.Intrinsic.File.GetUNCName to see if a path resolves to a UNC, before calling IsUNC.

Syntax

Function.Intrinsic.File.IsUNC(FQ file or path, boolean return)

Arguments

FQ file or path
boolean return

Examples

Remarks


Function.Intrinsic.File.MakeFileNameFriendly

This function returns a valid filename, when passed a string of data, by replacing all invalid characters with hyphens (-).

Syntax

Function.Intrinsic.File.MakeFilenameFriendly(filename, string return)

Arguments

Example

Remarks


Function.Intrinsic.File.MakeFilenameFriendly

This function returns a valid filename, when passed a string of data, by replacing all invalid characters with hyphens (-).

Syntax

Function.Intrinsic.File.MakeFilenameFriendly(filename, string return)

Arguments

filename
string return)

Examples

Remarks


Function.Intrinsic.File.MoveDirectory

Function.Intrinsic.File.MoveDirectory

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.File.MoveFile

This function allows a file to be renamed or moved. The return value is zero on function failure.

Syntax

Function.Intrinsic.File.MoveFile(source filename, target filename, long return)

Arguments

Example

Remarks


Function.Intrinsic.File.OpenForAppend

Opens the File listed so that data can be added to the file

Syntax

Function.Intrinsic.File.OpenForAppend (FQ File Name, Handle Variable)

Arguments

FQ File Name

Fully Qualified File Name Path, Variable or Value

Handle Variable

Long Variable data type – File Handle Variable or Value

Example

Variable.Local.FileHdl.delcare (Long)
Function.Intrinsic.File.OpenForAppend (“C:\Hello.doc” , Variable.local.FileHdl)

Remarks

  • Must use GETHANDLE function for File Handle


Function.Intrinsic.File.OpenForBinary

Opens a file as Binary

Syntax

Function.Intrinsic.File.OpenForBinary(File, Handle)

Arguments

File

FQ Path to the File

Handle

Handle for the file

Example

Variable.Local.iHdl.declare(Long)
Function.Intrinsic.File.GetHandle(Variable.Local.iHdl)
Function.Intrinsic.File.OpenForBinary(“C:\TestFile.txt”,Variable.Local.ihdl)

Remarks


Function.Intrinsic.File.OpenForRead

Opens the File listed in a way where no data may be added to the file

Syntax

Function.Intrinsic.File.OpenForRead (FQ File Name, Handle Variable)

Arguments

FQ File Name

Fully Qualified File Name Path, Variable or Value

Handle Variable

Long Variable data type – File Handle Variable or Value

Example

Variable.Local.FileHdl.delcare (Long)
Function.Intrinsic.File.OpenForRead (“C:\Hello.doc” , Variable.local.FileHdl)

Remarks

  • Must use GETHANDLE function for File Handle


Function.Intrinsic.File.OpenForWrite

Opens the File listed so that data will replace the existing data in the file

Syntax

Function.Intrinsic.File.OpenForWrite (FQ File Name, Handle Variable)

Arguments

FQ File Name

Fully Qualified File Name Path, Variable or Value

Handle Variable

Long Variable data type – File Handle Variable or Value

Example

Variable.Local.FileHdl.delcare (Long)
Function.Intrinsic.File.OpenForWrite (“C:\Hello.doc” , Variable.local.FileHdl)

Remarks

  • Must use GETHANDLE function for File Handle


Function.Intrinsic.File.PathExists

This returns a Boolean value to indicate if the specified path exists, and is accessible.

Syntax

Function.Intrinsic.File.PathExists(path, boolean return)

Arguments

path
boolean return

Examples

Remarks


Function.Intrinsic.File.Prepend2File

Function.Intrinsic.File.Prepend2File

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.File.Prepend2FileNewLine

Function.Intrinsic.File.Prepend2FileNewLine

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.File.PrependToFile

This function prepends the specified string content to the existing contents of the specified file.

Syntax

Function.Intrinsic.File.PrependToFile(FQN, string)

Arguments

FQN
string

Examples

Remarks


Function.Intrinsic.File.PrependToFileNewline

This function prepends the specified string content to the existing contents of the specified file, with a carriage return and linefeed between them (the equivalent of Variable.Ambient.NewLine.

Syntax

Function.Intrinsic.File.PrependToFileNewline(FQN, string)

Arguments

FQN
string

Examples

Remarks


Function.Intrinsic.File.ReadFile

Syntax

Function.Intrinsic.File.ReadFile (Variable File Handle, Return Variable)

Arguments

Variable File Handle

Long Data Type Variable

Return Variable

String Variable stores content of File

Example

Variable.Local.FileHdl.declare (Long)
Variable.Local.RetVar.declare (String)
Function.Intrinsic.File.ReadFile (Variable.Local.FileHdl, Variable.local.RetVar)

Remarks

  • Must use GETHANDLE function for File Handle


Function.Intrinsic.File.ReadLine

Reads next line in a file

Syntax

Function.Intrinsic.File.ReadLine (Variable File Handle, Return Variable)

Arguments

Variable File Handle

Long Data Type Variable

Return Variable String

Variable stores content of next line in file

Example

#1
Variable.Local.FileHdl.declare (Long)
Variable.Local.RetVar.declare (String)
Function.Intrinsic.File.ReadLine (Variable.Local.FileHdl, Variable.local.RetVar)

#2
Should be used within Function.Intrinsic.File.EOF
Variable.Local.EOF.declare (Boolean)
Function.intrinsic.file.gethandle (Variable.local.filehdl)
Function.intrinsic.file.openforread (“testscript.txt”, variable.local.handle)
Function.intrinsic.control.doFunction.intrinsic.file.eof (variable.local.filehdl, variable.local.eof)Function.intrinsic.control.if (Variable.local.eof, =, true)
  Function.intrinsic.control.exitdo
Function.intrinsic.control.endif
Function.intrinsic.file.readline (variable.local.filehdl, variable.local.text)
Function.intrinsic.UI.msgbox (variable.local.text)
Function.intrinsic.control.loop

Remarks

  • Must use GETHANDLE function for File Handle


Function.Intrinsic.File.ReadPropCompanyName

Syntax

Function.Intrinsic.File.ReadPropCompanyName(FQN, Return String)

Arguments

FQN

Fully Qualified Name to file

Return String

Variable of String Type

Example

Function.Intrinsic.File.ReadPropCompanyName(“G:\Global\Plugins\GAB.exe”,variable.local.sCoName)

Remarks

  • This is the info from right-clicking on a file or exe


Function.Intrinsic.File.ReadPropDescription

Syntax

Function.Intrinsic.File.ReadPropDescription(FQN, Return String)

Arguments

FQN

Fully Qualified Name to file

Return String

Variable of String Type

Example

Function.Intrinsic.File.ReadPropDescription(“G:\Global\Plugins\GAB.exe”,variable.local.sDesc)

Remarks

  • This is the info from right-clicking on a file or exe


Function.Intrinsic.File.ReadPropInternalName

Syntax

Function.Intrinsic.File.ReadPropInternalName(FQN, Return String)

Arguments

FQN

Fully Qualified Name to file

Return String

Variable of String Type

Example

Function.Intrinsic.File.ReadPropInternalName(“G:\Global\Plugins\GAB.exe”,variable.local.sIName) 

Remarks

  • This is the info from right-clicking on a file or exe


Function.Intrinsic.File.ReadPropLegalCopyright

Syntax

Function.Intrinsic.File.ReadPropLegalCopyRight(FQN, Return String)

Arguments

FQN

Fully Qualified Name to file

Return String

Variable of String Type

Example

Function.Intrinsic.File.ReadPropLegalCopyRight(“G:\Global\Plugins\GAB.exe”,variable.local.sLCopy)

Remarks

  • This is the info from right-clicking on a file or exe


Function.Intrinsic.File.ReadPropOriginalFileName

Syntax

Function.Intrinsic.File.ReadPropOriginalFileName(FQN, Return String)

Arguments

FQN

Fully Qualified Name to file

Return String

Variable of String Type

Example

Function.Intrinsic.File.ReadPropOriginalFileName(“G:\Global\Plugins\GAB.exe”,variable.local.sOFName)

Remarks

  • This is the info from right-clicking on a file or exe


Function.Intrinsic.File.ReadPropProductName

Syntax

Function.Intrinsic.File.ReadPropProductName(FQN, Return String)

Arguments

FQN

Fully Qualified Name to file

Return String

Variable of String Type

Example

Function.Intrinsic.File.ReadPropProductName(“G:\Global\Plugins\GAB.exe”,variable.local.sPName) 

Remarks

  • This is the info from right-clicking on a file or exe


Function.Intrinsic.File.ReadPropProductVersion

Syntax

Function.Intrinsic.File.ReadPropProductVersion(FQN, Return String)

Arguments

FQN

Fully Qualified Name to file

Return String

Variable of String Type

Example

Function.Intrinsic.File.ReadPropProductVersion(“G:\Global\Plugins\GAB.exe”,variable.local.sPVer) 

Remarks

  • This is the info from right-clicking on a file or exe


Function.Intrinsic.File.ReadPropVersion

Syntax

Function.Intrinsic.File.ReadPropVersion(FQN, Return String)

Arguments

FQN

Fully Qualified Name to file

Return String

Variable of String Type

Example

Function.Intrinsic.File.ReadPropVersion(“G:\Global\Plugins\GAB.exe”,variable.local.sVer)

Remarks

  • This is the info from right-clicking on a file or exe


Function.Intrinsic.File.Reset

Closes ALL open files in all subs not just the current sub.

Syntax

Function.Intrinsic.File.Reset

Arguments

None

Examples

Remarks


Function.Intrinsic.File.SetFileAttributes

Sets attributes for the file passed in the syntax

Syntax

Function.Intrinsic.File.SetFileAttributes (FQ file name, Attribute value)

Arguments

FQ File Name

Fully Qualified File Name, Variable or value

Attribute Value

Long Data Type Value

Examples

 Functrion.Intrinsic.File.SetFileAttributes (“C:\Hello.doc”, 3) 

Remarks

  • When using the Attributes add the attribute values together for the Attribute value.


Function.Intrinsic.File.SetFileDateTimeExtended

Sets the creation, last access, or last modified date and time that shows up in Windows Explorer for a file.

Syntax

Function.Intrinsic.File.SETFILEDATETIMEEXTENDED(Fully Qualified file name, Type, Boolean, Date Variable)

Arguments

Fully Qualified file name

String variable

Type

Long (1-3) denoting what date user wants returned.

1 – File creation date and time

2 – Last access date and time

3 – Last modified date and time

Boolean

True/False specifying whether or not to convert the time into local time.

Date Variable

Sets the date and time

Example

Remarks


Function.Intrinsic.File.String2File

Converts a string to a file

Syntax

Function.Intrinsic.File.String2File(Filename, String)

Arguments

FileName

Fully Qualified File Name

String Ret

Variable that holds the information

Example

Function.Intrinsic.File.String2File(“C:\Hello.doc”, variable.local.sFile) 

Remarks


Function.Intrinsic.File.StringToFile

Function.Intrinsic.File.StringToFile

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.File.WriteLine

Writes text out to a file

Syntax

Function.Intrinsic.File.WriteLine (File Handle, Text)

Arguments

File Handle

Variable or Value long data type

Text

String Variable or Value

Examples

Function.Intrinsic.File.WriteLine (variable.local.filehdl, “Passed Text”) 

Remarks

  • Must use GETHANDLE function for File Handle


Function.Intrinsic.Hash.AddItem

AddItem adds a hash table entry to the specified hash table, with the passed key and value.

Syntax

Function.Intrinsic.Hash.AddItem(ht table, key, value)

Arguments

Example

Remarks

  • Adding the first entry creates the base hash table.


Function.Intrinsic.Hash.Clear

Syntax

Function.Intrinsic.Hash.Clear(name [string], ignore uninitialized hash [string])

Arguments

name

string

ignore uninitialized hash

string

Examples

Remarks


Function.Intrinsic.Hash.ItemCount

This command returns the number of items in the specified hash table.

Syntax

Function.Intrinsic.Hash.ItemCount(ht table, ret value)

Arguments

Example

Remarks


Function.Intrinsic.Hash.LookupByKey

Syntax

Function.Intrinsic.Hash.LookupByKey(ht table, key, text compare bool, ret value)

Arguments

Example

Remarks

  • The text comparison boolean is a TRUE or FALSE. A TRUE indicates that the matching should be done without case sensitivity, while FALSE indicates a binary comparison.


Function.Intrinsic.Hash.LookupByValue

Syntax

Function.Intrinsic.Hash.LookupByValue(ht table, value, text compare bool, ret key)

Arguments

Example

Remarks

  • The text comparison boolean is a TRUE or FALSE. A TRUE indicates that the matching should be done without case sensitivity, while FALSE indicates a binary comparison.


Function.Intrinsic.Hash.RemoveItemByKey

Syntax

Function.Intrinsic.Hash.RemoveItemByKey(ht table, key)

Arguments

ht table
key

Examples

Remarks


Function.Intrinsic.Hash.RemoveItemByValue

Syntax

Function.Intrinsic.Hash.RemoveItemByValue(ht table, value)

Arguments

ht table
value

Examples

Remarks


Function.Intrinsic.IPM.GenericMenuIPM

Function.Intrinsic.IPM.GenericMenuIPM

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Ipm.GetPrIDInfo

Returns the information set by Function.Intrinsic.IPM.RegisterProcess for a registered process

Syntax

Function.Intrinsic.IPM.GETPRIDINFO(Process ID, String Return)

Arguments

Process ID

Long

String Return

String Return of registered process information

Example

Remarks

  • Used in conjunction with Function.Intrinsic.IPM.RegisterProcess
  • The return is a *!* delimited string. Use F.in.String.Split to parse it


Function.Intrinsic.Ipm.GetPrIDs

Reads all PRID #s currently running for the logged-in user on their computer within that current session

Syntax

Function.Intrinsic.IPM.GETPRIDS(String Return)

Arguments

String Return

String Return of PRIDs

Example

Remarks

  • The return is a *!* delimited string. Use F.in.String.Split to parse it


Function.Intrinsic.Ipm.RegisterProcess

Registers a process, sets v.ambient.PRID, and creates a record in the GAB_ProcReg table

Syntax

Function.Intrinsic.IPM.REGISTERPROCESS(Metadata 0, …, Metadata 4)

Arguments

Metadata 0, …, Metadata 4 - String metadata elements to be set for screen controls

Example

Function.Intrinsic.IPM.RegisterProcess(0,0,0,0,0) Registers a process with no assigned metadata elements, sets v.ambient.PRID, and creates a record in the GAB_ProcReg table

Remarks

  • All 5 Metadata elements are required. If you do not want to assign an element, enter in 0.
  • The record created in GAB_ProcReg will include: Global Shop user; terminal; registration date and time; Process ID; hook that called it; GAS file that is running; Caller Program name; GAB version and user; IPM Handle; Computer name; Session name; Windows user name; Windows domain and all metadata.


Function.Intrinsic.Ipm.SendMessage

This function is used to allow different instances of OCTSRS to communicate with each other.

Syntax

Function.Intrinsic.IPM.SendMessage(message, handle)

Arguments

Example

Remarks

  • The receiving process needs to be listening for incoming messages using Function.Intrinsic.Control.AddEventHandler("IPMDATAIN","subname")
  • It is a good idea to check to see if the receiving process is still running, using Function.Intrinsic.Task.PIDRunning.


Function.Intrinsic.Ipm.UnregisterProcess

Removes the process from the table.

Syntax

Function.Intrinsic.IPM.UNREGISTERPROCESS

Arguments

Example

Remarks

  • Used in conjunction with Function.Intrinsic.IPM.RegisterProcess. Usually called when a program is closing


Function.Intrinsic.Math.Abs

Returns the absolute value of a number.

Syntax

Function.Intrinsic.Math.Abs(Value or variable, return Variable)

Arguments

Value or variable

Any valid numeric expression

Return Variable

Is the number that is returned from the function

Example

Function.Intrinsic.Math.Abs(50.3, Variable.local.number) ' Number Returns 50.3.
Function.Intrinsic.Math.Abs(-50.3, Variable.local.number) ' Number Returns 50.3.

Remarks

  • The absolute value of a number is its unsigned magnitude. For example, Abs(-1) and Abs(1) both return 1.


Function.Intrinsic.Math.Acos

Returns the arc cosine of a specified numeric expression.

Syntax

Function.Intrinsic.Math.ACOS(Variable or value, return variable)

Arguments

Variable

This is the Angle in Radians

Return Variable

The arc cosine in radians

Example

Function.Intrinsic.Math.ACOS(variable.local.angle,variable.local.return)

Remarks

  • Use Function.Intrinsic.Math.RADTODEG( ) to convert radians to degrees for the Variable or value passed.
  • The arc cosine is returned in radians


Function.Intrinsic.Math.Acosec

Function that returns the Arc Cosecant

Syntax

Function.Intrinsic.Math.ACOSEC (Variable or Value, Return Value)

Arguments

Variable

This is the Angle in Radians

Return Variable

The variable is returned in radians

Example

Function.Intrinsic.Math.ACOSEC(variable.local.angle,variable.local.return)

Remarks


Function.Intrinsic.Math.Acotan

Function returns the arc cotangent

Syntax

Function.Intrinsic.Math.ACOTAN (Variable or Value, Return Value)

Arguments

Variable

This is the Angle in Radians

Return Variable

The variable is returned in radians

Example

Function.Intrinsic.Math.ACOTAN(variable.local.angle,variable.local.return)

Remarks

  • Everything needs to be in radians, can use Function.Intrinsic.Math.DegToRad to convert the angle to radians.


Function.Intrinsic.Math.Add

Enables user to combine multiple numbers, and returns a value

Syntax

Function.Intrinsic.Math.Add (Variable, Variable, …, Variable or Value, Return Variable)

Arguments

Variable or value

Numeric values passed to be added in the function

Return Variable

Number returned after the function is executed

Example

Function.Intrinsic.Math.Add (variable.local.num1, 34, 12, variable.local.return)
Variable.local.return = 61 (num1=15 in this example)

Remarks

  • You can have as many numbers or variables to “Add” together, the last one passed will be the return value for the equation


Function.Intrinsic.Math.Asec

Syntax

Function.Intrinsic.Math.ASEC (Variable or Value, Return Value)

Arguments

Variable

This is the Angle in Radians

Return Variable

The variable is returned in radians

Example

Function.Intrinsic.Math.ASEC(variable.local.angle,variable.local.return)

Remarks

  • Everything needs to be in radians, can use Function.Intrinsic.Math.DegToRad to convert the angle to radians.


Function.Intrinsic.Math.Asin

Returns in radians the arc sine of a numeric expression.

Syntax

Function.Intrinsic.Math.ASIN(Variable or value, return variable)

Arguments

Variable

This is the Angle in Radians

Return Variable

The variable is returned in radians

Example

Function.Intrinsic.Math.ASIN(Variable.local.angle, Variable.local.ret)

Remarks

  • Use F.I.Math.RADTODEG( ) to convert radians to degrees


Function.Intrinsic.Math.Atan

Returns in radians the arc tangent of a numeric expression.

Syntax

Function.Intrinsic.Math.ATAN(passed variable, return variable)

Arguments

Variable

This is the Angle in Radians

Return Variable

The variable is returned in radians representing the arc tangent of the passed Variable.

Example

Function.Intrinsic.Math.ATAN(variable.local.angle,variable.local.return) 

Remarks

  • Everything needs to be in radians, can use Function.Intrinsic.Math.DegToRad to convert the angle to radians.


Function.Intrinsic.Math.BitwiseL

Syntax

Function.Intrinsic.Math.BitwiseL(param0, operator, param1, return)

Arguments

Valid operators are "AND", "NOT", "OR", and "XOR". The NOT operation ignores param1.

Example

Remarks

  • Params0 and 1 are long integers.
  • The variable type of the return variable should be long as well.


Function.Intrinsic.Math.CalculateUPCCheckDigit

Syntax

Function.Intrinsic.Math.CalculateUPCcheckDigit(UPC string, check digit long ret)

Arguments

Example

Remarks

  • This function assumes that a valid UPC code is being passed in the first place, ie. no alphas in the UPC, proper length, etc.


Function.Intrinsic.Math.Ceiling

This function calculates the ceiling of the specified value.

Syntax

Function.Intrinsic.Math.Ceiling(float in, long ret)

Arguments

float in
long ret

Examples

Remarks


Function.Intrinsic.Math.ConvertToFloat

Converts a string value into a float data type

Syntax

Function.Intrinsic.Math.ConvertToFloat(Data, Float Variable)

Arguments

Data

Information passed that needs to be converted

Float Variable

Variable to return the converted data

Example

Function.Intrinsic.Math.ConvertToFloat(“123.45”, variable.local.fFloat)

Remarks


Function.Intrinsic.Math.ConvertToLong

Converts a string value into a Long data type

Syntax

Function.Intrinsic.Math.ConvertToLong(Data, Long Variable)

Arguments

Data

Information passed that needs to be converted

Long Variable

Variable to return the converted data

Example

Function.Intrinsic.Math.ConvertToLong(“12345”, variable.local.fFloat)

Remarks


Function.Intrinsic.Math.Cos

Returns the cosine of a numeric expression.

Syntax

Function.Intrinsic.Math.COS (passed Variable, Return Value)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians representing the cosine of the passed Variable.

Example

Function.Intrinsic.Math.COS(variable.local.angle,variable.local.return)

Remarks

  • F.I.Math.COS( ) returns the cosine of passed variable in radians. Use F.I.Math.DEGTORAD( ) to convert an angle from degrees to radians.


Function.Intrinsic.Math.Cosec

Cosecant

Syntax

Function.Intrinsic.Math.COSEC (Variable or Value, Return Variable)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians representing the cosecant of the passed Variable.

Example

Function.Intrinsic.Math.COSEC(variable.local.angle,variable.local.return) 

Remarks


Function.Intrinsic.Math.Cotan

Cotangent

Syntax

Function.Intrinsic.Math.COTAN (Variable or Value, Return Variable)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians representing the cotangent of the passed Variable.

Example

Function.Intrinsic.Math.COTAN(variable.local.angle,variable.local.return)

Remarks


Function.Intrinsic.Math.Decimal2Fraction

Function.Intrinsic.Math.Decimal2Fraction

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Math.DecimalToFraction

This function returns the fractional equivalent of a float (decimal) value.  Optionally, the desired accuracy can be supplied; if not value for accuracy is provided, .001 is used.  Function.Intrinsic.String.ConvertInlineDecimalsToFractions can be used to parse decimals embedded in a text string. Note: If a value less than -1 or greater than 1 is provided, the entire value will be expressed as a fraction.  For example, 1.5 will return 3/2. Note: The accuracy value may need to be adjusted up or down, depending on the floating-point precision present in the provided value.

Syntax

Function.Intrinsic.Math.DecimalToFraction(float in, accuracy, string return)

Function.Intrinsic.Math.DecimalToFraction(float in, string return)

Arguments

float in
string return)

Examples

Remarks


Function.Intrinsic.Math.Degtorad

Function converts Degrees to Radians

Syntax

Function.Intrinsic.Math.DEGTORAD (Variable or Value, Return Variable)

Arguments

Passed variable

Variable or value for Angle in degrees

Return Variable

Variable returned in Radians.

Example

Function.Intrinsic.Math.DegToRad(variable.local.Deg,variable.local.return)

Remarks


Function.Intrinsic.Math.Div

Divides two values

Syntax

Function.Intrinsic.Math.DIV (Variable or Value, Variable or Value, Return Value)

Arguments

Variable or Value

Number to be divided

Variable or Value

Number to divide by

Return Value

Return Number Variable

Example

Function.Intrinsic.Math.Div(variable.local.Num1,Variable.local.Num2,variable.local.return)

Remarks


Function.Intrinsic.Math.Evaluate

Syntax

Function.Intrinsic.Math.Evaluate(function, return)

Arguments

Example

V.Lo.fRet.Declare(float)
v.lo.i.declare(long,10)
F.In.Math.Evaluate("3+4/5*[v.lo.i]",v.lo.fRet)
F.Intrinsic.UI.Msgbox(V.Lo.fRet) 

Remarks

  • This command can be passed a parenthesis-nested math function using /,*,-,+, and ^ expressions.
  • GAB variables can be included inline, if they are enclosed in square brackets.
  • Be careful when declaring your return variable type.


Function.Intrinsic.Math.Exp

Returns a Double specifying e (the base of natural logarithms) raised to a power.

Syntax

Function.Intrinsic.Math.EXP (Variable or Value, Return Value)

Arguments

Variable or value

Number

Return variable

Returns the answer a double type variable

Example

Function.Intrinsic.Math.EXP(variable.local.num1,variable.local.return) 

Remarks

  • The required variable or value is a Double or any valid numeric expression.
  • The Exp function complements the action of the Log function and is sometimes referred to as the antilogarithm.


Function.Intrinsic.Math.Fix

Both Int and Fix truncate the fractional part of the passed value and return the resulting long integer value.

Syntax

Function.Intrinsic.Math.Fix(numeric value, long ret)

Arguments

Example

Remarks

  • The difference between Int and Fix is that if number is negative, Int returns the first negative integer less than or equal to number, whereas Fix returns the first negative integer greater than or equal to number. For example, Int converts -8.4 to -9, and Fix converts -8.4 to -8.
  • Fix(number) is equivalent to: Sgn(number) * Int(Abs(number))


Function.Intrinsic.Math.Floor

Syntax

Function.Intrinsic.Math.Floor(float in, long ret)

Arguments

float in
long ret

Examples

Remarks


Function.Intrinsic.Math.Hacos

Hyperbolic Arc Cosine

Syntax

Function.Intrinsic.Math.HACOS (Variable or Value, Return Value)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians.

Example

Function.Intrinsic.Math.HACOS(variable.local.angle,variable.local.return)

Remarks


Function.Intrinsic.Math.Hacosec

Hyperbolic Arc Cosecant

Syntax

Function.Intrinsic.Math.HACOSEC (Variable or Value, Return Value)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians.

Example

Function.Intrinsic.Math.HACOSEC(variable.local.angle,variable.local.return)

Remarks


Function.Intrinsic.Math.Hacotan

Hyperbolic Arc Cotangent

Syntax

Function.Intrinsic.Math.HACOTAN (Variable or Value, Return Value)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians

Example

Function.Intrinsic.Math.HACOTAN(variable.local.angle,variable.local.return) 

Remarks


Function.Intrinsic.Math.Hasec

Hyperbolic Arc Secant

Syntax

Function.Intrinsic.Math.HASEC (Variable or Value, Return Value)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians

Example

Function.Intrinsic.Math.HASEC(variable.local.angle,variable.local.return)

Remarks


Function.Intrinsic.Math.Hasin

Hyperbolic Arc Sine

Syntax

Function.Intrinsic.Math.HASIN (Variable or Value, Return Value)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians

Example

Function.Intrinsic.Math.HASIN(variable.local.angle,variable.local.return)

Remarks


Function.Intrinsic.Math.Hatan

Hyperbolic Arc Tangent

Syntax

Function.Intrinsic.Math.HATAN (Variable or Value, Return Value)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians

Example

Function.Intrinsic.Math.HATAN(variable.local.angle,variable.local.return)

Remarks


Function.Intrinsic.Math.Hcos

Hyperbolic Cosine

Syntax

Function.Intrinsic.Math.HCOS (Variable or Value, Return Value)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians

Example

Function.Intrinsic.Math.HCOS(variable.local.angle,variable.local.return) 

Remarks


Function.Intrinsic.Math.Hcosec

Hyperbolic Cosecant

Syntax

Function.Intrinsic.Math.HCOSEC (Variable or value, Return Value)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians

Example

Function.Intrinsic.Math.HCOSEC(variable.local.angle,variable.local.return) 

Remarks


Function.Intrinsic.Math.Hcotan

Hyperbolic Cotangent

Syntax

Function.Intrinsic.Math.HCOTAN (Variable or Value, Return Value)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians

Example

Function.Intrinsic.Math.HCOTAN(variable.local.angle,variable.local.return) 

Remarks


Function.Intrinsic.Math.Hsec

Hyperbolic Secant

Syntax

Function.Intrinsic.Math.HSEC (Variable or Value, Return Value)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians

Example

Function.Intrinsic.Math.HSEC(variable.local.angle,variable.local.return)

Remarks


Function.Intrinsic.Math.Hsin

Hyperbolic Sine

Syntax

Function.Intrinsic.Math.HSIN (Variable or Value, Return Value)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians

Example

Function.Intrinsic.Math.HSIN(variable.local.angle,variable.local.return) 

Remarks


Function.Intrinsic.Math.Htan

Hyperbolic Tangent

Syntax

Function.Intrinsic.Math.HTAN (Variable or Value, Return Value)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians

Example

Function.Intrinsic.Math.HTAN(variable.local.angle,variable.local.return)

Remarks


Function.Intrinsic.Math.Idiv

Integer Divide number1\number2, gives no remainder

Syntax

Function.Intrinsic.Math.IDIV (Variable or Value, Variable or value, Return Value)

Arguments

Variable or Value

Number to Integer divide

Variable or Value

Number to integer divide by (CANNOT be between 0 to 1, you can not use .6 for example, it must be 1.6)

Return Value

Number variable that returns the answer

Example

Function.Intrinsic.Math.IDIV(2.5,1,variable.local.return)
Returns Variable.Local.Return = 2 

Remarks

  • Return value will not show remainders


Function.Intrinsic.Math.Int

Both Int and Fix truncate the fractional part of the passed value and return the resulting long integer value.

Syntax

Function.Intrinsic.Math.Int(numeric value, long ret)

Arguments

Example

Remarks

  • The difference between Int and Fix is that if number is negative, Int returns the first negative integer less than or equal to number, whereas Fix returns the first negative integer greater than or equal to number. For example, Int converts -8.4 to -9, and Fix converts -8.4 to -8.
  • Fix(number) is equivalent to: Sgn(number) * Int(Abs(number))


Function.Intrinsic.Math.Inv

Inverse or 1/(Variable or Value)

Syntax

Function.Intrinsic.Math.INV (Variable or Value, Return Value)

Arguments

Variable or Value

Number that is divided into 1

Return Value

Integer Variable that is returned

Example

Function.Intrinsic.Math.INV(2,variable.local.return)
Returns Variable.local.return = ½ or .5 

Remarks


Function.Intrinsic.Math.IsInRange

This function returns a Boolean value indicating if the passed value is within the specified range.

Syntax

Function.Intrinsic.Math.IsInRange(value, range start, range end, boolean return)

Arguments

value
range start
range end
boolean return

Examples

Remarks


Function.Intrinsic.Math.IsNumeric

Checks data to see if it holds numeric information

Syntax

Function.Intrinsic.Math.IsNumeric(Data, Boolean Variable)

Arguments

Data

Information passed that needs to be converted

Boolean Variable

Boolean to say if the data is numeric or not

Example

Function.Intrinsic.Math.IsNumeric(“123.45”, variable.local.bNo) 

Remarks


Function.Intrinsic.Math.Log

Logarithm to base 10

Syntax

Function.Intrinsic.Math.LOG (Variable or Value, Return Value)

Arguments

Variable or Value

Number to process

Return Value

Number variable that is returned

Example

Function.Intrinsic.Math.LOG(variable.local.angle,variable.local.return) 

Remarks


Function.Intrinsic.Math.LogN

Converts from one base to another

Syntax

Function.Intrinsic.Math.LOGN (Variable or Value, Base Value, Return Variable)

Arguments

Variable or Value

Passed number

Base Value

Base value to convert to

Return Variable

Number returned

Example

Function.Intrinsic.Math.LOGN(variable.local.angle,variable.local.return) 

Remarks


Function.Intrinsic.Math.Mod

Divides two numbers and returns only the remainder

Syntax

Function.Intrinsic.Math.MOD (Variable or Value, Mod # Variable or Value, Return Variable)

Arguments

Variable or Value

Numeric expression passed

Mod #

Number that will be used to “Mod”

Return Variable

Remainder is returned

Example

Function.Intrinsic.Math.MOD (10, 5, variable.local.return)
Variable.Local.Return = 0 

Remarks


Function.Intrinsic.Math.Mult

Multiplies numbers together

Syntax

Function.Intrinsic.Math.MULT (Variable or Value, …, Variable or value, Return Variable)

Arguments

Variable or Value

Number passed to be multiplied. You can pass as many variables or values as needed, separated by commas.

Return Variable

Returns the multiplied value

Example

Function.Intrinsic.Math.MULT(2, 45, 6,variable.local.return)
Variable.local.Return = 540 

Remarks

  • Unlimited number of variables or values can be passed and multiplied.


Function.Intrinsic.Math.PolarToX

Syntax

Function.Intrinsic.Math.PolarToX(Theta,Radius, Ret X)

Arguments

Theta

Float type

Radius

Float Type

Return X

Float Variable Type

Example

Function.Intrinsic.Math.PolarToX(theta,radius,variable.local.x) 

Remarks


Function.Intrinsic.Math.PolarToY

Syntax

Function.Intrinsic.Math.PolarToY(Theta,Radius, Return Y)

Arguments

Theta

Float type

Radius

Float Type

Return Y

Float Variable Type

Example

Function.Intrinsic.Math.PolarToX(theta,radius,variable.local.y) 

Remarks


Function.Intrinsic.Math.RadToDeg

Converts Radians to Degrees

Syntax

Function.Intrinsic.Math.RADTODEG (Variable or Value, Return Variable)

Arguments

Variable or Value

Number in Radians to convert to degrees

Return Variable

Converted number to Degrees

Example

Function.Intrinsic.Math.RADTODEG (variable.local.rad, variable.local.return)
Variable.local.return = 30 

Remarks


Function.Intrinsic.Math.RectToRad

Syntax

Function.Intrinsic.Math.RectToRad(X,Y,Ret radius)

Arguments

X

Float variable or value

Y

Float variable or value

Ret radius

Float variable

Example

Function.Intrinsic.Math.RectToRad(23.5,14.2,variable.local.rad)

Remarks


Function.Intrinsic.Math.RectToTheta

Syntax

Function.Intrinsic.Math.RectToTheta(X,Y,Ret Theta)

Arguments

X

Float variable or value

Y

Float variable or value

Ret theta

Float variable

Example

Function.Intrinsic.Math.RectToRad(23.5,14.2,variable.local.theta)

Remarks


Function.Intrinsic.Math.Rnd

Syntax

Function.Intrinsic.Math.Rnd(low [float], high [float], float return)

Arguments

low

float

high

float

float return

Examples

Remarks


Function.Intrinsic.Math.Round

Returns a number rounded to a specific number of decimal places. The rule used with this command is commonly referred to as the 'Banker's Rule'. When the first digit dropped is 5 and there are no digits following or the digits following are zeros, make the preceding digit even (i.e. round off to the nearest even digit). E.g., 2.315 and 2.325 are both 2.32 when rounded off to the nearest hundredth.

Syntax

Function.Intrinsic.Math.ROUND (Variable or Value, Decimal Places, Return Value) or

Function.Intrinsic.Math.ROUND (Variable or Value, Decimal Places, mode, Return Value)

Arguments

Variable or Value

Numeric Expression being rounded

Decimal Places

Number indicating how many places to the right of the decimal are included in the rounding. If omitted, integers are returned by the Round function

Mode (optional)

0 - Banker's Rule, 1 - Half-up

Return Variable

Number returned meeting the rounding criteria set in the function.

Example

Function.Intrinsic.Math.Round (56.2389, 2, variable.local.TextA)
TextA = 56.24 

Remarks

  • The rationale for this rule is that approximately half of the time the number will be rounded up and the other half of the time it will be rounded down.

therefore:

round(4.45,1) = 4.4

but

round(4.55,1) = 4.6


Function.Intrinsic.Math.Sec

Secant

Syntax

Function.Intrinsic.Math.SEC (Variable or Value, Return Value)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians.

Example

Function.Intrinsic.Math.SEC(variable.local.angle,variable.local.return) 

Remarks


Function.Intrinsic.Math.Sgn

Returns a Variant (Integer) indicating the sign of a number.

Syntax

Function.Intrinsic.Math.SNG (Variable or Value, Return Value)

Arguments

Variable or Value

The required Variable can be any valid numeric expression

Return Value

Integer Variable

If number is - Sgn Returns

> zero - 1

= zero - 0

< zero - -1

Example

Function.Intrinsic.Math.SNG (-23, variable.local.return)
Variable.local.return = (-)

Remarks

  • The sign of the variable argument determines the return value of the Sgn function.


Function.Intrinsic.Math.Sin

The Sin function takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite the angle divided by the length of the hypotenuse.

Syntax

Function.Intrinsic.Math.SIN (Variable or Value, Return Value)

Arguments

Passed variable

Variable or value for Angle in radians

Return Variable

Variable returned in Radians.

Example

Function.Intrinsic.Math.SIN(variable.local.angle,variable.local.return)

Remarks

  • The result lies in the range -1 to 1.
  • To convert degrees to radians, multiply degrees by pi/180. To convert radians to degrees, multiply radians by 180/pi.


Function.Intrinsic.Math.Sqr

Returns a Double specifying the square root of a number

Syntax

Function.Intrinsic.Math.SQR (Variable or Value, Return Value)

Arguments

Variable or Value

The required Variable argument is a Double or any valid numeric expression greater than or equal to zero.

Return Value

Number variable is returned (integer)

Example

Function.Intrinsic.Math.SQR (4, variable.local.return)
Variable.local.return = 16 

Remarks


Function.Intrinsic.Math.StandardDeviation

Syntax

Function.Intrinsic.Math.StandardDeviation(numeric array, float return [float])

Arguments

numeric array
float return

float

Examples

Remarks


Function.Intrinsic.Math.Sub

Subtraction Function

Syntax

Function.Intrinsic.Math.SUB (Variable or Value,…,Variable or Value, Return Variable)

Arguments

Variable or Value

Number passed to subtract. Can pass as many variables or value delimited by commas.

Return Variable

The answer to the subtraction problem

Example

Function.Intrinsic.Math.SUB (34, 12, variable.local.return)
Variable.local.return = 22 

Remarks


Function.Intrinsic.Math.Tan

Returns the tangent of an angle.

Syntax

Function.Intrinsic.Math.TAN (Variable or Value, Return Variable)

Arguments

Variable or Value

Variable representing the angle in radians

Return Variable

Return variable is in radians

Example

Function.Intrinsic.Math.Tan(1.3, Variable.local.Var1) 

Remarks

  • Define angle in radians, can use F.I.Math.DegToRad ( )
  • Tan takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle.


Function.Intrinsic.Math.UnitConVersion

Syntax

Function.Intrinisic.Math.UnitConversion(Value, Conversion, Return Variable)

Arguments

Value

Value of what needs to be converted

Conversion

C2F, F2C Centigrade to Fahrenheit and the reverse

CM2IN, IN2CM Centimeter to Inches and the reverse

M2FT, FT2M Meter to Feet and the reverse

KG2LB, LB2KG Kilograms to pounds and the reverse

KM2MI, MI2KM Kilometers to Miles and the reverse

Ft2In - converts feet to inches

In2Ft - converts inches to feet

In2M - converts inches to meters

M2In - converts meters to inches

Return Variable

A variable (float or long) for the return value

Example

V.local.fCM.declare(Float)
v.local.fIn.Declare(Float)
v.local.fCM.set(15.2)
Function.Intrinisic.Math.UnitConversion(v.local.fCM,”CM2IN”, v.local.fIn)
Returns v.local.fIn = 5.98425 

Remarks


Function.Intrinsic.Math.XToY

X to Y function

Syntax

Function.Intrinsic.Math.XTOY (Variable or Value, Variable or value, Return Variable)

Arguments

Variable or value

Number to apply raise

Variable or value

Raises the first variable to this number

Return Variable

Returns the numeric answer to the function

Example

Function.Intrinsic.Math.XTOY (9, 2, variable.local.return)
Variable.local.return = 81
Function.Intrinsic.Math.XTOY (9, .5, variable.local.return)
Variable.local.return = 3 ‘square root of number 

Remarks

  • Raise first variable to the power of the second


Function.Intrinsic.PDT.PlayBack

Function.Intrinsic.PDT.PlayBack

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.PDT.PlayBackFile

Function.Intrinsic.PDT.PlayBackFile

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.PDT.PlayBackID

Function.Intrinsic.PDT.PlayBackID

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.PDT.Record

Function.Intrinsic.PDT.Record

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Printer.Cancel

Immediately terminates the current print job.

Syntax

Function.Intrinsic.Printer.Cancel

Arguments

Examples

Remarks

  • The object placeholder represents an object expression that evaluates to an object in the Applies To list.
  • If the operating system's Print Manager is handling the print job (the Print Manager is running and has background printing enabled), Cancel deletes the current print job and the printer receives nothing.
  • If Print Manager isn't handling the print job (background printing isn't enabled), some or all of the data may be sent to the printer before Cancel can take effect. In this case, the printer driver resets the printer when possible and terminates the print job.


Function.Intrinsic.Printer.Circle

The Circle method draws a variety of circular and elliptical (oval) shapes. In addition, Circle draws arcs (segments of circles) and pie-shaped wedges. You can produce many kinds of curved lines using variations of the Circle method.

To draw a circle, Visual Basic needs the location of a circle’s center and the length of its radius.

Syntax

Function.Intrinsic.printer.Circle (x, y, radius, color) or

Function.Intrinsic.printer.Circle (x, y, radius, color, start, end, aspect)

Arguments

X

X Postion for the center for the circle

Y

Y position for the center of the circle

Radius

Radius of circle

Color

Color of the circle

Start

Start position in Radians

End

End position in Radians

Aspect

W/H

Example

Function.Intrinsic.Printer.Circle (230,500,50, “Black”)
Draws a black circle at 230,500, that has a radius of 50 

Remarks

  • Start and End must be in Radians can use the DegtoRad function.
  • Circles are drawn counter clockwise


Function.Intrinsic.Printer.Finished

Terminates a print operation sent to the Printer object, releasing the document to the print device or spooler.

Syntax

Function.Intrinsic.Printer.Finished

Arguments

Examples

Remarks

  • The object placeholder represents an object expression that evaluates to an object in the Applies To list.
  • If Finished is invoked immediately after the NewPage method, no additional blank page is printed.


Function.Intrinsic.Printer.Line

A function that draws a line for the printer

Syntax

Function.Intrinsic.Printer.Line (x1, y1, x2, y2, color) or

Function.Intrinsic.Printer.Line (x1, y1, x2, y2, color, b or bf)

Arguments

X1

First X position

Y1

First Y position

X2

Second X position

Y2

Second Y position

Color

Color of circle use the Variable.Color syntax

B or BF

B = , or BF = Fill

Example

Function.Intrinsic.Printer.Line(100,100,600,100,variable.color.Black)

Remarks


Function.Intrinsic.Printer.NewPage

Ends the current page and advances to the next page on the Printer object

Syntax

Function.Intrinsic.Printer.NewPage

Arguments

Examples

Remarks

NewPage advances to the next printer page and resets the print position to the upper-left corner of the new page. When invoked, NewPage increments the Printer object's Page property by 1.


Function.Intrinsic.Printer.PaintPicture

Syntax

Function.Intrinsic.Printer.PaintPicture (PictureFileName,x, y, width, height)

Arguments

======PictureFileName======Fully Qualified Name of picture file

X

X Start position

Y

Y Start Position

Width

Width of Picture

Height

Height of picture

Example

Function.Intrinsic.Printer.PaintPicture (“C:\Picture.jpg”,100,100,600,600) 

Remarks

  • X or Y is a number or a string (the string can only be +/- or a variable)


Function.Intrinsic.Printer.Position

Moves print position

Syntax

Function.Intrinsic.Printer.Position (x, y)

Arguments

X

X Position

Y

Y Position

Example

Function.Intrinsic.Printer.Position (450,400)

Remarks

If either x or y is left blank then that part of the position will not change. X or Y is a number or a string (the string can only be +/- or a variable). When X or Y has a + or – sign in front of the number then the position of the current X or Current Y will be changed by that number, left for – and right for +. When neither a + or a – is in front of the number then that becomes the position for the print position.


Function.Intrinsic.Printer.PrintListView

Syntax

Function.Intrinsic.Printer.PrintListView(Form Name, Control Name, Caption, Color, End Doc)

Arguments

Form Name

String value of Form Name

Control Name

String value of Listview Control Name

Caption

String value for Caption of Listview

Color

Boolean –1 to use Index colors

End Doc

Boolean – 1 to end Printing

Example

Function.Intrinsic.Printer.PrintListView(“F_List”, “lsvCustomer”, “Customer List”, False, True)

Remarks


Function.Intrinsic.Printer.PrintNRet

Writes a text line to the printer, and allows the user to add information to the same line

Syntax

Function.Intrinsic.Printer.PRINTNRET (Text)

Arguments

Text

Line to be written to the Printer (variable or value)

Example

Function.Intrinsic.Printer.PrintNRet(“This is a test”)

Remarks

  • Same as a Printer.Print Text; meaning that the user will continue to write info to the same line for the printer.


Function.Intrinsic.Printer.PrintRet

Writes a text line to the printer

Syntax

Function.Intrinsic.Printer.PRINTRET (Text)

Arguments

Text

Text for the line to go to the printer (variable or value)

Example

Function.Intrinsic.Printer.PrintRet (“This is a test”)

Remarks

  • Same as a Printer.Print text


Function.Intrinsic.Printer.PSet

Draws a dot

Syntax

Function.Intrinsic.Printer.PSet (x, y, color)

Arguments

X

X Position

Y

Y Position

Color

Specified Color, use the Variable.Color syntax

Example

Function.Intrinsic.Printer.Pset (350, 350, variable.color.Red) 

Remarks

  • Draws Dot in a specified color


Function.Intrinsic.Printer.SelectPrinterbyNameExact

Selects printer by name passed

Syntax

Function.Intrinsic.Printer.SELECTPRINTERBYNAMEEXACT (Printer Name, Boolean variable)

Arguments

Printer Name

Name of the printer

Boolean Variable

Returns True or False to say if the Printer exists

Example

Function.Intrinsic.Printer.SelectPrinterByNameExact (“HP 4000”,variable.local.bPrinter)

Remarks

Boolean returns True (Printer Found) or False (Printer Not Found)


Function.Intrinsic.Printer.SelectPrinterbyNameFragment

Selects printer by name passed

Syntax

Function.Intrinsic.Printer.SELECTPRINTERBYNAMEFRAGMENT (Printer Name, Boolean variable)

Arguments

Printer Name

Name of the printer

Boolean Variable

Returns True or False to say if the Printer exists

Example

Function.Intrinsic.Printer.SelectPrinterByNameFragment (“HP”,variable.local.bPrinter)

Remarks

  • Compares Printer name to list of printers and matches when there is part of the text found
  • Boolean returns T (Printer Found) or F (Printer Not Found)


Function.Intrinsic.Printer.SelectPrinterDiaLog

Shows a printer dialog box for selection. The return for the selection will be in v.ambient.PRINTERDIALOGSELECTION. The value will be ***CANCEL***, if no printer was selected.

Syntax

Function.Intrinsic.Printer.SELECTPRINTERDIALOG

Arguments

Examples

Remarks


Function.Intrinsic.Printer.SetCopyCount

Sends number of copies to print to the printer

Syntax

Function.Intrinsic.Printer.SetCopyCount (Number)

Arguments

Number

Is the number of copies to print

Example

Function.Intrinsic.Printer.SetCopyCount (3)
Tells the printer to print 3 copies of the document 

Remarks

  • Number is passed for the count


Function.Intrinsic.Printer.SetDefaultPrinter

This function sets the default printer for Windows, system-wide.  This can be useful for directing printed output from programs that you cannot control through passed parameters.  Note: It is a good idea to use this in conjunction with Variable.Printer.DefaultPrinter, to reset the default printer when finished.

Syntax

Function.Intrinsic.Printer.SetDefaultPrinter(printer name)

Arguments

printer name

Examples

Remarks


Function.Intrinsic.Printer.SetFont

Sets font for the text being printed

Syntax

Function.Intrinsic.Printer.SetFont (Name, Size)

Arguments

Name

Font name such as “Arial”

Size

Size of the font such as 10

Example

Function.Intrinsic.Printer.SetFont (“Times New Roman”, 11 )
Returns text that is Times New Roman that is 11 pt.

Remarks


Function.Intrinsic.Printer.SetFontStyle

Sets the font style for the text being printed

Syntax

Function.Intrinsic.Printer.SetFont (Bold, Italic, Underline, Strikethrough, transparent)

Arguments

Bold

Boolean variable or value of True and false

Italic

Boolean variable or value of True and false

Underline

Boolean variable or value of True and false

Strikethrough

Boolean variable or value of True and false

Transparent

Boolean variable or value of True and false

Example

Function.Intrinsic.Printer.SetFont (True, True, ,,False)
Returns text that is Bold, and Italic 

Remarks

  • Pass a True or False for each font style that you want active, you can comma past a style type that you don’t want.


Function.Intrinsic.Printer.SetForeColor

Sets the fore color of the document

Syntax

Function.Intrinsic.Printer.SetForeColor (Long Variable)

Arguments

Long Variable

Number of the color

Example

Function.Intrinsic.Printer.SetForeColor(variable.local.iColor)

Remarks

  • Passing a long shows the color


Function.Intrinsic.Printer.SetOrientation

Sets the orientation of the paper being printed

Syntax

Function.Intrinsic.Printer.SetOrientation (1 or 2)

Arguments

1 or 2

1 for Portrait and 2 for Landscape

Example

Function.Intrinsic.Printer.SetOrientation (2)
Prints the document in Landscape mode 

Remarks


Function.Intrinsic.Printer.SetPaperBin

Set Paper tray the printer will use.

Syntax

Function.Intrinsic.Printer.SetPaperBin (Bin #)

Arguments

Bin #

1 Use paper from the upper bin

2 Use paper from the lower bin

3 Use paper from the middle bin

4 Wait for manual insertion of each sheet of paper

5 Use envelopes from the envelope feeder

6 Use envelopes from the envelope feeder, but wait for manual insertion

7 (Default) Use paper from the current default bin

8 Use paper from the tractor feeder

9 Use paper from the small paper feeder

10 Use paper from the large paper bin

11 Use paper from the large capacity feeder

12 Use paper from the attached cassette cartridge

Example

Function.Intrinsic.Printer.SetPaperBin (2)
Printer will use the paper from the lower tray 

Remarks

  • Not all of the bin options are available on every printer. Check the printer documentation for more specific descriptions of these options.


Function.Intrinsic.Printer.TextSize

Allows you to select the length of a line of text

Syntax

Function.Intrinsic.Printer.TextSize (Pass Text, Return width, return height)

Arguments

Example

Function.Intrinsic.Printer.TextSize (“This is a test of text size.”, Return width, return height) 

Remarks

  • Width and height is returned as a single


Function.Intrinsic.String.Asc

Gives the Ascii value of one character

Syntax

Function.Intrinsic.String.Asc (Pass Text string)

Arguments

Text

String Variable or value

Example

Function.Intrinsic.String.Asc (“T”)
Returns 84 

Remarks

  • You can pass more than one character, but the function will only return the Ascii of the first character passed.


Function.Intrinsic.String.Base36Increment

Syntax

Function.Intrinsic.String.Base36Increment(String in, string return)

Arguments

String in
string return

Examples

Remarks


Function.Intrinsic.String.Base62Decode

This function converts a base-62 string (generated with Function.Intrinsic.String.Base62Encode), and returns a long integer value.  Note: This has nothing to do with Base-64 encoding/decoding

Syntax

Function.Intrinsic.String.Base62Decode(string, long return)

Arguments

string
long return

Examples

Remarks


Function.Intrinsic.String.Base62Encode

This function converts a long integer into a base-62 string, using 0-9, a-z, and A-Z.  This can be used in instances where it is necessary to store a numeric value in a narrow string field.  Note: This has nothing to do with Base-64 encoding/decoding

Syntax

Function.Intrinsic.String.Base62Encode(long, string return)

Arguments

long
string return

Examples

Remarks


Function.Intrinsic.String.Build

This function takes a base string with wildcard placeholders {0}, {1}, {2}, etc. and replaces them with the passed arguments. The composite string is returned in the final argument. Any number of arguments may be passed. Also, all references to a specific wildcard are replaced.

Syntax

Function.Intrinsic.String.Build(base string, arg1, argn, ret)

Arguments

Example

Remarks

  • Null checks and variable transforms are not necessary when using Function.Intrinsic.String.Build, as these conditions are handled automatically.


Function.Intrinsic.String.CalculateMD5Hash

Calculates the Hash

Syntax

Function.Intrinsic.String.CalculateMD5Hash(String, Boolean Return)

Arguments

String

Variable or value

String Return

Variable of String Data Type

Example

Function.Intrinsic.String.CalculateMD5Hash(“G8SGj3”, variable.local.sHash)

Remarks


Function.Intrinsic.String.CalculateSHA1Hash

Calculates the Hash for a passed string

Syntax

Function.Intrinsic.String.CalculateSHA1Hash(String, Boolean Return)

Arguments

String

Variable or value

String Return

Variable of String Data Type

Example

Function.Intrinsic.String.CalculateSHA1Hash(“G8SGj3”, variable.local.sHash)

Remarks


Function.Intrinsic.String.Chunk

Returns a string combining a string array

Syntax

Function.Intrinsic.String.Chunk (String Array, String Variable)

Arguments

String Array

Variable or value that is a string array

String Variable

Variable for the return combined string array

Example

Function.intrinsic.string.split(“T”!”his”!” is what “!”you need to see”,”!”,Variable.local.sArray)
Function.Intrinsic.String.Chunk (variable.local.sArray,variable.local.textA)
Returns TextA =”This is what you need to see” 

Remarks


Function.Intrinsic.String.Column2Ordinal

Function.Intrinsic.String.Column2Ordinal

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.String.ColumnToOrdinal

Syntax

Function.Intrinsic.String.ColumnToOrdinal(column, ret)

Arguments

Example

Remarks

  • This command can be used with MS Excel and OO Calc, to determine the numeric ordinal from an alpha column name. This command is zero-based, so column "a" will return an ordinal of 0, while a column of "ab" will return an ordinal of 27.
  • This is the reciprocal command of Function.Intrinsic.String.OrdinalToColumn.


Function.Intrinsic.String.Concat

Forces string concatenation of two or more expressions

Syntax

Function.Intrinsic.String.Concat (Value or variables, Value or variables, …,return variable)

Arguments

Value or Variable

String to concatenate can have multiples

Return Variable

String variable to return combined strings

Example

Function.Intrinsic.String.Concat (“T”, “his”, “ is what “,”you need to see”, variable.local.textA)
Returns TextA =”This is what you need to see” 

Remarks

  • You do not have to convert everything to a string for the function to work.


Function.Intrinsic.String.ConcatCallWrapperArgs

Function.Intrinsic.String.ConcatCallWrapperArgs

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.String.ConcatChr

Forces string concatenation of two expressions adding a character in between each section.

Syntax

Function.Intrinsic.String.ConcatChr (Value or variables, Ascii, return variable)

Arguments

Variable or Value

String variable or text to combine

Ascii

Ascii value to insert between strings

Return variable

String variable returns the combination

Example

Function.Intrinsic.String.ConcatChr (“This is what you need to see”, 33, variable.local.textA)
Returns TextA =”This is what you need to see!” 

Remarks

  • You do not have to convert everything to a string for the function to work.


Function.Intrinsic.String.ConcatEOL

Forces string concatenation of two expressions adding a return carriage at the end of the section.

Syntax

Function.Intrinsic.String.ConcatEOL (Value or variable, return variable)

Arguments

Value or variable

String variable or text to add a return carriage to the end of.

Return Variable

String variable returning the combined text

Example

Function.Intrinsic.String.ConcatEOL (“This is what you need to see”, variable.local.textA)
Returns TextA =”This is what you need to see”

Remarks

  • You do not have to convert everything to a string for the function to work. The return carriage is the same as having a crlf in between each section.


Function.Intrinsic.String.ConvertCurrencyValueToSpanish

This function converts a passed string value (ex. 400.25), to the equivalent long-hand value text.  The currency name is a passed argument (ex. solas or pesos).  Optionally, the thousands and decimal separators may be passed.  If they are not passed explicitly, the values for the workstation will be used.  Those values can alternatively be read with F.In.UI.GetLocaleSetting using "STHOUSAND" and "SDECIMAL", respectively.

Syntax

Function.Intrinsic.String.ConvertCurrencyValueToSpanish(string in, currency name, string return)

Function.Intrinsic.String.ConvertCurrencyValueToSpanish(string in, currency name, thousands separator, decimal separator, string return)

Arguments

string in
currency name
thousands separator
decimal separator
string return

Examples

Remarks


Function.Intrinsic.String.ConvertDec2Hex

Syntax

Function.Intrinsic.Sting.ConvertDec2Hex(numeric variable or value, string return)

Arguments

Numeric variable or value

Number in decimal to convert to hexadecimal

String Return

Variable for the returned string value

Example

Function.Intrinsic.String.ConvertDec2Hex(235.1,variable.local.sHex)
‘Returns “EB” 

Remarks


Function.Intrinsic.String.ConvertHex2Dec

Syntax

Function.Intrinsic.Sting.ConvertHex2Dec(String variable or value, numeric return)

Arguments

String variable or value

Number in decimal to convert to hexadecimal

Numeric Long Return

Variable for the returned string value

Example

Function.Intrinsic.String.ConvertDec2Hex(“FD”,variable.local.fHex)
Returns 253.6 

Remarks


Function.Intrinsic.String.ConvertInLineDecimalS2Fractions

Function.Intrinsic.String.ConvertInLineDecimalS2Fractions

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.String.ConvertInLineDecimalsToFractions

This function returns a string with all of the decimal components replaced with the fractional equivalents. Optionally, the desired accuracy can be supplied; if not value for accuracy is provided, .001 is used. This function, unlike Function.Intrinsic.Math.DecimalToFraction, leaves the whole number portion intact, without converting it to the fractional equivalent.

Syntax

Function.Intrinsic.String.ConvertInlineDecimalsToFractions(string in, string return) or

Function.Intrinsic.String.ConvertInlineDecimalsToFractions(string in, accuracy, string return)

Arguments

Example

Remarks

  • The accuracy value may need to be adjusted up or down, depending on the floating-point precision present in the provided value.


Function.Intrinsic.String.ConvertInlineDecimalsToFractions

This function returns a string with all of the decimal components replaced with the fractional equivalents.  Optionally, the desired accuracy can be supplied; if not value for accuracy is provided, .001 is used.  This function, unlike Function.Intrinsic.Math.DecimalToFraction, leaves the whole number portion intact, without converting it to the fractional equivalent. Note: The accuracy value may need to be adjusted up or down, depending on the floating-point precision present in the provided value.

Syntax

Function.Intrinsic.String.ConvertInlineDecimalsToFractions(string in, accuracy, string return)

Function.Intrinsic.String.ConvertInlineDecimalsToFractions(string in, string return)

Arguments

string in
string return)

Examples

Remarks


Function.Intrinsic.String.ConvertToString

Syntax

Function.Intrinsic.String.ConvertToString(Expression, Return String)

Arguments

Expression

Variant expression to be converted

Return String

Converted Expression

Example

Variable.local.vpass.set(12234)
Function.Intrinsic.String.ConvertToString(variable.local.vpass,variable.local.sReturn)

Remarks


Function.Intrinsic.String.DateString

Converts a date to a string

Syntax

Function.Intrinsic.String.DateString(date, Ret String)

Arguments

Date

Date

String

String Variable format(yyyymmdd)

Example

Function.Intrinsic.String.DateString(variable.ambient.now, variable.local.sDate) 

Remarks

  • Pass a date and have a string passed in the “yyyymmdd” format.


Function.Intrinsic.String.DecodeUTF8

Converts a UTF8 into a ANSI string

Syntax

Function.Intrinsic.String.DECODEUTF8(Passed String Variable, Return Variable)

Arguments

Passed String Variable

UTF8 String to be converted

Return Variable

Converted ANSI String

Example

Remarks


Function.Intrinsic.String.DelimitedStringtoCSV

This function renders a double-delimited input string into a CSV output string. All non-numeric values are delimited with quotation marks, indicating a string literal is contained within the delimiters. Quotation marks within the string literal are doubled, as a partial implementation of RFC 4180. CRLF is the row delimiter.

Syntax

Function.Intrinsic.String.DelimitedStringToCSV(delimited string, row delimiter, field delimiter, string return)

Arguments

Example

Program.Sub.Main.Start
 v.lo.sIn.declare(string)
 v.lo.sOut.declare(string)
 v.lo.sIn.set("1,2,3,4,5,6,7,8|a,b,c,d,e,f,g,h")
 f.in.string.delimitedstringtocsv(v.lo.sIn,"|",",",v.lo.sOut)
 f.in.file.stringtofile("c:\gab.csv",v.lo.sOut)
Program.Sub.Main.End 

Remarks

  • Note: In accordance with RFC 4180, numeric values will not be marked as string literals, regardless of the source data type of the value.


Function.Intrinsic.String.DelimitedStringToCSV

This function renders a double-delimited input string into a CSV output string.  All non-numeric values are delimited with quotation marks, indicating a string literal is contained within the delimiters.  Quotation marks within the string literal are doubled, as a partial implementation of RFC 4180.  CRLF is the row delimiter. Note: In accordance with RFC 4180, numeric values will not be marked as string literals, regardless of the source data type of the value.

Syntax

Function.Intrinsic.String.DelimitedStringToCSV(delimited string, row delimiter, field delimiter, string return)

Arguments

delimited string
row delimiter
field delimiter
string return

Examples

Remarks


Function.Intrinsic.String.DoubleDelimitedSeek

This function splits the double delimited string and returns the value of the search variable. Inner delimiter separates the variable and the value and Outer delimiter separates each pair of variable and value from the other. Function performs case sensitive search if case is set to 0, and ignores case, if its set to 1. User has to specify the default that will be returned if the search variable is not found in the double delimited string.

Syntax

Function.Intrinsic.String.DoubleDelimitedSeek(Double Delim string, Outer Delim, Inner Delim, Search Variable, Case, String Default, String Return)

Arguments

Double Delim string
Outer Delim
Inner Delim
Search Variable
Case
String Default
String Return

Examples

Remarks


Function.Intrinsic.String.ExtractHTMLLinks

Creates an array of HTML Links from a passed String

Syntax

Function.Intrinsic.String.ExtractHTMLLinks(Passed String, Ret Array) or

Function.Intrinsic.String.ExtractHTMLlinks(HTML string, ret title array, ret link array)

Arguments

Passed String

String Passed

Ret Array

String Array returned

Example

Function.Intrinsic.String.ExtractHTMLLinks(variable.local.sText, Variable.Local.sRetA)    

Remarks

  • Can be used with Function.Intrinsic.File.Readfile, the return string would be the passed string for this function.


Function.Intrinsic.String.Format

The Format function allows the user to change how data is displayed. Date/Time

Syntax

Function.Intrinsic.String.Format (passed Variable, Format mask, Return Variable)

Example

The following procedure formats a date by using both built-in and custom formats:
Function.Intrinsic.String.Format(Date, "ddd, mmm d, yyyy", Variable.local.retDate)
  ‘Returns Variable.Local.retDate = “Monday, November 27, 2006” 

Remarks

  • You can use predefined formats to format a date by calling the FormatDateTime function, or you can create a custom format for a date by using the Format function.
  • First Day of the week settings

0 Use NLS API Setting

1 Sunday (Default)

2 Monday

3 Tuesday

4 Wednesday

5 Thursday

6 Friday

7 Saturday

First Day of the year settings

0 Use NLS API Setting

1 Start with week in which January 1st occurs

2 Start with the first week that has at least 4 days in new year

3 Start with the first full week of the year.

Calendar Settings

Symbol Range

D 1 –30

Dd 1 – 30

Ww 1 – 51

Mmm Displays full month names

M - Displays month number

MM - Displays a 2 digit number for the month number

Y 1 – 355

YYYY 100 - 9666

Format - Description

- Time separator. In some locales, other characters may be used to represent the time separator. The time separator separates hours, minutes, and seconds when time values are formatted. The actual character used as the time separator in formatted output is determined by your system settings.

/ - Date separator. In some locales, other characters may be used to represent the date separator. The date separator separates the day, month, and year when date values are formatted. The actual character used as the date separator in formatted output is determined by your system settings.

c - Display the date as ddddd and display the time as ttttt, in that order. Display only date information if there is no fractional part to the date serial number; display only time information if there is no integer portion.

d - Display the day as a number without a leading zero (1 – 31).

dd - Display the day as a number with a leading zero (01 – 31).

ddd - Display the day as an abbreviation (Sun – Sat).

dddd - Display the day as a full name (Sunday – Saturday).

ddddd - Display the date as a complete date (including day, month, and year), formatted according to your system's short date format setting. The default short date format is m/d/yy.

dddddd - Display a date serial number as a complete date (including day, month, and year) formatted according to the long date setting recognized by your system. The default long date format is mmmm dd, yyyy.

aaaa - The same as dddd, only it's the localized version of the string.

w - Display the day of the week as a number (1 for Sunday through 7 for Saturday).

ww - Display the week of the year as a number (1 – 54).

m - Display the month as a number without a leading zero (1 – 12). If m immediately follows h or hh, the minute rather than the month is displayed.

mm - Display the month as a number with a leading zero (01 – 12). If m immediately follows h or hh, the minute rather than the month is displayed.

mmm - Display the month as an abbreviation (Jan – Dec).

mmmm - Display the month as a full month name (January – December).

oooo - The same as mmmm, only it's the localized version of the string.

q - Display the quarter of the year as a number (1 – 4).

y - Display the day of the year as a number (1 – 366).

yy - Display the year as a 2-digit number (00 – 99).

yyyy - Display the year as a 4-digit number (100 – 9999).

h - Display the hour as a number without leading zeros (0 – 23).

Hh - Display the hour as a number with leading zeros (00 – 23).

N - Display the minute as a number without leading zeros (0 – 59).

Nn - Display the minute as a number with leading zeros (00 – 59).

S - Display the second as a number without leading zeros (0 – 59).

Ss - Display the second as a number with leading zeros (00 – 59).

t t t t t - Display a time as a complete time (including hour, minute, and second), formatted using the time separator defined

by the time format recognized by your system. A leading zero is displayed if the leading zero option is selected and the time is before 10:00 A.M. or P.M. The default time format is h:mm:ss.

am/pm - Use the 12-hour clock and display a lowercase AM with any hour before noon; display a lowercase PM with any hour between noon and 11:59 P.M.

A/P - Use the 12-hour clock and display an uppercase A with any hour before noon; display an uppercase P with any hour between noon and 11:59 P.M.

a/p - Use the 12-hour clock and display a lowercase A with any hour before noon; display a lowercase P with any hour between noon and 11:59 P.M.

AMPM - Use the 12-hour clock and display the AM string literal as defined by your system with any hour before noon;

display the PM string literal as defined by your system with any hour between noon and 11:59 P.M. AMPM can be either uppercase or lowercase, but the case of the string displayed matches the string as defined by your system settings. The default format is AM/PM.

Number

Syntax

Function.Intrinsic.String.Format(Long/Float, Format, Ret Variable)

Arguments

Long/Float

Number passed to format

Format
“#”, “.”, 0
Ret Variable

Float/Long to return formatted number

Example

Function.Intrinsic.String.Format(100,”####.00”, variable.local.fNum)
‘Returns Variable.Local.fNum=100.00 

Remarks

  • You may find this useful when dealing with F.In.String.Format, browser formatting, and GSFlexGrid styles.

Format - Description

@ - Character placeholder. Display a character or a space. If the string has a character in the position where the at symbol (@) appears in the format string, display it; otherwise, display a space in that position. Placeholders are filled from right to left unless there is an exclamation point character (!) in the format string.

& - Character placeholder. Display a character or nothing. If the string has a character in the position where the ampersand (&) appears, display it; otherwise, display nothing. Placeholders are filled from right to left unless there is an exclamation point character (!) in the format string.

< - Force lowercase. Display all characters in lowercase format.

> - Force uppercase. Display all characters in uppercase format.

! - Force left to right fill of placeholders. The default is to fill placeholders from right to left.

0 - Digit placeholder. Display a digit or a zero. If the expression has a digit in the position where the 0 appears in the format string, display it; otherwise, display a zero in that position. If the number has fewer digits than there are zeros (on either side of the decimal) in the format expression, display leading or trailing zeros. If the number has more digits to the right of the decimal separator than there are zeros to the right of the decimal separator in the format expression, round the number to as many decimal places as there are zeros. If the number has more digits to the left of the decimal separator than there are zeros to the left of the decimal separator in the format expression, display the extra digits without modification.

  1. - Digit placeholder. Display a digit or nothing. If the expression has a digit in the position where the # appears in the format string, display it; otherwise, display nothing in that position. This symbol works like the 0 digit placeholder, except that leading and trailing zeros aren't displayed if the number has the same or fewer digits than there are # characters on either side of the decimal separator in the format expression.

. - Decimal placeholder. In some locales, a comma is used as the decimal separator. The decimal placeholder determines how many digits are displayed to the left and right of the decimal separator. If the format expression contains only number signs to the left of this symbol, numbers smaller than 1 begin with a decimal separator. To display a leading zero displayed with fractional numbers, use 0 as the first digit placeholder to the left of the decimal separator. The actual character used as a decimal placeholder in the formatted output depends on the Number Format recognized by your system.

% - Percentage placeholder. The expression is multiplied by 100. The percent character (%) is inserted in the position where it appears in the format string.

, - Thousand separator. In some locales, a period is used as a thousand separator. The thousand separator separates thousands from hundreds within a number that has four or more places to the left of the decimal separator. Standard use of the thousand separator is specified if the format contains a thousand separator surrounded by digit placeholders (0 or #). Two adjacent thousand separators or a thousand separator immediately to the left of the decimal separator (whether or not a decimal is specified) means "scale the number by dividing it by 1000, rounding as needed." For example, you can use the format string "##0,," to represent 100 million as 100. Numbers smaller than 1 million are displayed as 0. Two adjacent thousand separators in any position other than immediately to the left of the decimal separator are treated simply as specifying the use of a thousand separator. The actual character used as the thousand separator in the formatted output depends on the Number Format recognized by your system.

E- E+ e- e+ - Scientific format. If the format expression contains at least one digit placeholder (0 or #) to the right of E-, E+, e-, or e+, the number is displayed in scientific format and E or e is inserted between the number and its exponent. The number of digit placeholders to the right determines the number of digits in the exponent. Use E- or e- to place a minus sign next to negative exponents. Use E+ or e+ to place a minus sign next to negative exponents and a plus sign next to positive exponents.

- + $ ( ) - Display a literal character. To display a character other than one of those listed, precede it with a backslash (\) or enclose it in double quotation marks (" ").

\ - Display the next character in the format string. To display a character that has special meaning as a literal character, precede it with a backslash (\). The backslash itself isn't displayed. Using a backslash is the same as enclosing the next character in double quotation marks. To display a backslash, use two backslashes (\\).

Examples of characters that can't be displayed as literal characters are the date-formatting and time-formatting characters (a, c, d, h, m, n, p, q, s, t, w, y, / and :), the numeric-formatting characters (#, 0, %, E, e, comma, and period), and the string-formatting characters (@, &, <, >, and !).

"ABC" - Display the string inside the double quotation marks (" "). To include a string in format from within code, you must use Chr(34) to enclose the text (34 is the character code for a quotation mark (")).


Function.Intrinsic.String.GSSPartString

Properly formats Part # and Revision for use in Global Shop

Syntax

Function.Intrinsic.String.GSSPARTSTRING(Part #, Revision, Return String)

Arguments

Part #

String

Revision

String

Return String

String Variable

Example

Remarks


Function.Intrinsic.String.HTMLTableFromUDT

This function creates an HTML table from the contents of a GAB UDT.

Syntax

Function.Intrinsic.String.HTMLTableFromUDT(UDT, UDT Elements, Column Headers, Table ID, Date Null, string return)

Arguments

UDT

(string) - this is the name of the UDT

UDT Elements

(string) - this is a delimited string (*!* separator) containing the ordered list of the UDT elements to include in the table. If this value is blank, all of the elements of the UDT will be included in the table, in no particular order.

Column Headers

(string) - this is a delimited string (*!* separator) containing the ordered column titles to display in the table. If this value is blank, no header row will be inserted in the table. If this value is ***USEUDT***, the column titles will be populated with the UDT element names

Table ID

(string) - this is the ID of the table to be generated. This value can be blank, but CSS formatting requires an ID (if there are multiple tables in a document)

Date Null

(boolean) - this specifies how null dates should be handled. If this value is True, 1/1/1900 and null dates will return as a blank value.

string return

(string) - this return value will contain the HTML block for the table

Examples

F.In.String.HTMLTableFromUDT(v.uGlobal.ucustomer,"sSCust*!*sECust","Starting Customer*!*Ending Customer","",false,v.lo.stable)

Remarks


Function.Intrinsic.String.InStr

Finds the position of specified text from a position of the users choice.

Syntax

Function.Intrinsic.String.Instr(Passed Var, Find String, Start Position, Return Value)

Arguments

Passed Var

String original text to be searched

Find String

Text that is to be found in Passed Variable

Start Position

Long/Int to show where you want to start looking

Return Value

Long to represent Position

Example

function.intrinsic.string.Instr(“Looking for an X”, “X”, 1,variable.local.retVal)
Returns variable.local.retVal = 16 

Remarks


Function.Intrinsic.String.InStrRev

Finds a string position from the end of a passed variable, can be used to cut off certain directory locations to swap them out for another. i.e. Go from Plugins to Files in the Global Directory

Syntax

Function.Intrinsic.String.InstrRev(Passed Var, Find String, Return Value)

Arguments

Passed Variable

String of original text to be searched

Find String

String/Text to be found in Passed Variable

Return Value

Long Represents the location from the end of the passed variable

Example

Function.Intrinsic.String.InstrRev(“C:\Global\Plugins”,”\Plugins”, variable.local.retVal)
Returns Variable.Local.retVal=10 

Remarks


Function.Intrinsic.String.IsInString

This function returns True if the specified substring is found in the passed base string. If the Text Compare boolean argument is set to True, the search will not be case-sensitive.

Syntax

Function.Intrinsic.String.IsInString(string in, substring, text compare boolean, boolean return)

Arguments

Example

Function.Intrinsic.String.IsInString("This is a string","is",True,v.local.bret)
Returns True 

Remarks


Function.Intrinsic.String.IsLower

This function returns a Boolean value to indicate if the passed string is comprised entirely of lower-case characters. Note: Non-alpha characters are considered case-less

Syntax

Function.Intrinsic.String.IsLower(string in, boolean return)

Arguments

string in
boolean return

Examples

Remarks


Function.Intrinsic.String.IsNullOrWhiteSpace

Function.Intrinsic.String.IsNullOrWhiteSpace

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.String.IsUpper

This function returns a Boolean value to indicate if the passed string is comprised entirely of upper-case characters. Note: Non-alpha characters are considered case-less

Syntax

Function.Intrinsic.String.IsUpper(string in, boolean return)

Arguments

string in
boolean return

Examples

Remarks


Function.Intrinsic.String.Join

This function can be used to pass arrays to called subroutines. Passed parameters can only hold one value, so a JOIN (in the calling sub), followed by a SPLIT (in the called sub), can be used to pass an array.

Syntax

Function.Intrinsic.String.Join(array, ret string) or

Function.Intrinsic.String.Join(array, delimiter, ret string)

Arguments

Example

Remarks


Function.Intrinsic.String.JoinCSV

Converts an array into a CSV String

Syntax

Function.Intrinsic.String.JOINCSV(Array, Boolean, Return String Variable)

Arguments

Array

Array to be converted into a CSV String

Boolean

Indicates whether or not all of the values in the array are supposed to be String values

Return String Variable

CSV String made up of elements of the array

Example

Remarks

  • If there are String elements in the array, assigning True to the boolean argument would place elements in double quotes to prevent error


Function.Intrinsic.String.LCase

LCASE

Returns a String that has been converted to lowercase.

Syntax

Function.intrinsic.String.LCase(string, return variable)

Arguments

string

Valid string expression.

Return variable

Returns converted string

Example

Function.Intrinsic.String.Lcase (“HELLO”, variable.local.Case)
returns variable.local.Case=”hello” 

Remarks

  • Only uppercase letters are converted to lowercase; all lowercase letters and nonletter characters remain unchanged.

PCASE

Returns a String that has been converted to having the first letter of every word Capitalized.

Syntax

Function.Intrinsic.String.PCase(string, return variable)

Arguments

string - Valid string expression.

Return variable - Returns converted string

Example

Function.Intrinsic.String.PCase (“HELLO”, variable.local.Case)
returns variable.local.Case=”Hello” 

Remarks

  • Only lowercase letters are converted to uppercase; all nonletter characters remain unchanged.

UCASE

Returns a Variant (String) containing the specified string, converted to uppercase.

Syntax

Function.intrinsic.String.UCase(string, return variable)

Arguments

string

Valid string expression.

Return variable

Returns converted string

Example

Function.Intrinsic.String.Ucase (“hello”, variable.local.Case)
‘returns variable.local.Case=” HELLO” 

Remarks

  • Only lowercase letters are converted to uppercase; all uppercase letters and nonletter characters remain unchanged.


Function.Intrinsic.String.LCase.UCase.PCase

LCASE

Returns a String that has been converted to lowercase.

Syntax

Function.intrinsic.String.LCase(string, return variable)

Arguments

string

Valid string expression.

Return variable

Returns converted string

Example

Function.Intrinsic.String.Lcase (“HELLO”, variable.local.Case)
returns variable.local.Case=”hello” 

Remarks

  • Only uppercase letters are converted to lowercase; all lowercase letters and nonletter characters remain unchanged.

PCASE

Returns a String that has been converted to having the first letter of every word Capitalized.

Syntax

Function.Intrinsic.String.PCase(string, return variable)

Arguments

string - Valid string expression.

Return variable - Returns converted string

Example

Function.Intrinsic.String.PCase (“HELLO”, variable.local.Case)
returns variable.local.Case=”Hello” 

Remarks

  • Only lowercase letters are converted to uppercase; all nonletter characters remain unchanged.

UCASE

Returns a Variant (String) containing the specified string, converted to uppercase.

Syntax

Function.intrinsic.String.UCase(string, return variable)

Arguments

string

Valid string expression.

Return variable

Returns converted string

Example

Function.Intrinsic.String.Ucase (“hello”, variable.local.Case)
‘returns variable.local.Case=” HELLO” 

Remarks

  • Only lowercase letters are converted to uppercase; all uppercase letters and nonletter characters remain unchanged.


Function.Intrinsic.String.Left

  1. Redirect Function.Intrinsic.String.Left.Mid.Right

Function.Intrinsic.String.Left

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.String.Left.Mid.Right

Left

Returns a Variant (String) containing a specified number of characters from the left side of a string.

Syntax

Function.Intrinsic.String.Left(string, length,return string)

Arguments

String - String expression from which the leftmost characters are returned. If string contains Null, Null is returned. Variable or value

Length - Variant (Long) Numeric expression indicating how many characters to return. If 0, a zero-length string (“”) is returned. If greater than or equal to the number of characters in string, the entire string is returned.

Return string - Is the return variable for the number characters requested from the String.

Example

Function.Intrinsic.String.Left (“What words will I return?”,10, variable.local.retvar)
Returns variable.local.retvar = “What words” 

Remarks

  • To determine the number of characters in string, use the Len function.

Mid

Returns a Variant (String) containing a specified number of characters from a string.

Syntax

Function.Intrinsic.String.Mid(passed variable string, start position, return variable) or

Function.Intrinsic.String.Mid(passed variable string, start position, ,length, return variable)

Arguments

String

String Expression from which characters are returned. If string contains Null, Null is returned.

Start

Required; Long Character position in string at which the part to be taken begins. If start is greater than the number of characters in string, Mid returns a zero-length string (“”).

Length

Required in Method 2; Variant (Long). Number of characters to return. If omitted or if there are fewer than length characters in the text (including the character at start), all characters from the start position to the end of the string are returned.

Return Var

Required; String returned with the number of characters requested from the start position given.

Example

Variable.local.retvar.declare (String)
Function.Intrinsic.String.Mid (“This is a Mid Test”, 5, variable.local.retvar)
Returns Variable.local.retvar = “is a Mid Test”
Function.Intrinsic.String.Mid (“This is a Mid Test”, 5, 7, variable.local.retvar)
Returns Variable.local.retvar = “is a Mi” 

Remarks

  • To determine the number of characters in string, use the Len function.

Right

Returns a Variant (String) containing a specified number of characters from the right side of a string.

Syntax

Function.Intrinsic.String.Right(string, length, return variable)

Arguments

String

String expression from which the leftmost characters are returned. If string contains Null, Null is returned. Variable or value

Length

Variant (Long) Numeric expression indicating how many characters to return. If 0, a zero-length string (“”) is returned. If greater than or equal to the number of characters in string, the entire string is returned.

Return string

Is the return variable for the number characters requested from the String.

Example

Function.Intrinsic.String.Right (“What words will I return?”,10, variable.local.retvar)
Returns variable.local.retvar = “ I return?” 

Remarks

  • To determine the number of characters in string, use the Len function.


Function.Intrinsic.String.Len

Returns the number of characters in a string or the number of bytes required to store a variable.

Syntax

Function.Intrinsic.String.Len(string, long integer returned)

Arguments

String

Any valid string expression. If string contains Null, Null is returned.

Long integer

Long integer that is returned for the count of the string

Example

Variable.local.Len.Declare (Long)
Function.Intrinsic.String.Len("VBSCRIPT", variable.local.len)
Returns variable.local.len = 8. 

Remarks


Function.Intrinsic.String.LimitSplit

Splits a string in passed length segments.

Syntax

Function.Intrinsic.String.LimitSplit(String, Length, Return Array)

Function.Intrinsic.String.LimitSplit(String, Length [long], hard split [boolean], return array [string])


Arguments

String

Any valid string expression. If string contains Null, Null is returned

Long Length

Long integer

Boolean Hard Split

Boolean value. True, The split occurs on the exact position within the string. False, the split occurs at the exact position if it will not split a word in two.

Return Array

String Array returned based on Split Criteria

Example

v.local.sArray.Declare(String)
Function.Intrinsic.String.LimitSplit("this is to show how the limit split functions", 5, variable.local.sArray)
Returns variable.local.sArray = “this“,”is to“,”show“,”how”,”the","limit”,”split”,”funct”,”ions”

Function.Intrinsic.String.LimitSplit("this is to show how the limit split functions", 5,True, variable.local.sArray)
Returns variable.local.sArray = “this “,”is to“,” show“,” how ”,”the l”,”imit ”,”split" func”,”tions”

Function.Intrinsic.String.LimitSplit("this is to show how the limit split functions", 5,False, variable.local.sArray)
Returns variable.local.sArray = “this“,”is to“,”show“,”how”,”the","limit”,”split”,”funct”,”ions”

Remarks


Function.Intrinsic.String.LPad

Function.Intrinsic.String.LPad

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.String.Lpad.Rpad

Returns a string from an expression, padded with spaces or characters to a specified length on the left or right sides, or both.

Syntax

LPAD – adding spaces to the left

Function.Intrinsic.String.LPAD(passed variable,character for pad, integer, return variable) or

Function.Intrinsic.String.LPad(string, pad string, length, limit, return)

RPAD – adding spaces to the right

Function.Intrinsic.String.RPAD(passed variable, character for pad, integer, return variable) or

Function.Intrinsic.String.RPad(string, pad string, length, limit, return)

Arguments

Passed variable

Specifies the expression to be padded. This expression can be any expression type except a logical or currency expression or a general or picture field.

Character for Pad

Character used to pad the passed text

Integer

Length of the entire string

Return variable

String returned with the added spaces

Example

Function.Intrinsic.String.Lpad (“This is a test”, “ “,20, Variable.local.TextA)
Returns –“   This is a test”
Function.Intrinsic.String.Rpad(“This is a test”, “ “,20, Variable.local.textA)
Returns-“This is a test   “ 

Remarks

  • The Limit parameter is a boolean value. This parameter dictates if the passed sting should be cut to the specified length, should it exceed the target length.


Function.Intrinsic.String.LTrim

Function.Intrinsic.String.LTrim

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.String.MakeURLFriendly

This function encodes a passed string to a returned, URL friendly string value.

Syntax

Function.Intrinsic.String.MakeURLFriendly(string in, string return)

Arguments

Example

Remarks


Function.Intrinsic.String.Mid

  1. redirect Function.Intrinsic.String.Left.Mid.Right

Function.Intrinsic.String.Mid

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.String.Occurs

The new syntax for this command allows you to specify a mode; valid values for mode are as follows: 0 - find string is anywhere in the base string (default behavior with orginal syntax) 1 - match the find string to the beginning of the base string 2 - match the find string to the end of the base string Mode 0 will give the number of occurances of the find string within the base string, while modes 1 and 2 will return a 1 if the match is made, and a 0 if there is no match. Note: Be careful to use the proper transformation on the find and base strings

Syntax

Function.Intrinsic.String.Occurs(base string, find string, mode, long return)

Function.Intrinsic.String.Occurs(base string, substring, long return)

Arguments

base string
substring
long return

Examples

Remarks


Function.Intrinsic.String.Ordinal2Column

Function.Intrinsic.String.Ordinal2Column

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.String.OrdinaltoColumn

Syntax

Function.Intrinsic.String.OrdinalToColumn(ordinal, ret)

Arguments

Example

Remarks

  • This command can be used with MS Excel and OO Calc, to determine the alpha column name from a numeric ordinal. This command is zero-based, so an ordinal of 0 will return "a", while an ordinal of 27 will return "ab".
  • This is the reciprocal command of Function.Intrinsic.String.ColumnToOrdinal.


Function.Intrinsic.String.PCase

LCASE

Returns a String that has been converted to lowercase.

Syntax

Function.intrinsic.String.LCase(string, return variable)

Arguments

string

Valid string expression.

Return variable

Returns converted string

Example

Function.Intrinsic.String.Lcase (“HELLO”, variable.local.Case)
returns variable.local.Case=”hello” 

Remarks

  • Only uppercase letters are converted to lowercase; all lowercase letters and nonletter characters remain unchanged.

PCASE

Returns a String that has been converted to having the first letter of every word Capitalized.

Syntax

Function.Intrinsic.String.PCase(string, return variable)

Arguments

string - Valid string expression.

Return variable - Returns converted string

Example

Function.Intrinsic.String.PCase (“HELLO”, variable.local.Case)
returns variable.local.Case=”Hello” 

Remarks

  • Only lowercase letters are converted to uppercase; all nonletter characters remain unchanged.

UCASE

Returns a Variant (String) containing the specified string, converted to uppercase.

Syntax

Function.intrinsic.String.UCase(string, return variable)

Arguments

string

Valid string expression.

Return variable

Returns converted string

Example

Function.Intrinsic.String.Ucase (“hello”, variable.local.Case)
‘returns variable.local.Case=” HELLO” 

Remarks

  • Only lowercase letters are converted to uppercase; all uppercase letters and nonletter characters remain unchanged.


Function.Intrinsic.String.PositionalSplit

Allows user to pass a string, and break it up into groups to make an array.

Syntax

Function.Intrinsic.String.PositionalSplit (Passed string, Position array, length array, return array)

Arguments

Passed String

String – line from data

Position Array

Long arrays with the position of the split in data

Length Array

Long array with length of each split

Return array

String array, returns data in array format based on split info

Example

variable.local.posArray.declare(long)
variable.local.lenArray.declare(long)
variable.local.retArray.declare(string)
variable.local.sText.declare(string)
variable.local.sText.set(“This is a test. For the positional split function of the string section. Not sure what I will do here. Just typing to see what happens.”)
variable.local.posArray.set(0, 17, 75, 106)
variable.local.lenArray.set(15,56,29,32)
function.Intrinsic.String.PositionalSplit(variable.local.sText, variable.local.posArray, variable.local.lenArray, variable.local.retArray)
Returns an array retArray (“This is a test”, “For the positional split function of the string section”, “Not sure what I will do here”, “Just typing to see what happens” 

Remarks

  • This is great for data conversion


Function.Intrinsic.String.PositionalString

Syntax

Function.Intrinsic.String.PositionalString(value array, length array, string ret)

Arguments

Value Array

String Array of the values

Length Array

Long Array of the length of each value (positional)

String Return

Returns the positional string needed

Example

Variable.local.sValue.declare(String)
Variable.local.sLen.declare(long)
Variable.local.sFile.declare(string)
Function.Intrinsic.String.Concat(“Hello World”, “This is a test”, “How are you today?”, “10/29/2007”,variable.local.sValue) 

Remarks


Function.Intrinsic.String.PrepareSQLStatement

Function.Intrinsic.String.PrepareSQLStatement

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.String.PrepareSQLStatements

Creates a fully qualified SQL Statement

Syntax

Function.Intrinsic.String.PREPARESQLSTATEMENT(Select Clause, Where Clause Array, Order By Clause Array, Return String)

Arguments

Select Clause

String

Where Clause Array

String Array

Order By Clause Array

String Array

Return String

Return String of SQL Statement

Example

Remarks


Function.Intrinsic.String.RegexMatch

Description

Syntax

Function.Intrinsic.String.RegExMatch(input string, regex pattern, ignore case, string return) or

Function.Intrinsic.String.RegExMatch(input string, regex pattern, ignore case, multi-line, global, string return)

Arguments

Example

Remarks


Function.Intrinsic.String.RegExMatch

Syntax

Function.Intrinsic.String.RegExMatch(input string, regex pattern, ignore case, multi-line, global, string return)

Function.Intrinsic.String.RegExMatch(input string, regex pattern, ignore case, string return)

Arguments

input string
regex pattern
ignore case
string return

Examples

Remarks


Function.Intrinsic.String.RegexReplace

Description

Syntax

Function.Intrinsic.String.RegExReplace(input string, regex pattern, replacement string, ignore case, string return) or

Function.Intrinsic.String.RegExReplace(input string, regex pattern, replacement string, ignore case, multi-line, global, string return)

Arguments

Example

Remarks


Function.Intrinsic.String.RemoveArrayDuplicates

Removes duplicates within an array

Syntax

Function.Intrinsic.String.RemoveArrayDuplicates(array in, array out)

Arguments

Example

Remarks

  • Any data type will work with this command
  • The array will be re-dimensioned to the proper size


Function.Intrinsic.String.Replace

Returns a string in which a specified substring has been replaced with another substring a specified number of times.

Syntax

Function.Intrinsic.String.Replace(passed string, match string, replace string, ret var)

Arguments

Passed String

String Expression containing text to be replaced

Match String

Text to find on Passed String

Replace String

String to replace Match String

Ret Variable

Returned String Variable with the replaced text

Example

Function.Intrinsic.String.Replace(“This is a test- of Replace”,”-”, “Testing ”, variable.local.sRet) 

Remarks

  • The Return variable will be Variable.local.sRet=”This is a test Testing of Replace”


Function.Intrinsic.String.Right

  1. redicrect Function.Intrinsic.String.Left.Mid.Right

Function.Intrinsic.String.Right

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.String.RPad

Function.Intrinsic.String.RPad

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.String.RTrim

Function.Intrinsic.String.RTrim

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.String.SortAsc

Sorts an array in ascending order

Syntax

Function.Intrinsic.String.SortAsc(array, array return)

Arguments

Array

Variable array

Array Return

Variable Array being returned after the sort

Example

Function.Intrinsic.String.SortAsc(Variable.Local.r, Variable.Local.r)
Program.Sub.Main.Start
 v.lo.r.declare(string)
 v.lo.r.set("C*A*D*B")
 f.in.string.split(v.lo.r,"*",v.lo.r)
 f.in.string.sortasc(v.lo.r,v.lo.r)
 f.in.ui.msgbox(v.lo.r)
Program.Sub.Main.End 

Remarks

  • Returns the array (“A,B,C,D”) instead of (“C,A,D,B”)


Function.Intrinsic.String.SortDesc

Sorts an array in descending order

Syntax

Function.Intrinsic.String.SortDesc(array, array return)

Arguments

Array

Variable array

Array Return

Variable Array being returned after the sort

Example

Function.Intrinsic.String.SortDesc(Variable.Local.r, Variable.Local.r)
Program.Sub.Main.Start
 v.lo.r.declare(string)
 v.lo.r.set("C*A*D*B")
 f.in.string.split(v.lo.r,"*",v.lo.r)
 f.in.string.sortdesc(v.lo.r,v.lo.r)
 f.in.ui.msgbox(v.lo.r)
Program.Sub.Main.End

Remarks

  • Returns the array (“D,C,B,A”) instead of (“C,A,D,B”)


Function.Intrinsic.String.Split

Returns a zero-based, one-dimensional array containing a specified number of substrings.

Syntax

Function.Intrinsic.String.Split(passed variable, delimiter, return variable)

Arguments

Passed Variable

Variable containing substrings and delimiters. If expression is a zero-length string, Split returns an empty array, that is, an array with no elements and no data.

Delimiter

Required. String character used to identify substring limits. If omitted, the space character (" ") is assumed to be the delimiter. If delimiter is a zero-length string, a single-element array containing the entire expression string is returned.

Return Variable

String returned; -1 indicates that all substrings are returned.

The compare argument can have the following values:

Value Description

0 Perform a binary comparison.

1 Perform a textual comparison.

Example

Function.Intrinsic.String.Split (variable.local.textA,” – “, variable.local.retVar) 

Remarks

  • Delimited by *!*


Function.Intrinsic.String.SplitCSV

Transforms a CSV String into an Array

Syntax

Function.Intrinsic.String.SPLITCSV(CSV String, Return String Array)

Arguments

CSV String

CSV String to be converted

Return String Array

Converted String Array

Example

Remarks


Function.Intrinsic.String.StripCharacters

This command removes all non alpha-numeric elements from the passed string.

Syntax

Function.Intrinsic.String.StripCharacters(string, ret)

Arguments

Example

Remarks


Function.Intrinsic.String.StripExtraSpaces

Function.Intrinsic.String.StripExtraSpaces

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.String.TimeString

Converts a date/time to a string

Syntax

Function.Intrinsic.String.TimeString(date, Ret String)

Arguments

Date

Date

String

String Variable format(hhnn)

Example

Function.Intrinsic.String.TimeString(variable.ambient.now, variable.local.sTime)

Remarks

  • Pass a date and have a string passed in the “hhnn” (Hour and minute) format.


Function.Intrinsic.String.TimeStringSec

This function is similar to the Function.Intrinsic.String.TimeString command. It accepts a the time component of a date typed variable, and returns a formatted string. The returned format is HHMMSS (hours, mimutes, and seconds).

Syntax

Function.Intrinsic.String.TimeStringSec(time, string ret)

Arguments

Example

Remarks


Function.Intrinsic.String.Trim

Function.Intrinsic.String.Trim

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.String.Trim.LTrim.RTrim

Returns a copy of a string without leading spaces (LTrim), trailing spaces (RTrim), or both leading and trailing spaces (Trim).

Syntax

Function.Intrinsic.String.LTrim(string, return variable)

Function.Intrinsic.String.RTrim(string, return variable)

Function.Intrinsic.String.Trim(string, return variable)

Arguments

Return Variable is the string returned with the extra spaces removed.

Example

Function.Intrinsic.String.LTrim("  vbscript ", textA)  ' TextA contains "vbscript ".
Function.Intrinsic.String.RTrim("vbscript   ", textA)  ' TextA contains "vbscript ".
Function.Intrinsic.String.Trim("  vbscript  ", textA)  ' TextA contains "vbscript ". 

Remarks

  • The string argument is any valid string expression. If string contains Null, Null is returned.


Function.Intrinsic.String.TrimChar

Syntax

Function.Intrinsic.String.TrimChar(string in, characters to remove, string return)

Arguments

string in
characters to remove
string return

Examples

Remarks


Function.Intrinsic.String.TrimCharL

Syntax

Function.Intrinsic.String.TrimCharL(string in, characters to remove, string return)

Arguments

string in
characters to remove
string return

Examples

Remarks


Function.Intrinsic.String.TrimCharR

Syntax

Function.Intrinsic.String.TrimCharR(string in, characters to remove, string return)

Arguments

string in
characters to remove
string return

Examples

Remarks


Function.Intrinsic.String.UCase

LCASE

Returns a String that has been converted to lowercase.

Syntax

Function.intrinsic.String.LCase(string, return variable)

Arguments

string

Valid string expression.

Return variable

Returns converted string

Example

Function.Intrinsic.String.Lcase (“HELLO”, variable.local.Case)
returns variable.local.Case=”hello” 

Remarks

  • Only uppercase letters are converted to lowercase; all lowercase letters and nonletter characters remain unchanged.

PCASE

Returns a String that has been converted to having the first letter of every word Capitalized.

Syntax

Function.Intrinsic.String.PCase(string, return variable)

Arguments

string - Valid string expression.

Return variable - Returns converted string

Example

Function.Intrinsic.String.PCase (“HELLO”, variable.local.Case)
returns variable.local.Case=”Hello” 

Remarks

  • Only lowercase letters are converted to uppercase; all nonletter characters remain unchanged.

UCASE

Returns a Variant (String) containing the specified string, converted to uppercase.

Syntax

Function.intrinsic.String.UCase(string, return variable)

Arguments

string

Valid string expression.

Return variable

Returns converted string

Example

Function.Intrinsic.String.Ucase (“hello”, variable.local.Case)
‘returns variable.local.Case=” HELLO” 

Remarks

  • Only lowercase letters are converted to uppercase; all uppercase letters and nonletter characters remain unchanged.


Function.Intrinsic.String.WeakDecryption

This function decrypts a passed string, first encrypted with Function.Intrinsic.String.WeakEncryption.

Syntax

Function.Intrinsic.String.WeakDecryption(string in, ret string)

Arguments

Example

Remarks


Function.Intrinsic.String.WeakEncryption

This function weakly encrypts a passed string.

Syntax

Function.Intrinsic.String.WeakEncryption(string in, ret string)

Arguments

Example

Remarks


Function.Intrinsic.StringBuilder.Append

This function appends any constant or variable value to the named StringBuilder object.

Syntax

Function.Intrinsic.StringBuilder.Append(stringbuilder object name [string], value [any])

Function.Intrinsic.StringBuilder.Append(stringbuilder object name [string], value 0 [any], ..., value n [any])

Argument

String Builder Object Name

Name of object

Value

any type

Example


Remark


Function.Intrinsic.StringBuilder.AppendLine

This function appends a Ambient.NewLine and any constant or variable value to the named StringBuilder object.

Syntax

Function.Intrinsic.StringBuilder.AppendLine(stringbuilder object name [string], value [any])

Function.Intrinsic.StringBuilder.AppendLine(stringbuilder object name [string], value 0 [any], ..., value n [any])

Argument

String Builder Object Name

Name of object

Value

Any type

Example


Remark


Function.Intrinsic.StringBuilder.Clear

This function clears information stores in the named StringBuilder object.

Syntax

Function.Intrinsic.StringBuilder.Clear(stringbuilder object name [string])

Argument

String Builder Object Name

Name of object


Example


Remark


Function.Intrinsic.StringBuilder.Create

This function creates a named StringBuilder object.

Syntax

Function.Intrinsic.StringBuilder.Create(stringbuilder object name [string])

Argument

String Builder Object Name

Name of object


Example


Remark


Function.Intrinsic.StringBuilder.Dispose

This function destroys the named StringBuilder object.

Syntax

Function.Intrinsic.StringBuilder.Dispose(stringbuilder object name [string])

Argument

String Builder Object Name

Name of object


Example


Remark


Function.Intrinsic.StringBuilder.Insert

This function inserts data into the StringBuilder object, given the position and data to add.

Syntax

Function.Intrinsic.StringBuilder.Insert(stringbuilder object name [string], position [long], data [any])

Argument

String Builder Object Name

Name of object

Position

Long

Data

Any

Example


Remark


Function.Intrinsic.StringBuilder.ReadLength

This function returns the length of the data in the named StringBuilder object.

Syntax

Function.Intrinsic.StringBuilder.ReadLength(stringbuilder object name [string], return [long])

Argument

String Builder Object Name

Name of object

Return

Example


Remark


Function.Intrinsic.StringBuilder.Remove

This function removes data from the StringBuilder object, given the position and length of the data to remove.

Syntax

Function.Intrinsic.StringBuilder.Remove(stringbuilder object name [string], start position [long], length [long])

Argument

String Builder Object Name

Name of object

Start Position

Long

Length

Long

Example


Remark


Function.Intrinsic.StringBuilder.Replace

This function replaces any found match text with the replacement text in the named StringBuilder object.

Syntax

Function.Intrinsic.StringBuilder.Replace(stringbuilder object name [string], match text [string], replacement text [string])

Argument

String Builder Object Name

Name of object

Match Text

string

Replacement Text

string

Example


Remark


Function.Intrinsic.StringBuilder.ToString

This function assembles the named StringBuilder object's contents into a string variable.

Syntax

Function.Intrinsic.StringBuilder.ToString(stringbuilder object name [string], return variable [string])

Argument

String Builder Object Name

Name of object

Return

Example


Remark


Function.Intrinsic.Task.AppActivate

Activate application

Syntax

Function.Intrinsic.Task.AppActivate(title/PID)

Arguments

Title/PID

Process ID for the Window Task, or title of window

Example

variable.local.i.declare(long)
function.intrinsic.task.launchasync(variable.local.sLS,1,variable.local.i)
Function.Intrinsic.Task.AppActivate(variable.local.i) 

Remarks


Function.Intrinsic.Task.AuthLaunchAsync

Allows a user to run a program with another user's security credentials

Syntax

Function.Intrinsic.Task.AuthLaunchAsync(Windows User, Windows Domain, Domain Password, Fully Qualified Command Line, Long Return)

Arguments

Windows User

String

Windows Domain

String

Domain Password

String

Fully Qualified Command Line

String

Long Return

Long Return Process ID of the program launched

Example

Remarks


Function.Intrinsic.Task.AuxInfoEnable

Syntax

Function.Intrinsic.Task.AuxInfoEnable(boolean)

Arguments

boolean

Examples

Remarks


Function.Intrinsic.Task.CheckExtension

This function returns details of the program (if any) that is associated with the passed file type, given the specified verb action.

Syntax

Function.Intrinsic.Task.CheckExtension(filename, verb, string return)

Arguments

Example

Remarks


Function.Intrinsic.Task.CheckLock

Checks to see if a lock is active

Syntax

Function.Intrinsic.Task.CheckLock(Fully Qualified File Name, Boolean Return)

Arguments

Fully Qualified File Name

String

Boolean Return

Return variable indicating whether or not a lock is active

Example

Remarks

  • Used in conjunction with Function.Intrinsic.Task.CreateLock


Function.Intrinsic.Task.CreateLock

Creates a lock on a program so that it may only run in one place at a time

Syntax

Function.Intrinsic.Task.CreateLock(Fully Qualified File Name)

Arguments

Fully Qualified File Name

String

Example

Remarks

  • The lock is released when the program finishes running


Function.Intrinsic.Task.FindExecutable

Syntax

Function.Intrinsic.Task.FindExecutable(FQ filename, string return)

Arguments

Example

Remarks


Function.Intrinsic.Task.GetProcessList

Returns a list of process running and the Process ID, Process name, Process executable, and Consumed Memory of Process fields for each process. Similar to that of Windows Task Manager

Syntax

Function.Intrinsic.Task.GetProcessList(String Return)

Arguments

String Return

String of all processes and their fields

Example

Remarks

  • The return is a double delimited string, where lines (individual processes) are delimited by *!* and the fields within each line are delimited by !*!. Use F.in.String.Split to parse it


Function.Intrinsic.Task.GetTaskList

Syntax

Function.Intrinsic.Task.GetTaskList(string return)

Arguments

string return

Examples

Remarks


Function.Intrinsic.Task.IsProgramRunning

This function returns a true or false depending on whether the specified executable is running.

Syntax

Function.Intrinsic.Task.IsProgramRunning(program, bool return)

Arguments

Example

Remarks


Function.Intrinsic.Task.KillPID

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Task.LaunchAsync

Launches program not dependent of other programs or stand-alone.

Syntax

Function.Intrinsic.Task.LaunchAsync (FQP*, Mode, Return Variable)

Arguments

FQP

Fully Qualified Path

Mode

Window Style

Value Description
0 Window is hidden and focus is passed to the hidden window.
1 Window has focus and is restored to its original size and position.
2 Window is displayed as an icon with focus.
3 Window is maximized with focus.
4 Window is restored to its most recent size and position. The currently active window remains active.
6 Window is displayed as an icon. The currently active window remains active.
Return Variable

Variable used to hold the return value

Example

Function.Intrinsic.Task.LaunchAsync (“C:\MyStuff.doc”, 0, V.Local.aReturn) 

Remarks


Function.Intrinsic.Task.LaunchGSSAsync

Syntax

Function.Intrinsic.Task.LaunchGSSAsync(prog, wrun flags, params, long handle return)

Arguments

Prog

Program name

Wrun Flags

String example “-c”

Params

Parameters for the program

Handle Return

Long variable for the file handle

Example

variable.local.sParam.declare(String)
variable.local.iHdl.declare(long)
function.intrinsic.string.concatchr(variable.local.sParam,34,variable.local.sParam)
function.intrinsic.string.concat(variable.local.sParam,"LRINF008",variable.local.sParam)
function.intrinsic.string.concatchr(variable.local.sParam,34,variable.local.sParam)
function.intrinsic.task.launchgssasync("xuplrtrh","-c",variable.local.sParam, variable.local.iHdl) 

Remarks


Function.Intrinsic.Task.LaunchGSSSync

Syntax

Function.Intrinsic.Task.LaunchGSSsync(prog, wrun flags, params)

Arguments

Prog

Program name

Wrun Flags

String example “-c”

Params

Parameters for the program

Handle Return

Long variable for the file handle

Example

variable.local.sParam.declare(String)
function.intrinsic.string.concatchr(variable.local.sParam,34,variable.local.sParam)
function.intrinsic.string.concat(variable.local.sParam,"LRINF008",variable.local.sParam)
function.intrinsic.string.concatchr(variable.local.sParam,34,variable.local.sParam)
function.intrinsic.task.launchgsssync("xuplrtrh","-c",variable.local.sParam) 

Remarks


Function.Intrinsic.Task.LaunchSync

Launches program dependant on other programs.

Syntax

Function.Intrinsic.Task.LaunchSync (FQP) or

Function.Intrinsic.Task.LaunchSync (FQP, Time)

Arguments

FQP

Fully Qualified Path

Time

In Milliseconds

Example

Function.Intrinsic.Task.LaunchSync (“C:\MyStuff.doc”, 555) 

Remarks

  • If Time is left off then the program will wait forever before running or until you close the application


Function.Intrinsic.Task.PidRunning

Description of all windows task ProcessID’s or PID

Syntax

Function.Intrinsic.Task.PIDRunning (PID, Boolean Return)

Arguments

PID

Process ID for the Window Task

Boolean Return

True= Running, False= Not Running

Example

Function.Intrinsic.Task.PIDRunning(####, variable.local.bTask) 

Remarks

  • Returns a true or false to say whether or not the window’s task is running or not.


Function.Intrinsic.Task.ReadEnvironmentVariableValueByPID

Function.Intrinsic.Task.ReadEnvironmentVariableValueByPID

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Task.ReadEnvironmentVariableValueSByPID

Function.Intrinsic.Task.ReadEnvironmentVariableValueSByPID

Syntax

Arguments

Examples

Remarks


Function.Intrinsic.Task.SendKeys

Use the sendKeys method to send keystrokes or combinations of keystrokes to the currently active application or to control another application that your application has started or is using. The sendKeys method does not wait for any processes started by the keystroke to return before continuing with code execution.

Syntax

Function.Intrinsic.Task.SendKeys(String to Send)

Arguments

String

String to send to program

Example

Function.Intrinisc.Task.SendKeys(“Hello”) 

Remarks

  • Must be used with Function.Intrinsic.Task.AppActivate.
  • Send Keys will write to the program open such as Notepad, WordPad, Excel, etc.
  • The plus sign (+), caret (^), percent sign (%), tilde (~), and parentheses (( )) have special meanings to sendKeys. To specify one of these characters, enclose it in braces ({}). For example, to specify the plus sign, use {+}. Brackets ([ ]) have no special meaning to sendKeys, but you must enclose them in braces. To specify brace characters, use {{} and {}}.
  • To specify keys combined with any combination of the SHIFT, CTRL, and ALT keys, precede the key code with one or more of the following codes.

Key - Code

SHIFT - +

CTRL - ^

ALT - %

  • To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to specify to hold down SHIFT while E and C are pressed, use +(EC). To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use +EC.


Function.Intrinsic.Task.SetenvironmentVariable

Syntax

Function.Intrinsic.Task.SetEnvironmentVariable(Name, Value)

Arguments

Name

String Environmental Variable Name

Value

String Value of the Variable

Example

Function.Intrinsic.Task.SetEnvironmentVariable(“LocalDomain”, “Here”) 

Remarks


Function.Intrinsic.Task.Shellexec

Launches program not dependent of other programs or stand-alone.

Syntax

Function.Intrinsic.Task.ShellExec (Window Handle, Topic, File, Param list, directory, show style)

Arguments

Window Handle

Long

Topic

Specifies the action to be performed. (String)

Edit

Launches an editor and opens the document for editing. If File is not a document file, the function will fail.

Explore

Explores the folder specified by File

Find

Initiates a search starting from the specified directory

Open

Opens the file specified by the File parameter. The file can be an executable file, a document file, or a folder.

Print

Prints the document file specified by File. If File is not a document file, the function will fail.

Properties

Displays the file or folder’s properties.

File

Address of a null-terminated string that specifies the file or object on which to execute the specified verb. To Specify a shell namespace object, pass the fully-qualified parse name. Note that not all verbs are supported on all objects. For example, not all document types support the “print” verb. (String)

Param List

If the File prarmeter specifies an executable file, Param List is an address to a null-terminated string that specifies the prameters to be passed to the application. The format of this string is determined by the verb that is to be invoked. If File specifies a document file, Param List should be NULL. (String)

Directory

Address of a null-terminated string that specifies the default directory. (String)

Show Style

Flags that specify how an application is to be displayed when it is opened. If File specifies a document file, the flag is simply passed to the associated application. It is up to the application to decide how to handle it. (Long)

Example

To open a folder, use either of the following calls:
Function.Intrinsic.Task.ShellExecute(handle, "", path_to_folder, "", "", 1);
or
Function.Intrinsic.Task.ShellExecute(handle, "open", path_to_folder, "", "", 1);
To explore a folder, use:
Function.Intrinsic.Task.ShellExecute(handle, "explore", path_to_folder, "", "", 1);
To launch the shell's Find utility for a directory, use:
Function.Intrinsic.Task.ShellExecute(handle, "find", path_to_folder, "", "", 0); 

Remarks

  • Returns a value greater than 32 if successful, or an error value that is less than or equal to 32 otherwise. If a zero (0) is returned the OS is out of memory or resources
  • For systems prior to MS Windows 2000, the default verb is used if it is a valid and available in the registry. If not, the “open” verb is used.
  • For Windows 2000 and later systems, the default verb is used if available. If not, the “open” verb is used. If neither verb is available, the system uses the first verb listed in the registry.
  • You can find out the Topics by right clicking on the object you want to work with and looking at the list that pop’s up.


Function.Intrinsic.Task.ShellexecSync

This function is identical to Function.Intrinsic.Task.ShellExec, with the exception of executing the helper application synchronously. This can be especially helpful when trying to control the sequence of outside processes (ex. marshalling document control printing within a loop by work order).

Syntax

Function.Intrinsic.Task.ShellExecSync(Window Handle, Topic, File, Param list, directory, show style)

Arguments

Example

Remarks


Function.Intrinsic.Task.ShellExecSync

This function is identical to Function.Intrinsic.Task.ShellExec, with the exception of executing the helper application synchronously. This can be especially helpful when trying to control the sequence of outside processes (ex. marshalling document control printing within a loop by work order).

Syntax

Function.Intrinsic.Task.ShellExecSync(Window Handle, Topic, File, Param list, directory, show style)

Arguments

Window Handle
Topic
File
Param list
directory
show style

Examples

Remarks


Function.Intrinsic.Task.Terminatepid

This function terminates a process, given its PID.

Syntax

Function.Intrinsic.Task.TerminatePID(PID)

Arguments

Example

Remarks

  • This command will only work if the logged in user has permission to terminate the specified process.


Function.Intrinsic.Task.TerminatePID

This function terminates a process, given its PID. Note: This command will only work if the logged in user has permission to terminate the specified process.

Syntax

Function.Intrinsic.Task.TerminatePID(PID)

Arguments

PID

Examples

Remarks


Function.Intrinsic.UI.AddCalendarFeature

This function sets both calendar-wide and cell properties for a calendar rendered with Gui.formname.pictureboxname.RenderCalendar.

Syntax

Function.Intrinsic.UI.AddCalendarFeature(date, property, string argument, long argument, key)

Arguments

Valid values for the Property argument are:

BACKCOLOR

TODAYBACKCOLOR

TODAYFORECOLOR

CELLTEXT

Example

Remarks

  • BackColor is used in conjunction with a passed date. The color is specified in the long argument.
  • TodayBackColor and TodayForeColor are used in conjunction with a passed date of 0. The color is specified in the long argument.
  • CellText is used in conjunction with a passed date. The color is specified in the long argument.


Function.Intrinsic.UI.AverageColorSample

Gives the average color for a sample area

Syntax

Function.Intrinsic.UI.AverageColorSample(Color 1, Color 2, Color 3, Color 4, Return Color)

Arguments

Example

Function.Intrinsic.UI.AverageColorSample(Color1,color2,color3,color4,variable.local.RetColor) 

Remarks


Function.Intrinsic.UI.Beep

Sounds a tone through the computer's speaker.

Syntax

Function.Intrinsic.UI.Beep

Arguments

Examples

Remarks

  • The frequency and duration of the beep depend on your hardware and system software, and vary among computers


Function.Intrinsic.UI.Browser

Creates a browser for the user to select items.

Syntax

Function.Intrinsic.UI.Browser(Title, connection, Basis, Column Titles, Column Widths, String Return) or

Function.Intrinsic.UI.Browser(Title, connection, Basis, Column Titles, Column Widths, Width of Browser, Height of Browser, Format Override, Alignment Override, String Return) or

Function.Intrinsic.UI.Browser(Common Browser ID as long, Flags as string, String Return)

Arguments

Title

Title of browser

Connection

Connection name

Basis

SQL statement to get records for the browser

Column Titles

String array of column header titles

Column Widths

Long array of column widths

Width of Browser

Long variable for the width of the browser

Height of Browser

Long variable for the height of the browser

Format Override

Array of formats for the columns

Alignment Override

Array of alignment for the columns

Common Browser ID

See Common Browsers

Flags

For future user

Example

Syntax 1
Variable.Local.sRet.Declare(string)
Variable.Local.sTemp.Declare(string)
Variable.Local.sTitles.Declare(string)
Variable.Local.iWidths.Declare(long)
Function.Intrinsic.String.Split("Job*!*Suffix*!*Part*!*Description*!*Customer*!*Due Date","*!*",variable.local.sTitles)
Function.Intrinsic.String.Split("1000*!*800*!*2000*!*3000*!*800*!*1000","*!*",variable.local.iWidths)
Function.ODBC.Connection!Conx.Openconnection("G