Page History
...
Command Name | Usage | Description | Example | Version |
---|---|---|---|---|
BeginForm /EndForm | BeginForm(Form name) EndForm() | It is used to define a new form(section) in the script. Turkish characters are not used in the form name. | BeginForm(GirisEntry) Text(1,1,"Hoşgeldiniz") EndForm() | 1.0 |
GoForm | GoForm(Form name) | Directs the operation of the script to the specified form. The next flow should be described in the target form. | GoForm(SiparisKabul) | 1.0 |
CallForm ReturnForm | CallForm(Form name) ReturnForm() | Scriptin işleyişini belirtilen forma yönlendirir ve gidilen formda ReturnForm() satırını gördüğünde, çağıran formda kalınan satıra geri döner. | CallForm(Kontrolcontrol) Text(1,1,@kontrolsonucu@controlresult) BeginForm(Kontrolcontrol) Set(@kontrolsonucu@controlresult, 1+1) ReturnForm() EndForm() | 1.0 |
SetReturnLine ReturnLine | SetReturnLine() ReturnLine()Bir formun içinde scriptin işleyişini değiştirmek için kullanılır. SetReturnLine() komutunun verildiği satır işaretlenir, form içinde başka bir yere işlem yönlendirildikten sonra ReturnLine() komutunu gördüğünde işaretlenmiş satıra döner | It is used to change the operation of the script in a form. The line where the SetReturnLine() command is given is marked, and after redirecting the operation to another location in the form, it returns to the marked line when it encounters the ReturnLine() command. | SetReturnLine() if(@kontrolsonucu@controlresult="",Goto(kontrolcontrol),Goto (devamcont.)) ... kontrolcontrol: Set(@kontrolsonucu@controlresult, 1+1) ReturnLine() | 1.0 |
KeyFunction | KeyFunction(button name, komut) | It is used to assign commands to the keys on the keyboard. As a key parameter, the function keys or the ESC, TAB, DEL keys can be written between double quotes. (For example: "F1", "TAB","ESC","DEL") As a command parameter, all simple STC commands (without parameters or with one parameter) can be used. (For example: Goto(tag), ClrScr(), Beep(), GoForm(form), CallForm(form)) | KeyFunction("ESC",GoForm(SiparisKabul)) | 1.0 |
Goto | Goto(tag name) | It is used to redirect the operation in a form to the specified tag. | if(@deger@value="1",Goto(kontrolcontrol),Goto(devamcont.)) | 1.0 |
CaseGoto | CaseGoto(variable name,JSON) | Navigates to the specified tag by the value of the given variable. The value of the variable and the info of the target tag are defined in JSON format. | CaseGoto(@result,{"0":"LotGirisLotEntry","1":" 1.0 MiktarGirisQuantityEntry"}) | 1.0 |
If/Else/EndIf | If(koşul, komut, komut) If(koşul, komut) If(koşul) Else() EndIf() | It maintains the running by the specified condition. The condition section contains the AND/OR operators and supports > < >= <= != signs. It can be used as follows: 1- When used in a single line, both the condition and the commands to be executed are specified. An STC command that does not contain parameters or contains a single parameter can be written in the command sections. The GOTO command is used to go to tags. 2- When used with Else and EndIf, the operations to be performed can be written between the related code blocks. The nested If blocks can be created. The type, which works on a single line with a single command parameter (if,command) was added in version 1.2. | If(@fisturu@sliptype=1,Clrscr(),Goto(Error)) 1.0 If(@result > 5 AND @result < 10,Goto(Sec), Goto(SilDelete)) If(@fisturu@sliptype=1,Goto(Error)) // v1.2 den itibaren If(@result=1) Text(1,1,"Error") Else() Text(1,1,"TAMAMOK") EndIf() | 1.0 |
For/Next | For(variable name, başlangıç, bitiş, artış) Next() Döngü ile işlem yapılmasını sağlar. Verilen değişken, döngü sırasında belirtilen artışa göre otomatik olarak değer alır. Döngü bittiğinde, değişken silinir. Eğer bir scriptte For komutu tanımlandıysa, Next() komutuna kadar bütün komutlar belirtilen sayıda tekrarlanır. | İç içe FOR döngüleri oluşturulabilirIt allows operation with a loop. The specified variable automatically receives values according to the specified increase during the cycle. When the loop ends, the variable is deleted. If the For command is defined in a script, all commands by the Next() command are repeated the specified number of times. The nested FOR loops can be created. | For(@i,1,10) Text(1,@i,@[email protected]_name) Next() | 1.0 |
ResetVariables | ResetVariables() ResetVariables(JSON) Hafızadaki değişkenleri temizler. Tüm hafıza değişkenlerini ya da sadece istenen değişkenleri boşaltabilir, istenen değişkenler hariç tutulabilir. Bu komut, oturum boyunca geçerli olması gereken değişkenleri boşaltmaz. (Ör: @@Style) JSON biçimindeki parametrelerde aşağıdaki anahtarlar kullanılabilir: name : Özellikle temizlenmek istenen değişkenin adı except : Hariç tutulacak değişkenler | Her iki anahtar için de, hem tek değer hem de bir dizi verilebilirResets variables in the memory. It can reset all memory variables or just the requested variables, the requested variables can be excluded. This command does not reset the variables that should be valid throughout the session. (For example: @@Style) The following keys can be used for parameters in JSON format: name: Especially, the name of the variable to reset except: Variables to exclude For both keys, both a single value and an array can be given. | ResetVariables() // tüm değişkenleri boşaltır ResetVariables({"name": "@CurrentItem"}) // tek bir değişkeni boşaltır ResetVariables({"name": ["@CurrentItem", "@AR/APquery"]}) // sadece belli değişkenleri boşaltır ResetVariables({ "except" : ["@AR/APquery", "@depo"] }) //belli değişkenler dışındakileri boşaltır LogVariables() | 1.0 |
LogVariables | LogVariables() | Terminal sunucu hafızasındaki kullanıcı oturumuna ait tüm değişkenleri log tablosuna/dosyasına json biçiminde yazar. Değişkenlerin hangi kullanıcı oturumuna ait olduğu da logda yer alırThe terminal writes all the variables of the user session in the server memory to the log table/file in JSON format. Which user session the variables belong to is also included in the log. | LogVariables() | 1.0 |
Print(rapor adı,yazıcı sıra no,kopya sayısıNUMBERsı, parametreler) Tanımlanmış rapor dosyalarının yazıcıdan yazdırılmasını sağlar. Rapor adı : Kullanıcı tanımlı raporun adı Yazıcı sıra no: SYS'de Yazıcı Tanımlarında yazıcıya ait sıra numarasıdır. 0 yazılırsa kullanıcıya tanımlı yazıcı seçilir. Kopya sayısı: Raporun kopya sayısı | parametreler: Rapor içinde kullanılan parametrelere değerlerinin gönderildiği kısım. json formatında yazılırPrints the defined report files via the printer. Report name : The name of the user-defined report Printer sequence number: This is the sequence number of the printer in the Printer Definitions in SYS. If 0 is written, the user-defined printer is selected. Number of copies: Number of copies of the report Parameters: The part where the values of the parameters used in the report are sent. it is written in JSON format. | Print("FisSlip_Rapor",0,1, {"fisSlip_id": @fisid,"document_no" : "@documentno"}) | 1.0 | |
Sql | Sql(metin olarak query,sonuç değişkeni) Sql({"report": "query raporu adı", "param1" :"değer1" }, sonuç değişkeni) | Runs the text or report queries specified in the database. It writes the returning values to the result variable. It can be used as follows: 1- Text queries: The query text is written between double quotes. 2- User-defined reports: The report to be executed in JSON format and the parameters sent to the report are defined. The result variable has the following info: rowCount: the number of records returned from the query rows: list of records returned from the query. In this list, row values starting from 1 can be accessed. | Sql("SELECT COUNT(*) as SAYI NUMBER from WorkOrderLine With(NOLOCK) where SlipId=@@WorkOrder.Id",@LineNumber) Sql({"report":"LotControl","TrackingNumber":" @LotNo"},@result) If(@result.rowCount = 0) Goto(Error) Else() Text(1,1,"@result.rows.1.Name") EndIf() | 1.0 |
Login | Login(kullanıcı adı, şifre) | It is used to log in to the application. It should only be used on Telnet handheld terminals and when necessary. If the "user authorization" feature is turned on in the terminal parameters, it will not perform an operation. | Login("ali", "1") | 1.0 |
Logout | Logout() | It is used to close the user session that is open in the application. | Logout() | 1.0 |
Http | Http(metot, url, headerJSON bodyJSON, @result) | It allows a REST API call in the script. method: GET, POST, PUT values. url: Info of the API address to be connected. It can start with http or https. If the operation to be executed involves the use of "url query string", the related parameter values are given in the url. headerJson : The information for the header information of the http request is entered in JSON format. It can be used for information such as basic authentication or JWT token. bodyJSON: The information to be sent as the value of the http request is entered in JSON format. result: The information returned as a result of the request is written to this variable. When the result of the command is 200, the result value is written as 0, in other cases, it is -1. The Error information given as the Message value is written. | Set(@userinfo, "@username:@password") Set(@header, {"Content-Type":"application /json", "Authorization":"Basic @userinfo. base64"}) Set(@body, {"firmno":"@company", "sessionId":" @id"}) Http("POST","http://server.com/api/v1 /token", @header,@body,@result) //Query string Http("GET","http://server.com/api/v1/Items? code=@code", @header,,@result) | 1.0 |
...