martedì 9 giugno 2015

Creare un messanger per facebook in 1 minuto

Questo è un trucco che ho visto fare in altri linguaggi di programmazione e lo propongo anche in livecode. Esiste il sito www.messenger.com che è un pagina web che fa da client chat per facebook.
Quindi basta usare un browser per avere il nostro client di chat. Con livecode possiamo creare un programma di chat per computer:

senza neanche dover mettere un controllo, basta inserire nel codice della card:

On OpenCard
   put the windowid of this stack into tID
   put revBrowserOpenCef(tID,"http://www.messenger.com") into browserid
   set the curbrow of this card to browserid
   put the rect of this card into temp
   revBrowserSet browserid,"rect", temp
   revBrowserSet browserid,"showBorder","true"   
end OpenCard

function browserid
   put the curbrow of this card into temp
   return temp
end browserid

on ChiudiBrowser      
   revBrowserClose BrowserId()   
end ChiudiBrowser

on CloseStack
   chiudibrowser
end CloseStack

Finito!

Nessun commento:

Posta un commento