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.
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