Web Based Remote Desktop Type viewer and client

new BookmarkLockedFalling
mmiscool
Full Member
***

mmiscool Avatar

Send me a message if you want to help with a WEB OS project
Posts: 106

Post by mmiscool on Sept 2, 2012 15:04:34 GMT -5

Ok. So here is the code for runbasic portion of the remote desktop viewer.

Liberty Basic Client code located here
libertybasic.conforums.com/index.cgi?board=LB3&action=display&num=1346460385&start=

This requires that you have an ftp server running on the system hosting off "public\RemoteDesktop" directory and the user name and password to be entered in to the client.


bla = mkdir("public\RemoteDesktop")
Input "Clinet Name";client.machine$


dim special.keys$(100)

special.keys$(1) = "{Enter}"
special.keys$(2) = "{Esc}"
special.keys$(3) = "{Tab}"
special.keys$(4) = "{Backspace}"
special.keys$(5) = "{Delete}"
special.keys$(6) = "{F1}"
special.keys$(7) = "{F2}"
special.keys$(8) = "{F3}"
special.keys$(9) = "{F4}"
special.keys$(10) = "{F5}"
special.keys$(11) = "{F6}"
special.keys$(11) = "{F7}"
special.keys$(11) = "{F9}"
special.keys$(11) = "{F10}"
special.keys$(11) = "{F11}"
special.keys$(11) = "{F12}"
special.keys$(11) = "{LWin}"







[refresh.win]
open "public\RemoteDesktop\";client.machine$;"-command.txt" for output as #mike
print #mike, "REFRESH"
close #mike
bla$ = shell$("sleep 10")


[show.win]





cls

Button #bu, "Refresh", [refresh.win]
button #bu, "Right Click", [set.next.click]
button #bu, "Double Click", [set.next.click.double]
html "Text"
textbox #tb1, ""
Button #bu, "Send Text", [Send.Text]
listbox #li1, special.keys$(), 1
button #bu, "Add Special key", [add.special.key]
Button #bu, "Client Sleep", [Send.sleep]
'----------------------------------------------




open "Public\RemoteDesktop\";client.machine$;"-latest.txt" for input as #mike
input #mike, latest.image$
close #mike

bla$ = shell$( "convert public\RemoteDesktop\";latest.image$;" -resize 50% public\remoteDesktop\";latest.image$)





'this here is the awsome code for the x and y from the image
'cssid #map,"{width:800px;height;600px;background-color:pink;}"
div map

'link.txt$ = "<img src=""..\..\..\..\..\..\RemoteDesktop\""";latest.image$;" width=""50%"" height=""50%""/>"
imagebutton #doMore, "..\..\..\..\..\..\RemoteDesktop\";latest.image,ドル [get.point]

CSSClass "input.fancyImagebutton", "{
""style=""-webkit-transform: scale(0.5)
}"

#doMore CSSCLASS("fancyImagebutton")



end div

textbox #x, "x"
textbox #y, "y"

link #a, "link to a ", [get point]

html "
<script type=""text/javascript"">
<!--
var map = document.getElementById('map');
map.onclick = function(e)
{
var x, y;
if (window.event)
{
e = window.event;
x = e.offsetX; y = e.offsetY;
}
else
{
x = e.layerX; y = e.layerY;
}
var inps = document.getElementsByTagName('INPUT');
for (var i = 0; i < inps.length; i++)
{
switch (inps[i].value)
{
case 'x':
inps[i].value = x;
break;
case 'y':
inps[i].value = y;
break;
}
}
var as = document.getElementsByTagName('A');
for (var i = 0; i < as.length; i++)
{
if (as[i].onclick && !as[i].firstChild)
{
as[i].onclick();
break;
}
}
}
//-->
</script>"

wait

[Send.Text]
open "public\RemoteDesktop\";client.machine$;"-command.txt" for output as #mike
print #mike, "send ";#tb1 contents$()
close #mike
bla$ = shell$("sleep 10")
goto [show.win]

[set.next.click.double]
no.clicks$ = "double"
wait

[set.next.click]

click.type$ = "right"
wait


[get.point]

x = #x value()*2
y = #y value()*2



open "public\RemoteDesktop\";client.machine$;"-command.txt" for output as #mike
print #mike, "CoordMode, Mouse, Screen"
print #mike, "Click ";click.type$;" ";x;", ";y

if no.clicks$ = "double" then
print #mike, "sleep 100"
print #mike, "Click ";click.type$;" ";x;", ";y
end if

close #mike
click.type$ = ""
no.clicks$ = ""
bla$ = shell$("sleep 10")
goto [show.win]




[Send.sleep]
open "public\RemoteDesktop\";client.machine$;"-command.txt" for output as #mike
print #mike, "SLEEP"
close #mike

goto [show.win]


[add.special.key]
#tb1 print(#li1 selection$())
wait
Last Edit: Sept 2, 2012 15:24:13 GMT -5 by mmiscool
Check out the code wiki at http://smbisoft.com[br]The code wiki allows for multiple users to work on the same project at the same time in just basic.[br][br]SMBISoft ____888-LAN-Zoli _____ 888-526-9654
tenochtitlanuk
New Member
*

tenochtitlanuk Avatar

Posts: 25

mmiscool
Full Member
***

mmiscool Avatar

Send me a message if you want to help with a WEB OS project
Posts: 106

Check out the code wiki at http://smbisoft.com[br]The code wiki allows for multiple users to work on the same project at the same time in just basic.[br][br]SMBISoft ____888-LAN-Zoli _____ 888-526-9654
mmiscool
Full Member
***

mmiscool Avatar

Send me a message if you want to help with a WEB OS project
Posts: 106

Check out the code wiki at http://smbisoft.com[br]The code wiki allows for multiple users to work on the same project at the same time in just basic.[br][br]SMBISoft ____888-LAN-Zoli _____ 888-526-9654