Standalone through Remote Desktop access and VMs

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

AlbertAA
Posts: 41
Joined: Thu May 28, 2020 1:42 pm

Standalone through Remote Desktop access and VMs

Post by AlbertAA » Fri May 29, 2020 12:52 pm

I am experiencing a problem with the display of images when accessing my standalone/exe via Remote Desktop Connection (or one of MS Azure Virtual Machines).

Images that normally display well are not visible anymore when I start the exe on the server and see it via Remote Desktop.
If I set the quality down to 8 bits (in the exe I do it by changing in Properties/Compatibility/Reduced Color Mode) the pictures become visible, but the quality is very low.

After having checked that it is NOT an issue of server configuration or Remote Desktop configuration (other apps work well even through RDC) what remains to me is to check if the problem is related to the standalone itself, and if somebody has already encountered this type of issues and has an idea or suggestions on what I should change to make it work properly.

PS: For your info I am operating in France and Switzerland and developing educational simulations since many years. I must admit that although I purchased a LiveCode license some years ago, I am still using Revolution version 2 point 6 to develop and then create standalones (which I then distribute in many management schools and universities world wide).

Thank you in advance for any insights
- albert
INSEAD

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Standalone through Remote Desktop access and VMs

Post by Klaus » Fri May 29, 2020 1:34 pm

Hi Albert,

very strange!? Are you using referenced or imported images?


Best

Klaus

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Standalone through Remote Desktop access and VMs

Post by Klaus » Fri May 29, 2020 1:38 pm

Since this is really NOT off-topic, I will move this thread to the beginners section.

mrcoollion
Posts: 719
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Standalone through Remote Desktop access and VMs

Post by mrcoollion » Fri May 29, 2020 2:47 pm

AlbertAA wrote:
Fri May 29, 2020 12:52 pm
I am still using Revolution version 2 point 6 to develop and then create standalones (which I then distribute in many management schools and universities world wide).
Might be time to upgrade to LC 9 ?

Most of the RDP and graphical performance-related issues can be due to the activation or not of Remote FX.
Or you can try the acceleratedRendering feature of LiveCode to see it makes a difference.

Or take a look at the Experience settings .
Right-click the RDP connection icon (I have it saved on my desktop), select "Edit", then the "experience" tab, and change "detect connection quality automatically" to "LAN (10 Mbps or higher)"
I use terminals application on windows to make my RDP connections. It has some features you could use to test with.
https://github.com/Terminals-Origin/Terminals

Maybe no solution here but this is all I could think off.

Regards,

Paul
Terminals.png

AlbertAA
Posts: 41
Joined: Thu May 28, 2020 1:42 pm

Re: Standalone through Remote Desktop access and VMs

Post by AlbertAA » Sun Jun 21, 2020 6:55 pm

Thanks a lot. Very useful hints.

> In the meantime I have followed your advice, got a new license and moved from Rev 2 point 6 to LC 9.
> Currently I am still testing if the display is different in the case I copy/paste the pictures directly (currently I specify image sources). If copy/pasting the pictures directly rather than reading them from files does not resolve the problem on the VM I will check out the Experience setting and hope to find a solution there.

Thank you again
-albert

AlbertAA
Posts: 41
Joined: Thu May 28, 2020 1:42 pm

Re: Standalone through Remote Desktop access and VMs

Post by AlbertAA » Wed Apr 07, 2021 4:24 pm

In the meantime I have been able to resolve all my problem (ambition to run my stacks in each browser) and found a VM provider which makes it possible for me to put my stacks on a Virtual Machine. Users connect to the VM and can use the App. The display quality, response time, an even the voice are very good - even when sharing the screen real-time in a Zoom meeting with a connected team (which is how the App is used).

Still, I would like to start creating stacks for the Web directly in LiveCode. I have not found such great material on the web about current limitations etc. (although I have seen that more people seem to have adopted it to produce simple mobile apps) and I am hesitating to buy the additional license before having tried to adapt and publish on the web a couple of my test stacks and realizing which effort goes really in converting them for browser access.

