Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programmatically keep a session from idling
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01284395
Message ID:
01284677
Vues:
13
>I tried the following code...
>
>STRTOFILE('Mike', 'C:\Temp.txt')
>x=CreateObject("word.application")
>x.Documents.Open('c:\Temp.txt')
>x.Documents.Save()
>x.Quit
>
>And it still goes idle. I checked and when this code runs it does change the date time on my file so i know it's accessing it. Any more thoughts?

I'm assuming the code above, and other things you're trying, are running on the TS session. If so I suspect the session is timing out because it generates no traffic between the TS session and the client, i.e. that's what's defined as "inactivity".

If your TS session supports file transfer, you could try periodically transferring a small file from the TS to the client (or vice versa). This would need to be a scheduled task on the client computer. I'm not sure exactly how this could be done - the TS session at the client may be sandboxed and not available to other processes on the client. OTOH maybe your app on the server could periodically try to push a small file back to the client, or read one from the client. Basically, something to try to generate traffic between the TS session and the client.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform