.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   The SE4 companion - Why the long wait?. (http://forum.shrapnelgames.com/showthread.php?t=11955)

Fyron June 3rd, 2004 10:47 PM

Re: The SE4 companion - Why the long wait?.
 
You should concentrate on finishing the program as it is before adding new (useless) features. http://forum.shrapnelgames.com/images/icons/tongue.gif

Aiken June 4th, 2004 01:01 AM

Re: The SE4 companion - Why the long wait?.
 
Quote:

Originally posted by dogscoff:
Also, please could you code in a module that will monitor the beer-content of my fridge and automatically send a robot down the shops for me to restock different brands according to the mod I'm playing.
<font size="2" face="sans-serif, arial, verdana">Koolio at your service, Master http://forum.shrapnelgames.com/images/icons/icon10.gif

Ruatha June 4th, 2004 06:11 AM

Re: The SE4 companion - Why the long wait?.
 
I'll add the music list later, it seems like a 30 minutes job. (Hybris)
I'm still working on the PBW download, the automatic download works fine, but now I'll have to make a manual download option aswell.
This is much more complicated than I thought (And fun yes!!)
And then the deadline closing alert and the upload option. Finish the mail options and the documentation. And the music list.

The main distractions are:
-Summer and sun. http://forum.shrapnelgames.com/images/icons/icon6.gif
-Two kids. http://forum.shrapnelgames.com/images/icons/icon7.gif
-A work. (will work this weekend aswell http://forum.shrapnelgames.com/images/icons/icon8.gif )
-A wife that thinks I should clean the house and move the lawn and stuff like that.... http://forum.shrapnelgames.com/images/icons/icon12.gif

Still, progress being made each day.
I hope that everything else than this download thing will be easier, I've felt for several days that I'm near completion, yet when I look at it it seems as far away still as it was a couple of days ago... http://forum.shrapnelgames.com/image...s/confused.gif

dogscoff June 4th, 2004 09:17 AM

Re: The SE4 companion - Why the long wait?.
 
Quote:

, I've felt for several days that I'm near completion, yet when I look at it it seems as far away still as it was a couple of days ago...
<font size="2" face="sans-serif, arial, verdana">Perhaps because you keep adding new features..?

Ruatha June 4th, 2004 09:39 AM

Re: The SE4 companion - Why the long wait?.
 
Quote:

Originally posted by dogscoff:
</font><blockquote><font size="1" face="sans-serif, arial, verdana">quote:</font><hr /><font size="2" face="sans-serif, arial, verdana">
, I've felt for several days that I'm near completion, yet when I look at it it seems as far away still as it was a couple of days ago...

<font size="2" face="sans-serif, arial, verdana">Perhaps because you keep adding new features..? </font><hr /></blockquote><font size="2" face="sans-serif, arial, verdana">Could be.... http://forum.shrapnelgames.com/images/icons/tongue.gif

Download finished, now I have no clue as to how to make the uploads.... and am tired...

Edit2: I've got the hint of a clue as to what to do, something to build with anyway and a hope!
Will do the music bit in between to rest my brain a bit http://forum.shrapnelgames.com/images/icons/icon7.gif

[ June 04, 2004, 18:31: Message edited by: Ruatha ]

Slynky June 5th, 2004 03:36 PM

Re: The SE4 companion - Why the long wait?.
 
You da MAN, Ruatha! http://forum.shrapnelgames.com/images/icons/icon6.gif

Ruatha June 5th, 2004 03:52 PM

Re: The SE4 companion - Why the long wait?.
 
But I'm still in the blind about uploading.
I'll need to find a way to do multipart/form-data post to uplaod the file through the application.
There are a few hints on the net but I haven't succeded yet, so if anyone has done that on a passowrd protected server before please give me a hint...

I could do a dirty Version where you get a filebrowser and choose the turnfile, but I'd prefer the hard way, a button click only.


Still, tomorrow is all work and no programming so I'll have time to think about this before I try again!

[ June 05, 2004, 15:53: Message edited by: Ruatha ]

Ed Kolis June 5th, 2004 08:37 PM

Re: The SE4 companion - Why the long wait?.
 
I feel so useless, coming up with new features for this program while being too lazy to work on my design analyzer program... http://forum.shrapnelgames.com/images/icons/icon9.gif

Then again, my job DOES involve programming all day so it's not something I really have much patience for when I get home... http://forum.shrapnelgames.com/images/icons/tongue.gif

Ruatha June 5th, 2004 09:13 PM

Re: The SE4 companion - Why the long wait?.
 
Quote:

Originally posted by Ed Kolis:
I feel so useless, coming up with new features for this program while being too lazy to work on my design analyzer program... http://forum.shrapnelgames.com/images/icons/icon9.gif

Then again, my job DOES involve programming all day so it's not something I really have much patience for when I get home... http://forum.shrapnelgames.com/images/icons/tongue.gif

<font size="2" face="sans-serif, arial, verdana">Do you do some programming involving sending HTTP headers??? http://forum.shrapnelgames.com/images/icons/icon12.gif


This is where I'm stuck right now:
</font><blockquote><font size="1" face="sans-serif, arial, verdana">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">&lt;link href=&quot;seiv.css&quot; rel=&quot;STYLESHEET&quot; type=&quot;text/css&quot;&gt;
&lt;html&gt;
&lt;head&gt;&lt;title&gt;Join Game: (Nearly Gods) The Conflict 5&lt;/title&gt;
&lt;META HTTP-EQUIV=&quot;Expires&quot; CONTENT=&quot;-1&quot;&gt;
&lt;base target=&quot;_top&quot;&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#000000&quot; text=&quot;#0099FF&quot;&gt;

&lt;H3&gt;Upload your latest turn&lt;/H3&gt;
Please upload your turn file; the sooner everyone uploads their turn,
the sooner the next turn can start! If you don't get your turn in on time,
you risk having the AI play for you.&lt;P&gt;
&lt;B&gt;Note&lt;/B&gt;: Your turn file &lt;em&gt;should&lt;/em&gt; be named
&lt;B&gt;&lt;CODE&gt;NeGoC5_0001.plr&lt;/CODE&gt;&lt;/B&gt;
or else you are probably uploading a turn for the wrong game!&lt;P&gt;
&lt;FORM METHOD=POST enctype=&quot;multipart/form-data&quot; ACTION='/GameUpload'&gt;
Turn file (.plr): &lt;input type=File name='file' size=20&gt;&lt;BR&gt;
&lt;INPUT TYPE=HIDDEN NAME='command' VALUE='pturn'&gt;
&lt;INPUT TYPE=HIDDEN NAME='game' VALUE='147s84n'&gt;
&lt;INPUT TYPE=HIDDEN NAME='ok' VALUE='/text/index.jsp?menu=gamemenu.jsp%
3fgame=147s84n&amp;body=gamebody.jsp%3fgame=147s84 n'&gt;
&lt;INPUT TYPE=image src=&quot;img/sendturn.gif&quot;&gt;
&lt;/FORM&gt;

&lt;/body&gt;
&lt;/html&gt;</pre><hr /></blockquote><font size="2" face="sans-serif, arial, verdana">I'm trying to understand this code and see if it can help me:
http://www.matlus.com/scripts/websit...PartFormData&5

Currently the app uses an embedded hidden webbrowser that surfs and logins to the PBW server without user input.
Then it uses this procedure to download the files:

</font><blockquote><font size="1" face="sans-serif, arial, verdana">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> function TForm1.GetInetFile
(const fileURL, FileName: String): boolean;
const BufferSize = 1024;

// Uses wininet
var
hSession, hURL: HInternet;
Buffer: array[1..BufferSize] of Byte;
BufferLen: DWORD;
f: File;
sAppName: string;

begin

//showmessage(fileUrl+'-'+FileName);
Result:=False;
sAppName := ExtractFileName(Application.ExeName);
hSession := InternetOpen(PChar(sAppName),
INTERNET_OPEN_TYPE_PRECONFIG,
nil, nil, 0);
try
hURL := InternetOpenURL(hSession,
PChar(fileURL),
nil,0,0,0);
try
AssignFile(f, FileName);
Rewrite(f,1);
repeat

InternetReadFile(hURL, @Buffer,
SizeOf(Buffer), BufferLen);
BlockWrite(f, Buffer, BufferLen)
until BufferLen = 0;
CloseFile(f);
Result:=True;
finally
InternetCloseHandle(hURL)
end
finally
InternetCloseHandle(hSession)
end;

end;</pre><hr /></blockquote><font size="2" face="sans-serif, arial, verdana">But now about the uploads, I can handle simple forms like the login form, but sending files is harder.
If I (the Se4 companion rather) inputs a filename with path in the textbox and presses send it says that it won't accept that (The full path), it accepts the filename only but then I don't know what happens, it says it has uploaded and executes but I can't see that I've sent any file... Does it create a dummy file?

I'll have to look what it is it receives at the PBW server, on monday, tomorrow 22 hour workday.


Any input is welcome!

[ June 05, 2004, 20:44: Message edited by: Ruatha ]

Slynky June 5th, 2004 09:24 PM

Re: The SE4 companion - Why the long wait?.
 
Quote:

Originally posted by Ed Kolis:
I feel so useless, coming up with new features for this program while being too lazy to work on my design analyzer program... http://forum.shrapnelgames.com/images/icons/icon9.gif

Then again, my job DOES involve programming all day so it's not something I really have much patience for when I get home... http://forum.shrapnelgames.com/images/icons/tongue.gif

<font size="2" face="sans-serif, arial, verdana">Yeah, it's like working at McDonalds and coming home to find hamburgers for supper... http://forum.shrapnelgames.com/images/icons/icon10.gif

I know the feeling...working in IT all day and then having one of the kids need me to do something on their PC... http://forum.shrapnelgames.com/image...s/rolleyes.gif


All times are GMT -4. The time now is 03:41 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.