Jump to content

DFong

uniGUI Subscriber
  • Posts

    146
  • Joined

  • Last visited

  • Days Won

    8

DFong last won the day on September 20 2022

DFong had the most liked content!

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

DFong's Achievements

Active Member

Active Member (3/4)

26

Reputation

  1. DFong

    Signature

    I haven't tried using this library, but it appears to do what you want for JPEG images: https://delphihaven.wordpress.com/ccr-exif/ Good luck and let us know if this works.
  2. I've used the following on mobile in response to a Button click on a simple dialog form named InputBox which has a TunimEdit control named InputEdit. You should be able to figure it out from the code snippets below: procedure TInputBox.GeoButtonClick(Sender: TObject); var GetLatLong : string; begin UniSession.AddJS('InputBox.OKButton.showMask("Locating...");'); GetLatLong := 'if (navigator.geolocation) {'+ ' navigator.geolocation.getCurrentPosition(showPosition); '+ ' } else { '+ ' alert("Geolocation is not supported by this browser."); '+ ' InputBox.OKButton.hideMask(); '+ ' } '+ ' function showPosition(position) { '; if (pos(' LATITUDE ',Uppercase(Caption))>0) then GetLatLong := GetLatLong + ' ajaxRequest(InputBox.InputEdit,"Latitude",["Latitude="+position.coords.latitude+""]); }' else GetLatLong := GetLatLong + ' ajaxRequest(InputBox.InputEdit,"Longitude",["Longitude="+position.coords.longitude+""]); }'; UniSession.AddJS(GetLatLong); end; procedure TInputBox.InputEditAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var Key : word; Latitude,Longitude : string; begin if (EventName='keypress') then begin Key := StrToInt(Params.Values['key']); if ord(Key)=13 then //Enter-key pressed begin FCallBack(trim(InputEdit.Text)); Close; end; end else if EventName='Latitude' then begin Latitude := Params.Values['Latitude']; //ShowMessage('Latitude: '+Latitude); InputEdit.Text := Latitude; UniSession.AddJS('InputBox.OKButton.hideMask();'); end else if EventName='Longitude' then begin Longitude := Params.Values['Longitude']; //ShowMessage('Latitude: '+Latitude); InputEdit.Text := Longitude; UniSession.AddJS('InputBox.OKButton.hideMask();'); end end;
  3. Got this link from: https://wiki.openssl.org/index.php/Binaries
  4. Yeah, it's been awhile but I somehow recall having the same behavior when I first tried it months ago as I also needed to create a password twice. At the time, I thought it may have had something to do with the app password being machine specific, but I was never able to reproduce it as I'm successfully using the latest app password from 2 different machines. Glad to hear it's working for you!
  5. I found that using an app password on your Gmail account will get around this problem: https://support.google.com/mail/answer/185833?hl=en-GB
  6. Try this: https://phantomjs.org/screen-capture.html
  7. This is beyond my skillset as I'm no good with JavaScript and even worse with CSS, but here's another link that demonstrates how this could be done using another technique with keyframes/animation if you don't want to use the marquee tag or requestAnimationFrame: https://www.w3docs.com/snippets/css/how-to-have-the-marquee-effect-without-using-the-marquee-tag-with-css-javascript-and-jquery.html https://www.w3docs.com/tools/code-editor/2117 Good luck!
  8. I've used requestAnimationFrame in a THTMLFrame to generate animations that are controlled from both the client side as well as from the server using JSCall in response to an Ajax event. There are plenty of examples on the web using requestAnimationFrame where the speed of the animation can be controlled. From the sounds of what you want to do, I still think this is the right direction to go. Not exactly what you want but this link may give you some ideas: https://medium.com/@roderickhsiao/implement-smooth-scrolling-79efb20b6535
  9. I am by no means a Javascript expert, but I've used requestAnimationFrame for simple animations in the past which sounds like it may work to implement something like what you want.
  10. <iframe src="https://www.youtube.com/embed/XZmGGAbHqa0?rel=0&hd=0&autoplay=0" frameborder="0" width="300"></iframe>
  11. I've only run WebGL with UniGUI by creating my own scenes via HTML and running them in a TUniHTML component. Within that HTML, you can insert Ajax events triggered by click actions etc. within the 3D scene to communicate with UniGUI on the server-side. Here's a basic example of rendering a 3D scene in HTML. Good luck! <head> <style> body { background: #333; overflow:hidden; } </style> <script src="files/three.min.js"></script> <script src="files/Detector.js"></script> <script src="files/OrbitControls.js"></script> <script> function drawCube() { if ( ! Detector.webgl ) Detector.addGetWebGLMessage(); var width = window.innerWidth; var height = window.innerHeight; // create a scene var scene = new THREE.Scene(); scene.fog = new THREE.FogExp2( 0xe5f3ff, 0.002 ); // renderer (canvas) var renderer = new THREE.WebGLRenderer({antialias: false}); renderer.setClearColor( scene.fog.color, 1 ); renderer.setSize( width, height ); body.appendChild( renderer.domElement ); // set a camera var viewAngle = 80; var aspect = width / height; var near = 1; var far = 1000; var camera = new THREE.PerspectiveCamera( viewAngle, aspect, near, far ); camera.position.z = 500; controls = new THREE.OrbitControls( camera ); controls.damping = 0.2; controls.addEventListener( 'change', function(){renderer.render( scene, camera );}); scene.add( camera ); // Grid var size = 500, step = 50; var geometry = new THREE.Geometry(); for ( var i = - size; i <= size; i += step ) { geometry.vertices.push( new THREE.Vector3( - size, -100, i ) ); geometry.vertices.push( new THREE.Vector3( size, -100, i ) ); geometry.vertices.push( new THREE.Vector3( i, -100, - size ) ); geometry.vertices.push( new THREE.Vector3( i, -100, size ) ); } var material = new THREE.LineBasicMaterial( { color: 0x000000, opacity: 0.2 } ); var line = new THREE.Line( geometry, material ); line.type = THREE.LinePieces; scene.add( line ); // set a directional light var directionalLight = new THREE.DirectionalLight( 0xffffff, 5 ); directionalLight.position.z = 3; scene.add( directionalLight ); // cube geometry (200 x 200 x 200); var geometry = new THREE.CubeGeometry(200, 200, 200); var material = new THREE.MeshPhongMaterial( { color: 0x660000 } ); var cubeMesh = new THREE.Mesh( geometry, material); cubeMesh.position.set(-200,0,0); scene.add( cubeMesh ); renderer.render( scene, camera ); } </script> </head> <body> <button type="button" onclick="drawCube()">Draw Cube</button> </body>
  12. I've been using these with the Chrome browser auto-starting in kiosk mode: https://www.amazon.com/Quantum-Windows-Baytrail-T-Quad-core-1-33GHz/dp/B00X4O6GRK/ref=sr_1_5?keywords=azulle+pc+stick&amp;qid=1575046706&amp;sr=8-5 These are a lot more expensive than a R-pi (~$130 USD), but being Windows 10, I can install/run my UniGui app directly on the device if necessary and just a lot easier for me to work with since it's Windows. There are cheaper versions of similar Windows devices out there but I've been using these very reliably for a few years. With the built-in HDMI connector, they can plug in directly to a TV/monitor without requiring any other mounting plate.
×
×
  • Create New...