Author Topic: Webpage  (Read 609 times)

How would I make it so when I push a button, it loads a webpage code like how the variable mod's manual loads?

Just look at the client.cs file in the variable events. Make some functions modeled after the VCEClientHTTP methods, and then change them around a bit. It'll benefit you a lot more than us just shoving code down your throat.

Ok, I got a working connection. Now, how would I assign the button to the escapeMenu gui to be all the way at the top right corener of the screen?

Code: [Select]
%f = new GuiBitmapButtonCtrl(ETOBClient_Manual_PopUp) {
profile = "BlockButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "237 1";
extent = "80 18";
minExtent = "8 2";
visible = "1";
command = "canvas.pushDialog(ETOBClient);";
text = "ETOB Client";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "base/client/ui/button2";
lockAspectRatio = "0";
alignLeft = "0";
overflowImage = "0";
mKeepCached = "0";
mColor = "255 255 255 255";
};

//feel free to put these parameters into directly into the function
%port = 80;
%host = "forum.blockland.us";
%page = "/";
new HTTPObject(yourface);
yourface.get(%host @":"@ %port, %page, "");
function yourface::onLine(%this, %line)
{
    if(strpos("END", %line)
        endfunction();

   $heedHTTPFile = $heedHTTPFile @ %line;
}

Since it works by an on-line response, you have to have the file have the last line as "END".

//feel free to put these parameters into directly into the function
%port = 80;
%host = "forum.blockland.us";
%page = "/";
new HTTPObject(yourface);
yourface.get(%host @":"@ %port, %page, "");
function yourface::onLine(%this, %line)
{
    if(strpos("END", %line)
        endfunction();

   $heedHTTPFile = $heedHTTPFile @ %line;
}

Since it works by an on-line response, you have to have the file have the last line as "END".
I already have the connection all set up and working. Works fine. All I really need atm is the gui to be at the top right.

I already have the connection all set up and working. Works fine. All I really need atm is the gui to be at the top right.
I'm just making sure you understand you need to handle the text when it receives the last line.

Code: [Select]
%f = new GuiBitmapButtonCtrl(ETOBClient_Manual_PopUp) {
profile = "BlockButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "237 1";
extent = "80 18";
minExtent = "8 2";
visible = "1";
command = "canvas.pushDialog(ETOBClient);";
text = "ETOB Client";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "base/client/ui/button2";
lockAspectRatio = "0";
alignLeft = "0";
overflowImage = "0";
mKeepCached = "0";
mColor = "255 255 255 255";
};
Then do escapeMenu.getObject(0).add(%f); - I'm pretty sure

Also the %f is not necessary, because F has the value of ETOBClient_Manual_PopUp

Then do escapeMenu.getObject(0).add(%f); - I'm pretty sure
I have ALL that done. I just need it to go in the upper right corner

I have ALL that done. I just need it to go in the upper right corner
You need to specify that in the buttons values. Go in the editor and move the button to where you want to find its values, then just set them for the button.