Solved

I need a bug fixed and a minor change the code

Posted on 2008-06-13
4
280 Views
Last Modified: 2013-11-23
Hello,
I need some help with the code from this link (the code from the accepted solution, of TheRealLoki):
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_23399636.html
1. When I try to request another screenshot before the previous one was received (this is a problem for the same client, not the second) the server will freeze and I will have to restart it manually. Could anybody figure out how to fix this? Maybe checking the clientstage?
2. When I get the files (records) command SENDFILES C:\records\??.??.????.rec would it be possible for the server to send a list of local drives to the client on connect? So the form will look something like this for example:

[ D:\    v] [records\??.??.????.rec]
    |                |
    |             Edit just like the one from before...
Combobox with a list of local drives from the server

Thanks.
0
Comment
Question by:tmwtp
  • 2
  • 2
4 Comments
 
LVL 17

Expert Comment

by:TheRealLoki
Comment Utility
hmm, I'm not getting any problems when I run it here
can you make sure you have this bit of code, as this is what ensures no commands can be sent whie a screenshot is being received

procedure TfClientMain.bRequestScreenshotClick(Sender: TObject);
begin
  if WSocket1.State <> wsConnected then
    MemoClient.lines.add('not connected, cannot login')
  else if ClientStage <> csCommand then
    MemoClient.lines.add('not ready to send commands')
  else
  begin
    ClientStage := csReceiveScreenshot_Start;
    WSocket1.SendLine('SCREENSHOT');
  end;
end;
0
 

Author Comment

by:tmwtp
Comment Utility
Yeah, I think that must be the problem... when I made my client I only added this code: "WSocket1.SendLine('SCREENSHOT');" for the get screenshot button... I have to be more carefull in the future, i have too many things on my mind... :P Will test now, but i guess it will work if it works on your pc... Can you please help me with the other point of my question? And also, take a look at this queston, and tell me if you have any solution for it: http://www.experts-exchange.com/Programming/Languages/Pascal/Q_23484795.html
0
 
LVL 17

Accepted Solution

by:
TheRealLoki earned 500 total points
Comment Utility
0
 

Author Comment

by:tmwtp
Comment Utility
Sorry I didn't have time to check the website sooner. I will test the demo now and then accept your solution.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now