Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When a user logs into the system via the handheld terminal, a user-specific script, if any, or a general script starts to execute.

Scripts run in a session and the execution and the variables are saved until the user logs out. When the script changes, it is sufficient to restart the user session.

Script yapısıScriptler formlardan ve formların içinde yazılmış komutlardan oluşur. Tüm formlar structure

Scripts consist of forms and commands written in the forms. All forms begin with BeginForm(Form adı) ile başlar ve EndForm komutuyla biter. Form adlarında Türkçe karakter kullanılmaz.

Scriptte (kural tanımları hariç) otomatik olarak sadece ilk tanımlanmış form işletilir. Diğer formlar bu ilk formun içinden çağrılmalı ya da birbirlerinin içinden yönlendirilmelidir. Formların çağrılması için iki yöntem kullanılır: 1- Forma git ve işleme oradan devam et (GoForm) 2- Forma git ve iş bitince geri dön. (CallForm)

Formların içinde, komutları bölümlere ayırmak ya da yönlendirmeler yapmak amacıyla etiketler tanımlanabilir. Etiketler, etiket adının sonuna : (iki nokta üstüste işareti) konarak oluşturulur.

...

Tüm değişkenler globaldir. Bir kez tanımlanan ve değer atanan değişken, scriptin her yerinden kullanılabilir. Bir değişkeni farklı amaçlarla kullanmak istendiğinde, o değişkene yeni değer atanmalı ya da değişkenin değeri boşaltılmalıdır.

Script içinde iki tür değişken kullanılır : Kullanıcı tanımlı değişkenler ve iş nesnelerine ait değişkenler.
Kullanıcı tanımlı değişkenler @ işaretiyle başlarlar. Tanımlama ve değer atama işlemi Set komutuyla ya da sonucu değişkenlere atanabilen komutlarla yapılır. Eğer bir değişken hiç tanımlı değilse, ilk değer atandığında otomatik olarak tanımlanırname) and end with EndForm command. Turkish characters are not used in form names.

Only the first defined form is automatically executed in the script (excluding rule definitions). Other forms must be called from this first form or directed through each other. Two methods are used to call the forms: 1- Go to the form and continue there (GoForm) 2- Go to the form and return when the job is done. (CallForm)

Tags can be defined within forms to segment commands or redirect. Tags are created with a : (colon) at the end of the tag name.

Scripts are executed line by line.


Variables

All variables are global. Once defined and assigned a value, the variable can be used anywhere in the script. When it is requested to use a variable for different purposes, that variable should be assigned a new value or the value of the variable should be reset.

Two types of variables are used in the script: User-defined variables and variables of business objects.

User-defined variables begin with the @ sign. Defining and assigning values are performed with Set command or with commands whose results can be assigned to variables. If a variable is not defined at all, it is automatically defined when first assigning a value.

İş nesnelerine ait değişkenler @@ işaretiyle başlarlar ve adları sabittir. (bkz. Veritabanı nesnelerine ait işlemler) Bu değişkenlere değer atama işlemi, ilgili komutlar tarafından otomatik olarak ya da kullanıcı tarafından özellikle belirtilerek yapılabilir. Bazı komutlar, asıl işlemden etkilenen başka değişkenleri de otomatik olarak doldururlar.

Ürün içinde "kaynak/hedef" şeklinde kullanımı olan nesnelerin "hedef" türünde olanlarının değişkenlerinin adının sonuna 2 sayısı eklenir. Ör. Kaynak depo için @@Warehouse, hedef depo için @@Warehouse2 şeklinde...

Telnet uygulaması için tanımlanmış genel birkaç değişken vardır.

  • @SCREEN_WIDTH : Ekrandaki sütun sayısı
  • @SCREEN_HEIGHT : Ekrandaki satır sayısı
  • @Style : Renk, çizgi, kalınlık vb. biçimlendirmeleri yapmayı sağlayan değişken


Metin ifadeler içinde değişken kullanılabilir. Ör. Text(1,1,"Adı : @adi")Yazım şekli Tüm komutlar, parametreleri olsun ya da olmasın, yanında parantez işaretleriyle kullanılır. Ör.

Variables for business objects start with the @@ sign and have fixed names. (See Operations of database objects) Assigning values ​​to these variables can be done automatically by the relevant commands or by specifying them specifically by the user. Some commands also automatically populate other variables that are affected by the actual process.

The number 2 is added to the end of the name of the variables of the "target" type of objects that have "source/target" usage in the product.

For example: @@Warehouse for the source warehouse, @@Warehouse2 for the target warehouse...


There are several general variables defined for telnet application.

  • @SCREEN_WIDTH : Number of columns on the screen
  • @SCREEN_HEIGHT : Number of lines on the screen
  • @Style : Variable that allows formatting color, line, width, etc.



Spelling

All commands, with or without parameters, are used with parentheses next to them. Ex. Beep(), EndIf(), EndForm()

Satır sonunda At the end of the line, the ; (noktalı virgül) kullanılmaz

Değişkenlere değer atama işlemlerinde = (eşittir) işareti kullanılmaz. Değişkenlere Set komutuyla değer atanır. Ör. @a=1 şeklinde bir kullanım yoktur. Ancak, eşitlik kontrolü = işareti ile yapılır.

Ör. semicolon) sign is not used.

The = (equal) sign is not used in assigning values to variables. Variables are assigned values with the Set command. For example: There is no such use as @a=1. However, the equality check is performed with the = sign.

For example: If(@a=1,...)

Büyük harf-küçük harf ayrımı yoktur. Ancak, Türkçe karakter kullanımlarında sorunlara yol açabileceği için, tavsiye edilen kullanım şekli CamelCase (İlk Harfleri Büyük)
olarak yazılmasıdır. Ör. There is no case sensitivity. However, as it can cause problems for Turkish characters, CamelCase (Capital Initials) is recommended. For example: WorkOrder.List()

Metin ifadeler Texts must be written between "" (Çift tırnak) işaretleri arasında yazılmalıdır. Sayı ifadeleri çift tırnak içinde yazıldığında, ilgili komutlarda parametre olarak sayı yazılması bekleniyorsa, yine sayı olarak dikkate alınır.

JSON ifadeler {} (Süslü parantez) işaretleri arasında yazılmalıdır.

Scriptte dikkate alınması istenmeyen açıklama ve yorum satırları için // (İki tane sağa yatık bölü işareti) kullanılır.

Her satır ayrı bir komut gibi yorumlanır. Bu sebeple, herhangi bir komut birden çok satıra yayılarak yazılmazdouble quote). When numbers are written between double quotes, it is still considered a number if it is expected to write numbers as a parameter in the relevant commands.

JSON expressions must be written between {} (curly brackets).

The // (two italic slashes) sign is used for comments and comment lines to be ignored in the script.

Each line is interpreted as a separate command. For this reason, any command is not written on multiple lines.