Jump to content

erich.wanker

uniGUI Subscriber
  • Posts

    867
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by erich.wanker

  1. Hi .. has someone a idea why this simple OLE doesnt work? (the paths and Files are correct) in my hyperserver-hosted unigui-dll ( is it a user right thing?? .. the apache webserver is running as "local System" ...) ThanX Erich uses ComObj, Variants var: WordApplication, WordFile : OleVariant; ... WordApplication := Null; WordFile := Null; try // create Word OLE try // Check if Word is already opened? WordApplication := GetActiveOleObject('Word.Application' ); except try WordApplication := CreateOleObject('Word.Application' ); WordApplication.Visible := true; except Exception.Create( 'Error' ); end; end; except WordApplication := Null; end; If VarIsNull( WordApplication ) = False then begin try WordApplication.Visible := true; WordApplication.DisplayAlerts := true; // Open Word File try WordFile := WordApplication.Documents.Open(merge_dateiname_mit_pfad ); except WordFile := Null; end; If VarIsNull( WordFile ) = False then begin WordFile.SaveAs2( merge_destfolder + '\aenderung' + UniMainModule.Z_AENDERUNG.FieldByName( 'Reportnummer' ).AsString + '\converted.pdf', 17 ); // wdFormatPDF = 17 end else begin showtoast('Word-Dok not saved'); end; finally WordFile.Close; WordApplication.DisplayAlerts := true; WordApplication.Quit; WordFile := Unassigned; WordApplication := Unassigned; end; end else begin showtoast('Word Application not started'); end;
  2. Hi.. i need one booean-variable - what is readable or writeable in every node/session of a hyperserver UniGui-DLL (on one pysical computer - no server farming) on the server - i have a not threadsave 3rd party tool - and if a user starts this tool (runtime 3 seconds) - i want to write 1 in the boolean variable .. so no other user can start this since the value is set to 0. ThanX Erich
  3. Hi i want to move the scollbox in a desktop app with the mouse if left mousebutton down - the movement of the mouse should send to the scrollbox .. the same thing like a Smarthone-app makes with finger tabs ThanX for help πŸ™‚ Eric
  4. OK . got it πŸ™‚ private { Private declarations } my_unitreeNode : TunitreeNode; procedure TUniForm.UniTreeMenu1SelectionChange(Sender: TObject); begin my_unitreeNode:= UniTreeMenu1.Selected; if my_unitreeNode.Text = 'Aktuelle News' then begin
  5. Hello everyone and thank you for your support. I have not been able to solve the problem with safari and give up. I will change the logistics in my software - to work around the problem. Norm: I want a parent main menu - that is always above any currently visible window. I will now create many copies of this main menu to solve the problem. Thank you very much Eric
  6. Hi .. how do read the clicked Item of a UniTreeMenu ? onSelectionChange and onClick gives me just (Sender: TObject); i think i must use something like (Sender as TUniTreeMenu).. ??? ThanX for help and nice greetings Erich
  7. Hi .. i tested a lot different Safaris / different versions of OS / different devices iPad, iPhone . . the problem is in every situation with an apple browser
  8. hi πŸ™‚ ant thank you for your support This doesnt help in the testcase i use { translateZ(1000px) !important; -webkit-transform: translate3D(0,0,0) !important; transform: translate3D(0,0,0) !important; position: absolute !important; z-index: 90000 !important;}');
  9. Hi .. i want to give an UniContainerpanel the css -> z-Index: 900000 !important; and it works fine in chrome, edge, firefox, opera ... JUST Apple makes problems... 😞 (i treid a lot: .hauptmenu { translateZ(1000px) !important; -webkit-transform: translate3D(0,0,0) !important; transform: translate3D(0,0,0) !important; position: absolute !important; z-index: 90000 !important;}'); i made a testcase for this - if someone has a idea how to solve this The paged Mainform has a UniContainerpanel (as Mainmenu) and a button -> UniForm1.showmodal Chrome shows the black UniContainerpanel correct over UniForm1 Safari ignores the css - and put the form over the black UniContainerpanel if someone has a solution - what would be fine πŸ˜‰ ThanX Erich testcase.zip
  10. can someone translate this to javascript - please πŸ˜‰ display_panel = Tuniscrollbox toppanel = TUniContainerpanel procedure TMainForm.display_panelScrollChange(Sender: TComponent; const X, Y: Integer); begin new_y:=y; if old_y < new_y then toppanel.top := -125 else toppanel.top :=0; old_y:= new_y; end; ..i want to hide header on scroll down, show on scroll up ... my delphi code works like i want .. but my code workes just after a time-delay and that is not nice πŸ˜‰ ThanX Erich
  11. i found https://richtexteditor.com/ it looks good - and i like the drag&drop of images .. (but i dont know how to store a text inclusive images!! in a unigui project) Is someone using this editor and can give a suggestion how stable and good it works? ThanX Erich
  12. PS. to install the certificate into Windows Trusted Root Certificates - i use: // Add the cert.pem on the Windows Trusted Root Certificates cert_pem := Dossier + 'cert.pem'; Chemin := ExtractFilePath( Application.ExeName ) + 'Data\OpenSSL\export.ps1'; // prepare the Script MyText := TStringlist.create; try MyText.Add( '$CertificateName = "UNIGUI_All_OS"' ); MyText.Add( '$Certificate = Get-ChildItem "CERT:\" -Recurse | ' ); MyText.Add( ' Where-Object {$_.FriendlyName -eq "UNIGUI_All_OS"} ' ); MyText.Add( 'Export-Certificate -Cert $Certificate -FilePath "'+ ExtractFilePath( Application.ExeName )+'\exportiertes_zertifikat\your_name.cer'+'" ' ); MyText.SaveToFile( Chemin ); finally MyText.Free end; sleep( 300 ); // Execute the Script ch := '/K powershell.exe -executionpolicy bypass -file "' + Chemin + '"'; Dossier := GetEnvironmentVariable( 'SYSTEMROOT' ) + '\System32'; ShellExecute( Application.Handle, 'runas', 'cmd.exe', PChar( ch ), PChar( Dossier ), SW_HIDE );
  13. Hi Abaksoft, Thanx for your PERFECT work .. i tried a lot! of things and found a solution for the Android Problem πŸ˜‰ The maion problem is the "-extensions v3_req" 1. change in delphi: //A.2.2 root.pem stDays:=intToStr(365 * upYrears.Position); param:='req -x509 -days ' + stDays + ' -new -nodes -key root.key -out root.pem -config san.cnf -extensions v3_req'; ShellExecute(Application.Handle ,PChar('RunAs'),PChar(Fichier),PChar(param),PChar(Dossier),SW_HIDE); sleep(300); //A.2.3 cert.pem param:='req -x509 -nodes -days ' + stDays + ' -newkey rsa:2048 -keyout key.pem -out cert.pem -config san.cnf -extensions v3_req'; ShellExecute(Application.Handle ,PChar('RunAs'),PChar(Fichier),PChar(param),PChar(Dossier),SW_HIDE); sleep(300); 2. change in san.cnf [req] default_bits = 2048 distinguished_name = req_distinguished_name req_extensions = v3_req x509_extensions = v3_req prompt = no [req_distinguished_name] countryName = XX stateOrProvinceName = N/A localityName = N/A organizationName = Self-signed certificate commonName = Self-signed certificate [req_ext] subjectAltName = @alt_names [v3_req] subjectAltName = @alt_names basicConstraints = critical,CA:true [alt_names] IP.1 =10.0.0.10 3. Export CA in Windows - and import it as CA in Android .. Works πŸ™‚
  14. Hi .. has anyone a sample-code how to scroll a uniscrollbox left or right by clicking Unibuttons unibutton1.onclick -> should scroll actual position +100px (if higher whan maximum then maximum) unibutton2.onclick -> should scroll actual position -100px (if less 0 then 0) ThanX for Help πŸ™‚ Erich
  15. Hy and ThanX for Infos... i will try: In Delphi: if NodeZero then begin in CFG-File: persistent_node_zero=1 nice greetings Erich
  16. Hi, a uniGui App on IIS with Hyperserver does not start the daily task correctly- what i need for importing data every 24 hours How i use the UniThreadTimer: on Servermodule - i have a uniThreadTimer with intervall 2000000 (0,5 hours) procedure TUniServerModule.UniThreadTimer1Timer( Sender : TObject ); begin disconnect_to_my_mysql_database; connect_to_my_mysql_database; read_last_sync_date_in_table_settings; if last_sync_date <> actual_date then begin UniThreadTimer1.Lock; .. do my things UniThreadTimer1.unLock; end; end; Any Idea why this not work correctly? ThanX for help Erich
  17. Hi, if i click the checkbox to select ALL in uniDBGrid (dgCheckSelect and dgMultiselect and dgTitleClick =true) following happens: 1. every row will be select 2 following procedure will start procedure Tf_Monthly_Report.MydbgridTitleClick(Column: TUniDBGridColumn); begin my_Fieldname_1 := Column.FieldName; if my_Direction_1 = true then my_Direction_1 := False else my_Direction_1 := true; start_sql; // order by my_Fieldname_1 - my_Direction_1 represents asc / desc end; 3. the table will become a new sql statement 4. the selection is lost how can i solve this? ThanX Erich
  18. OK .. i made a WorkAround πŸ˜‰ procedure Tf_project_main.UniFrameCreate( Sender : TObject ); begin UniContainerpanel.ClientEvents.ExtEvents.Add('OnAfterrender=function OnAfterrender(sender, eOpts)'+ '{ sender.getEl().dom.addEventListener('+#39+'wheel'+#39+', function(e) { e.preventDefault();'+ 'ele = document.getElementById('+#39+ unidbmemo1.JSName+'_id-inputEl'+#39+');'+ 'ele.scrollTop += e.deltaY;'+ '}, false); }' );
  19. i have a Uniframe - in this i have a UniDBMemo1 .. and a TuniContainerpanel The UniContainerpanel has in ClientEvents -> ExtEvents following: function afterrender(sender, eOpts) { sender.getEl().dom.addEventListener('wheel', function(e) { e.preventDefault(); ele = document.getElementById('O73A_id-inputEl'); ele.scrollTop += e.deltaY; }, false); }
  20. Hello, i have a Uniframe - in this i have a UniDBMemo ... i use "document.getElementById('O73A_id-inputEl'); " in ClientEvent->ExtEvent to change the scroll position of this UniDBMemo but what is the right way? .. the id of the element (which i found in Chrome DevTools) can be changed if i delete or add componens to my UniFrame ? ThanX Erich
  21. i have a editlock = TUniContainerPanel i have a UniDBMemo1 = TUniDBMemo i want to scroll the UniDBMemo1 - if the mouse is over the editlock and the wheel is turning ... i made this in "editlock" -> clientEvents -> Extevents: function afterrender(sender, eOpts) { sender.getEl().dom.addEventListener('wheel', function(e) { e.preventDefault(); ele = document.getElementById('O73A_id-inputEl'); ele.scrollTop += e.deltaY; }, false); } it works .. ThanX Erich
  22. Hy, i have one server with apache webserver in htdocs - i have 2 folders customer1 customer2 in each folder - i have the same application : start.exe (my app) start.dll (unigui hyperServer DLL) start.cfg (see end of my posting) start.ssl.cfg (disabled - Apache handles the thing) and the generated folders for files,cache, log, nodes.inf and so on so every customer can start his own version of the app with the url: www.domainname.com/customer[x]/start.dll It works - BUT: if i start the internet address - a lot of (i think) "timed out sessions" are starting first and i must click "refresh" 2 or 3 times till i can start a functionary session .. (it shows the "terminateTemplate where i can reload the app) .. as workAround i wrote in terminateTemplate : <script type="text/javascript">window.location.reload();</script> i made only one different between the cfg-files (in the different foders) : [http_transport] start_port=15005 customer1 has the valus 15005 customer2 has the value 5005 Must i change other things to make my special-solution to run stable?? start.cfg: [transport] pool_size=0 command_timeout=20000 request_timeout=300000 connect_timeout=20000 [http_transport] start_port=15001 [hyper_server] binary_name=start.exe initial_nodes=2 max_nodes=8 max_sessions=0 sessions_per_nodes=0 prompt_login=1 persistent_node_zero=0 detailed_log=0 port=17082 url_path= url_referer= ext_root=[ext]\ uni_mobile_root=[unim]\ uni_root=[uni]\ server_root= uni_packages_root=[unipack]\ max_requests=500 antiflood_per_ip=0 server_root= server_title= framework_files_root= server_build=1.90.0.1563 http_max_pool=500 max_connections=500 session_one_per_ip=0 dont_create_backup=0 allow_remote_config=1 domain_cookies=0 token=fil7676hghgh230503101632826 [node_recycling] enabled=0 recycle_after_secs=3600 recycle_after_sessions=0 recycle_after_idle_secs=300 recycle_when_empty=1 recycle_after_idle_seconds=0 [login-0] user_name= password=! admin=1 [login-1] user_name= password= admin=0 [login-2] user_name= password= admin=0 [login-3] user_name= password= admin=0 [login-4] user_name= password= admin=0 [login-5] user_name= password= admin=0 [login-6] user_name= password= admin=0 [login-7] user_name= password= admin=0 [login-8] user_name= password= admin=0 [login-9] user_name= password= admin=0 [custom_mimes] mime_0_ext= mime_0_type= mime_1_ext= mime_1_type= mime_2_ext= mime_2_type= mime_3_ext= mime_3_type= mime_4_ext= mime_4_type= .exe, application.dll
  23. I canΒ΄t make a Unigui App run with a letsencrypt cert .. i allways become "Could not load root certificate" Has someone a idea why or a How-to ?
×
×
  • Create New...