Skip to main content

Posts

Showing posts with the label TIScript

Simple Calc using golang and sciter-sdk

calc usin golang andsciter Last Update : 18-07-2018 Up to this, we know how to create a window, put elements inside it, get input from the user and convert them in datatype we want. We also know how to pass that converted input data to golang function and update GUI elements according to the response/ result we get from the execution of GUI element. Here I am sharing the code of calc which actually requires all of the elements we have seen in previous examples. GUI File Here  I am sharing GUI file given by Andrew as suggestions. But you can check original GUI code that I have written in case you want to curious how much this code is more optimized than the original code. main-update.html <html>     <head>                <style>                    html { background:transparent; }           div#buttons {           ...

Process Input Grabed From TIScript in Golang

process golang input in sciter In the real-world scenario, you have to get input from the user via GUI and then have to pass it down to go code for the further process. For example, let's say you are just creating a simple to-do app which takes the input of task and then stores it in the SQLite table which is handled by go code. In that case, you have to take data from the user using HTML and sciter and then have to pass that data to go code. Though the upper scenario is more real, we will go with a very simple example [ as still, we are in earlier stages ]. We will take two integer inputs from the user and then send those inputs to go function that will show the response given by code in the GUI over a label. First Lets See a working demo  Main goal of this post is to show you use of  ' view  ' in TIScript and ' DefineFunction ' function in GoLang File. So let's see the GUI File First.  GUI File First of all we will setup our input elements to get integers (...

Get Input In TIScript with sciter-sdk

What if you can not get input from the user in your application. This example is to show you how you can get user input from TIScript and process it with TIScript. Yes processing input on GUI Side. GUI File Making basic HTML layout with use of sugar syntax supported by sciter. I am using sciter syntax over defult HTML which also supported by sciter because its more consice and provieds more functionality like, we can define type of data input should accept on the tag itself so we don't have to do any datatype converions later on in TIScript.  Input tag is to get input while we will listen for click action on button. So lets just define HTML first. <html>     <head>                <style>                   </style>     </head>     <body>        <h1>Simple Input</h1>        ...

First Program With TIScript and Sciter Sdk

TIScript and Golang I am showing a very simple example of TIScript. By the way it, not an official intro. I will give more details on TIScript in future posts. This post is just to show you a simple demo of TIScript. It's like Hello TIScript GUI File In this example, I am introducing something new in HTML file instead of the Golang file so, focus here. So let's start with basic HTML that has just two elements an < H1>  tag say press button and other is the button with id btn1 main.html <html>     <head>                <style>                   </style>     </head>     <body>        <h1>Press Button</h1>            <!-- You can use this sugar syntax           To define id use '#[id]' instead of 'id=[id]'       ...