Does any of you know if it is possible to get access to a trial license of the HTML5b publishing part in order to be able to experiment at least during a few days?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Standalone through Remote Desktop access and VMs

Post by richmond62 » Wed Apr 07, 2021 4:55 pm

I am hesitating to buy the additional license
Do NOT buy the additional license until you have tried to produce some HTML5
standalones with the Free Community version.

AlbertAA
Posts: 41
Joined: Thu May 28, 2020 1:42 pm

Re: Standalone through Remote Desktop access and VMs

Post by AlbertAA » Wed Apr 07, 2021 8:25 pm

Thank you for the good advice.
I will look into the Free Community version and hope that I can do some testing there.
IF testSuccessful THEN return getStarted(HTML5license) AND Celebrate() ELSE return limitWastedTime(HTML5) AND feedback(blockingFactorsArray).
Will keep you informed.

AlbertAA
Posts: 41
Joined: Thu May 28, 2020 1:42 pm

Re: Standalone through Remote Desktop access and VMs

Post by AlbertAA » Fri Apr 09, 2021 3:44 pm

Hello. I am trying to test some of my stacks as HTML5 standalones (using the Free Community version for the moment), and I met first difficulties with things I would consider basic and that run well normally: importing the content of txt or jpgs which are on the web into fields and images within my stack. Thought that handling urls was even easier with HTML5 standalones, but it is not the case, at least for me.

If you want to see the details of what I tested in order to be able to import text or images from a web address, you can see below (and the questions which emerged). The reality is that I still do not understand how to "adapt" the code so that the HTML5 standalones work too.

Thank you for your help. When trying HTML5 I seem to get stuck with relatively simple txt/images exchange with files which are on the web (things which work well normally). Am I missing a Doc on "What to change when producing HTML5 standalones"?

-albert


DIFFICULTIES WITH HTML5 STANDALONE IMPORTING FROM txt/jpg FILES FROM THE WEB -----------------------------------------------------------------------
I have gone through the Lesson in https://lessons.livecode.com/m/4071/l/7 ... revolution

I have used their code, and it works well, with one exception: When I create a HTML5 standalone (I am using the Community version, and evaluating to buy an additional HTML5 version, on top of my commercial Indy one).
-- put "https://www. ... .txt" into theURL
-- put URL theURL into theWebPageContent
-- put the result into theError
-- if theError is empty then
-- set the text of field "ReportField" to theWebPageContent
-- else
-- set the text of field "ReportField" to "An error occurred:" && theError & "."
-- end if
Just the presence of this code makes that after calling the HTML5 standalone in a browser (and witing until LC loads) the web page remains empty - or just the small LC logo. This istrange because the app reappears if I just remove these lines of code.
HTML5 must really HATE them :) Would you know why and what I should adapt?

The same applies when i use the code you describe in your "Using Load" section.

