herculanojs Posted September 13, 2017 Share Posted September 13, 2017 Is anyone successfully using TMS Scripter with Unigui? I have approximately 80% of codes working properly, and some things still have problems. Conform a previous post, it would be very interesting if we got a satisfactory interaction with TMS Scripter or some other pascal code interpreter, so we could have a more dynamic application possible. Good the problems that I face: a) In form creation, if it contains the property freeonclose as true, I get exception when closing the form: "There is no Default JavaScript Object " In the clientEvents assignment: the added codes are not executed Someone would know or could tell me some solution to these cases, or know some pascal code interpreter that works perfectly with unigui. scRelacaoPessoa_Produto.txt Link to comment Share on other sites More sharing options...
sbokhari Posted September 13, 2017 Share Posted September 13, 2017 Hello Herculanojs, Take a look at http://paxcompiler.com/. It is actively in development. I think it is free but I haven't read their licensing module. If it's licensing model fits and works with UniGUI, then it should be in UniGUI by default like UniSynaxEditor. One of my friends has used it in his project and praised it. According to their website: About paxCompilerpaxCompiler is an embeddable cross-platform compiler of the Object Pascal, Basic and JavaScript programming languages. The key features of the paxCompiler are: The compiler generates machine code for Intel compatible processors (IA-32/64 architecture) for platforms: Win32/Win64, Mac OS, iOS Simulator. The second script runner is a cross-platform interpreter based on intermediate code. Supported platforms are Win32/Win64, Linux, Android, Mac OS, iOS Simulator, iOS Device. The compiler is written in Delphi and it is compatible with Free Pascal/Lazarus 32/64 bit. It is possible to use the compiler as a scripting engine, so you can customize and extend the application without having to recompile it. The compiler supports Object Pascal language based on the Delphi 7 standard and extends it with generic types, operator overloading, anonymous functions and closures, lambda-expressions. Syntax of Basic language is similar to VB.NET. JavaScript implementation is based on ECMA-262 standard. Cross-language programming support. You can use Pascal units in Basic and JavaScript programs and vice versa. COM support. paxCompiler components allow you to implement debugger and code explorer. Script-defined types support run-time information (RTTI). You can bind instances of script-defined classes with dfm files. You can import host-defined types with paxCompiler importer. Automatic import of host-defined types is available for Delphi XE2-XE7. You can create stand alone executable files and dlls. Support of compiled units and run-time packages. paxCompiler engine is thread safe. The nearest milestones on road map of the compiler development include: C/C++ compiler and native code generator for ARM processors Regards Link to comment Share on other sites More sharing options...
wangxuebin Posted September 14, 2017 Share Posted September 14, 2017 hi,intersting! you can try FastScript in Unigui. FastScript has small footprints and is simple to use,by using it you can create unicomponents(like uniform,...) in script. Link to comment Share on other sites More sharing options...
herculanojs Posted September 14, 2017 Author Share Posted September 14, 2017 I'll take a look at these engines. Link to comment Share on other sites More sharing options...
itognet Posted September 26, 2017 Share Posted September 26, 2017 bump. have you any results of trying the pax compiler ? Link to comment Share on other sites More sharing options...
herculanojs Posted September 26, 2017 Author Share Posted September 26, 2017 Unfortunately I did not get any satisfactory tests. For some reason, I still could not concentrate on that. Even following some examples of pax, nothing seems to happen. I have not tested it yet in the desktop environment, to check if it is something related to the web environment. Link to comment Share on other sites More sharing options...
itognet Posted September 26, 2017 Share Posted September 26, 2017 Here you go Add PaxCompiler, PaxPascalLanguage and PaxInterpreter to UniForm. Add UniButton16 to UniForm Add UniMemo2 to UniForm Contents of UniMemo2: begin UniButton16.Caption := 'Greets to Farshad'; end. procedure TMainForm.UniButton16Click(Sender: TObject); var I, H_TButton: Integer; begin PaxCompiler1.Reset; PaxCompiler1.RegisterLanguage(PaxPascalLanguage1); H_TButton := PaxCompiler1.RegisterClassType(0, TUniButton); PaxCompiler1.RegisterVariable(0, 'UniButton16', H_TButton, @UniButton16); PaxCompiler1.AddModule('1', PaxPascalLanguage1.LanguageName); PaxCompiler1.AddCode('1', UniMemo2.Lines.Text); if PaxCompiler1.Compile(PaxInterpreter1) then PaxInterpreter1.Run else for I:=0 to PaxCompiler1.ErrorCount - 1 do ShowMessage(PaxCompiler1.ErrorMessage); end; Link to comment Share on other sites More sharing options...
herculanojs Posted September 26, 2017 Author Share Posted September 26, 2017 Okay, I'll soon be testing. thank you Link to comment Share on other sites More sharing options...
pedrisco Posted September 27, 2017 Share Posted September 27, 2017 Hi What about RemObjects Pascal Script ?, its license is very permissive, i have downloaded it many times but i don't have the time to test it, i've tried some RemObjects products and they usually work fine. Link to comment Share on other sites More sharing options...
herculanojs Posted October 25, 2017 Author Share Posted October 25, 2017 Here you go Add PaxCompiler, PaxPascalLanguage and PaxInterpreter to UniForm. Add UniButton16 to UniForm Add UniMemo2 to UniForm Contents of UniMemo2: begin UniButton16.Caption := 'Greets to Farshad'; end. procedure TMainForm.UniButton16Click(Sender: TObject); var I, H_TButton: Integer; begin PaxCompiler1.Reset; PaxCompiler1.RegisterLanguage(PaxPascalLanguage1); H_TButton := PaxCompiler1.RegisterClassType(0, TUniButton); PaxCompiler1.RegisterVariable(0, 'UniButton16', H_TButton, @UniButton16); PaxCompiler1.AddModule('1', PaxPascalLanguage1.LanguageName); PaxCompiler1.AddCode('1', UniMemo2.Lines.Text); if PaxCompiler1.Compile(PaxInterpreter1) then PaxInterpreter1.Run else for I:=0 to PaxCompiler1.ErrorCount - 1 do ShowMessage(PaxCompiler1.ErrorMessage); end; Would anyone have an idea how to create a form using paxcompiler Link to comment Share on other sites More sharing options...
Le Meur Guillaume Posted October 25, 2017 Share Posted October 25, 2017 To my point of view : - FastScript is very powerfull, easy to implement and to use. (Debug etc ...) And it comes with FastReport ... - PaxCompiler : I've never succed with it - TMS Scripter : The only working under Android. Using script with uniGui : the main problem is when you want a "ModalDialog" during your script, to allow user to answer question... That's why we build something like "WorkFlow" to reproduce this step... Link to comment Share on other sites More sharing options...
Jancarlos Martins Posted December 1, 2017 Share Posted December 1, 2017 Tudo bem Herculano, Consigui mapear quase todos os componentes do Unigui, o negócio ficou louco, estou fazendo uma aplicação que não vai precisar nem do Delphi, o problema e fazer todas as telas na mão, estou criando um Form Design, esta em 70%, consigo gerar DFM e Pas e ler em tempo de execução com o Script. Pra você ter ideia consigui mapear ate as classes de conexão de banco de dados. Quando estivar funcional aviso. Até.. 1 Link to comment Share on other sites More sharing options...
herculanojs Posted December 1, 2017 Author Share Posted December 1, 2017 Muito legalEu tenho um problema que não consegui identificar na criação de formulários.Se deixo o formulário como FreeonClose ocorre acesso inválido de memóriaSe deparou com algo assim? very coolI have a problem that I could not identify in form creation.If I leave the form as FreeonClose invalid memory access occursDid you come across something like that? exemple: Script fm := TUniForm.CreateNew( Self );fm.FreeOnClose := false;fm.Caption := ':titulo';fm.BorderStyle := bsSingle;fm.BorderIcons := [biSystemMenu];fm.Width := 350;fm.Height := 240; fm.showmodal; procedure TScripter.CreateNewForm(AMachine: TatVirtualMachine);begin With AMachine do begin //form := TUniForm.Create(UniApplication); ReturnOutputArg(ObjectToVar(TUniForm.Create(UniApplication))); end;end; with Scripter.AddDelphiClass(TUniForm) dobegin DefineMethod('CreateNew',1,tkClass,nil,CreateNewForm,true); DefineMethod('ShowModal',0,tkInteger,nil,ShowModalFormProc);end; Link to comment Share on other sites More sharing options...
emarquesc Posted March 28, 2018 Share Posted March 28, 2018 Olá Herculano, Também estou tentando fazer o Unigui funcionar com o TMS Scripter, porem não consegui avançar como você. Quais classes você conseguiu mapear com o importtool, pois não estou conseguindo com sucesso. Passa uma dica se possível. Obrigado. Link to comment Share on other sites More sharing options...
eric Posted March 29, 2018 Share Posted March 29, 2018 Hi Herculanojs, did u invest more in this scripting added to unigui ? i am interested by the solution. what kind of script works better? eric Link to comment Share on other sites More sharing options...
herculanojs Posted September 12, 2018 Author Share Posted September 12, 2018 On 12/1/2017 at 3:33 PM, perjanbr said: Tudo bem Herculano, Consigui mapear quase todos os componentes do Unigui, o negócio ficou louco, estou fazendo uma aplicação que não vai precisar nem do Delphi, o problema e fazer todas as telas na mão, estou criando um Form Design, esta em 70%, consigo gerar DFM e Pas e ler em tempo de execução com o Script. Pra você ter ideia consigui mapear ate as classes de conexão de banco de dados. Quando estivar funcional aviso. Até.. Boa tarde meu nobre Conseguiu avanço ? Link to comment Share on other sites More sharing options...
Jancarlos Martins Posted September 14, 2018 Share Posted September 14, 2018 Tudo bem, olha ai, www.uniscript.com.br:8077/?app=samples www.uniscript.com.br:8077/?app=dashboard1 www.uniscript.com.br:8077/?app=dashboard2 www.uniscript.com.br:8077/?app=jquery tudo script .pas e .dfm, um único executavel vai rodar vários projetos. 1 Link to comment Share on other sites More sharing options...
herculanojs Posted September 18, 2018 Author Share Posted September 18, 2018 On 9/14/2018 at 1:19 PM, perjanbr said: Tudo bem, olha ai, www.uniscript.com.br:8077/?app=samples www.uniscript.com.br:8077/?app=dashboard1 www.uniscript.com.br:8077/?app=dashboard2 www.uniscript.com.br:8077/?app=jquery tudo script .pas e .dfm, um único executavel vai rodar vários projetos. Show de bola Link to comment Share on other sites More sharing options...
alp.yilmaz Posted December 16, 2018 Share Posted December 16, 2018 On 9/14/2018 at 8:19 PM, perjanbr said: Tudo bem, olha ai, www.uniscript.com.br:8077/?app=samples www.uniscript.com.br:8077/?app=dashboard1 www.uniscript.com.br:8077/?app=dashboard2 www.uniscript.com.br:8077/?app=jquery tudo script .pas e .dfm, um único executavel vai rodar vários projetos. Hello there The url you are showing does not work. Can you share a sample code part of the script I thank you for your help now. Link to comment Share on other sites More sharing options...
alp.yilmaz Posted December 16, 2018 Share Posted December 16, 2018 On 12/2/2017 at 12:43 AM, herculanojs said: Muito legal Eu tenho um problema que não consegui identificar na criação de formulários. Se deixo o formulário como FreeonClose ocorre acesso inválido de memória Se deparou com algo assim? very cool I have a problem that I could not identify in form creation. If I leave the form as FreeonClose invalid memory access occurs Did you come across something like that? exemple: Script fm := TUniForm.CreateNew( Self ); fm.FreeOnClose := false; fm.Caption := ':titulo'; fm.BorderStyle := bsSingle; fm.BorderIcons := [biSystemMenu]; fm.Width := 350; fm.Height := 240; fm.showmodal; procedure TScripter.CreateNewForm(AMachine: TatVirtualMachine); begin With AMachine do begin //form := TUniForm.Create(UniApplication); ReturnOutputArg(ObjectToVar(TUniForm.Create(UniApplication))); end; end; with Scripter.AddDelphiClass(TUniForm) do begin DefineMethod('CreateNew',1,tkClass,nil,CreateNewForm,true); DefineMethod('ShowModal',0,tkInteger,nil,ShowModalFormProc); end; hi , Can you share a simple program example that illustrates the use of FastScript. Thank you. Link to comment Share on other sites More sharing options...
herculanojs Posted January 6, 2021 Author Share Posted January 6, 2021 On 28/03/2018 at 14:35, emarquesc said: Olá Herculano, Também estou tentando fazer o Unigui funcionar com o TMS Scripter, porem não consegui avançar como você. Quais classes você conseguiu mapear com o importtool, pois não estou conseguindo com sucesso. Passa uma dica se possível. Obrigado. Hello, I managed to solve all the problems with TMS. Tell me which point has difficulty, that I can help you. Link to comment Share on other sites More sharing options...
herculanojs Posted January 6, 2021 Author Share Posted January 6, 2021 On 29/03/2018 at 15:22, eric said: Olá Herculanojs, você investiu mais neste script adicionado ao unigui? estou interessado na solução. que tipo de script funciona melhor? Eric Hello, I managed to solve all the problems with TMS. Link to comment Share on other sites More sharing options...
herculanojs Posted January 6, 2021 Author Share Posted January 6, 2021 On 12/16/2018 at 4:58 AM, alp.yilmaz said: hi , Can you share a simple program example that illustrates the use of FastScript. Thank you. I don't use fastscript, I use the TMS Scripter Link to comment Share on other sites More sharing options...
Wilton Ergon Posted January 6, 2021 Share Posted January 6, 2021 On 14/09/2018 at 14:19, Jancarlos Martins said: Tudo bem, olha ai, www.uniscript.com.br:8077/?app=samples www.uniscript.com.br:8077/?app=dashboard1 www.uniscript.com.br:8077/?app=dashboard2 www.uniscript.com.br:8077/?app=jquery tudo script .pas e .dfm, um único executavel vai rodar vários projetos. fora do ar Link to comment Share on other sites More sharing options...
sagt3k Posted January 9, 2021 Share Posted January 9, 2021 Hi wilton_rad I'm ver interested to script example but the link aren't function, www.uniscript.com.br:8077/?app=samples Thanks for your support Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now