[TC] новые типы функций и переменных в скриптах JAWS
Мир вам, земляне.
Поскольку очень некогда рыться в справочниках, возможно кто-нибудь из
скриптоспециалистов утолит моё любопытство. Как известно в скриптах имеются
широко известные типы функций и переменных: Void, String, Int. А что из себя
представляет тип функции Variant? И какой тип носит переменная в аргументе
функции, когда перед ней ставиться указатель ByRef?
--
Евгений Корнев.
привет Евгений!
ц
что из себя представляет тип функции Variant?
всё что угодно.
т.е. любой тип данных языка скриптов JAWS
вот описание на английском:
The ``variant'' type
In the JAWS script language, a ``variant'' is a variable whose type is
unknown
at compile-time. Variants may be an int, string, handle, or object, and they
can be used like any of these types. You can use the JAWS built-in script
function GetVariantType to determine the type of a variant, although you may
already know the underlying type based on the context. For example, if you
request the name property of a UIA element and the return type is a variant,
the underlying type will almost certainly be a string. If you happen to know
the type of a given variant, you can declare the variable as the known type
in the scripts. For example: if the GetProperty function returns a variant,
but you know the type of the property returned will be a string, you can
assign the return value directly to a string variable, rather than having to
declare a variant. But even if you don't know that a variant is a certain
type like a string, you can still pass it to functions which take the string
type.
а это ссылка на страничку с описанием:
http://www.freedomscientific.com/documentation/scripts/JAWS-UIAScriptAPI.asp
ц
И какой тип носит переменная в аргументе
функции, когда перед ней ставиться указатель ByRef?
в функции 2 при создании переменной на второй вкладке ставим флаг
Со связью
получится вот так:
Function test (int ByRef iTest)
далее идёт код функции
в котором наша переменная получает значение
и оно после окончания функции вернётся в ту, из которой была запрошена
функция test
Виктор Горелов