I have also tried to slightly adapt their code to fill an image with the content of a URL (http://...jpg), but I did not even succeed to get a code that LC would accept. Is there a Lesson for this too?


Btw, In order to fill an image from a URL I have also tried:
set the filename of image "ProfileImage" to "https:// ... .jpg"
This approach works well, except in the HTML5 standalone. Why?

I also tried the simple
launch URL myURL
Same results. It works well (at least in opening the picture in a briwser - rather than in my image, as I would prefer), except for the HTML5 standalone. Why?

I finally noticed that functions like
tsNetHeadSync
do not compile in the Community version - whilst they work well in my Indy. Is this just a problem of the Community version? But the key question is: Will these commands (which I use extensively) also work with HTML5 standalones?

poco
Posts: 10
Joined: Mon Feb 22, 2021 10:15 pm

Re: Standalone through Remote Desktop access and VMs

Post by poco » Fri Apr 09, 2021 7:10 pm

If you want to convert your apps to "web applications" you might consider LiveCode Server. I have looked into it briefly and working with it seems very similar to working with Ruby on Rails. If you have any familiarity with Rails it should be a fairly painless transition. Just FYI.

AlbertAA
Posts: 41
Joined: Thu May 28, 2020 1:42 pm

Re: Standalone through Remote Desktop access and VMs

Post by AlbertAA » Sat Apr 10, 2021 12:01 am

Thank you. I know the LC Server and use it successfully (but for other purposes).
I just thought that the HTML5 version by now was able to make you produce a simple website fully in LC able to fetch data from a text of jpg file on the web and display it in a field or image. But even this does not seem so easy.

AlbertAA
Posts: 41
Joined: Thu May 28, 2020 1:42 pm

Re: Standalone through Remote Desktop access and VMs

Post by AlbertAA » Sat Apr 10, 2021 1:05 pm

Still struggling.
Can somebody point me to a Doc where I can find explanations on:

1. Why does launch URL "https://www .... .jpg not work in the HTML5 standalone + which commands to use instead
2. Why does set the filename of image "ProfileImage" to "https:// ... .jpg not work in the HTML5 standalone + how to import pictures.
3. When making HTML5 standalone, what to use instead of tsNet functions like tsNetHeadSync , as these functions also do not seem to work.

Thank you.

elanorb
Livecode Staff Member
Livecode Staff Member
Posts: 516
Joined: Fri Feb 24, 2006 9:45 am

Re: Standalone through Remote Desktop access and VMs

Post by elanorb » Mon Apr 12, 2021 2:27 pm

Hi

I replied to your lesson comment but I thought I would post here too.

I think this is probably because your browser is seeing these as cross-origin requests. If you check the result after trying one of the commands you should be able to see what the related error message is.

Since this is an HTML5 specific issue you might get some help in the HTML5 forum too.

viewforum.php?f=120

Kind regards

Elanor
Elanor Buchanan
Software Developer
LiveCode

AlbertAA
Posts: 41
Joined: Thu May 28, 2020 1:42 pm

Re: Standalone through Remote Desktop access and VMs

Post by AlbertAA » Mon Apr 12, 2021 3:48 pm

Thank you Elanor.

I followed your advice and inserted the following script in an image (after indicating a valid open URL (https://www. ... .jpg" in the source:
launch URL the filename of me
put the result into theRes
answer theRes
In the normal standalone everything works fine, but in the HTML5 standalone the image does not appear, and if I click I get a dialog box with the text "no association" and a close button.

I am testing with the Community version, following the instructions of https://lessons.livecode.com/m/4071/l/8 ... on-the-web and using different browser to test the standalone. The HTML5 standalone works fine except for the commands I was listing above.

I have not been very lucky in finding more about this "no association" error, what causes it, and how too remove it.
Thank you for any hints.

elanorb
Livecode Staff Member
Livecode Staff Member
Posts: 516
Joined: Fri Feb 24, 2006 9:45 am

Re: Standalone through Remote Desktop access and VMs

Post by elanorb » Thu Apr 15, 2021 3:16 pm

Hi Albert

If images are hosted on the same domain as the HTML5 app it should work. If they have been uploaded separately you can use a URL reference. You can also include them in the Copy Files pane of the Standalone Application Settings and use specialFolderPath("resources") to build the path to the file.

If you are trying to access files on a different domain you will run into cross origin issues. You may be able to allow this in your server config.

The "no association" message come from launch url command. It is returned if no application is available to handle the URL.

The launch url command does not work in HTML5 but you can achieve the same thing using JavaScript.

Code: Select all

local tScript
   
if the platform is "html5" then
   put "window.open('https://www.livecode.com')" into tScript
   do tScript as "JavaScript"
 end if 
I hope that helps.

Elanor
Elanor Buchanan
Software Developer
LiveCode

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”