Page 3 of 3

Posted: Thu Oct 20, 2005 9:17 pm
by zikitrake
Intrigued wrote:The application now crashes on me at times, when it begins Start Monitoring activities. And, it's not sensitive enough still.
:oops: a great bug (using imageId() instead of #image)

Updated

- Now, it don't depend on the AviCap Lib
- Bugfixed
- redecorated
- ftp added (but in this version it's disabled, because I don't know how can I upload files without freeze the capture :?, any idea? )
- Limited to 30 minutes

Posted: Fri Oct 21, 2005 12:55 am
by J. Baker
Does any of this help any?

Code: Select all

  #FTPServer=0 
  #UserName=1 
  #Password=2 
  #FileNameGet=3 
  #FileNameSend=4 
  #txt1=5 
  #txt2=6 
  #txt3=7 
  #txt4=8 
  #txt5=9 
  #Info=10 
  #Send=11 
  #File=12
  
  #INTERNET_SERVICE_FTP=1 
  #INTERNET_OPEN_TYPE_DIRECT=1
  #INTERNET_SERVICE_PASSIVE=$8000000 
  #FTP_PORT=21 
  #FTP_TRANSFER_ASCII=1 
  #FTP_TRANSFER_BINARY=2 

  hWnd=OpenWindow(#Info,(GetSystemMetrics_(#SM_CXSCREEN)-200)/2,(GetSystemMetrics_(#SM_CYSCREEN)-180)/2,200,250,#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_TitleBar,"FTP - Upload") 

  If hWnd=0 Or CreateGadgetList(hWnd)=0:End:EndIf 

  TextGadget(#txt1,10,10,180,20,"FTP Server:") 
  TextGadget(#txt2,10,50,180,20,"User Name:") 
  TextGadget(#txt3,10,90,180,20,"Password:") 
  TextGadget(#txt4,10,130,180,20,"File Name:") 
  TextGadget(#txt5,10,170,180,20,"Location + File Name:")
   

  StringGadget(#FTPServer,10,25,180,20,"") 
  StringGadget(#UserName,10,65,180,20,"") 
  StringGadget(#Password,10,105,180,20,"") 
  StringGadget(#FileNameGet,10,145,158,20,"") 
  StringGadget(#FileNameSend,10,185,180,20,"")
   
  ButtonGadget(#File,168,144,22,22,"...")
  ButtonGadget(#Send,75,215,50,22,"Send") 

  Repeat 
    EventID = WaitWindowEvent() 
    If EventID=#PB_EventGadget 
      Select EventGadgetID()
        Case #File
          file$=OpenFileRequester("Select File","","All Files (*.*)|*.*",0)
          SetGadgetText(#FileNameGet,file$)
            
  Case #Send 
    ServerName.s=GetGadgetText(#FTPServer) 
    UserName.s=GetGadgetText(#UserName) 
    Password.s=GetGadgetText(#Password) 
    localfile.s=GetGadgetText(#FileNameGet) 
    remotefile.s=GetGadgetText(#FileNameSend) 

     hInternet=InternetOpen_("FTP",#INTERNET_OPEN_TYPE_DIRECT,Proxy,ProxyBypass,0) 
  If hInternet
     hConnect=InternetConnect_(hInternet,ServerName,#FTP_PORT,UserName,Password,#INTERNET_SERVICE_FTP,#INTERNET_SERVICE_PASSIVE,0) 
  If hConnect
  If FtpPutFile_(hConnect,localfile,remotefile,#FTP_TRANSFER_BINARY,0) 
     MessageRequester("","File has been sent",0) 
  EndIf
 
              InternetCloseHandle_(hConnect) 
              InternetCloseHandle_(hInternet)  
            EndIf
          EndIf
         
      EndSelect 
    EndIf 
  Until EventID=#PB_EventCloseWindow 
End 

Posted: Fri Oct 21, 2005 12:57 am
by J. Baker
It also might be that since the program is trying to do two things at once, it freezes the video. You might have to call on a windowless exe to do the actual uploading. Hope that makes sense?

Posted: Fri Oct 21, 2005 2:11 am
by Intrigued
Unable to capture images, again. I also recommend a red bullet for the record button (instead of a "play" style image), FWIW.

The application is no longer crashing, FWIW.

Posted: Fri Oct 21, 2005 8:07 am
by blueznl
for uploading and grabbing simultaneously, use two apps or threads

Posted: Fri Oct 21, 2005 8:44 am
by zikitrake
J. Baker and blueznl Thank you for the trick.

J. Baker, yes, at present I use the same code that you put here

Intrigued, can you tell me what you see (black pics... or other?).

Posted: Fri Oct 21, 2005 10:23 am
by dagcrack
what exe packer are you using? I get my antivirus to popup all the time... Why are you compressing the exe with a weird algorithm??? ¬¬ or what else is in there..
:lol:
(Contains an unusual runtime compression tool (PCK/YodaProt). Please verify the origin of the file)
Making such application is easy.. making it right isnt, hope you get to something in-between at least, else I wouldnt buy it.

By the way.. why is it taking my entire processor cycles...? You really dont need to spend all the processor on such thing, just hope you get to programm a good event loop with out hogging the CPU for nothing... tsk tsk, multi threading wouldnt hurt also.

Posted: Fri Oct 21, 2005 10:41 am
by zikitrake
dagcrack wrote:what exe packer are you using? I get my antivirus to popup all the time... Why are you compressing the exe with a weird algorithm??? ¬¬ or what else is in there..
:lol:
(Contains an unusual runtime compression tool (PCK/YodaProt). Please verify the origin of the file)
Making such application is easy.. making it right isnt, hope you get to something in-between at least, else I wouldnt buy it.

By the way.. why is it taking my entire processor cycles...? You really dont need to spend all the processor on such thing, just hope you get to programm a good event loop with out hogging the CPU for nothing... tsk tsk, multi threading wouldnt hurt also.
I use Yoda Protector from http://yodap.has.it/ to make the EXE smaller.

In my pc (adm 2000+) it take a maximum of the 66% (when capture is enabled)

Posted: Fri Oct 21, 2005 12:59 pm
by zikitrake
Ok, new version with a Delay(25) added in main loop.

Now it will eat less process ( :?: )

Posted: Sat Oct 22, 2005 1:16 am
by Intrigued
What it's doing (or not doing more specifically) is that the video shows up fine when the CAM is on. It's the captures that are not happening. I also do not see those icons (images) you had to signify that a capture was happening and I did the default settings and then tried several configuration combonations to no avail. It still would not capture an image.

Posted: Sat Oct 22, 2005 10:55 am
by zikitrake
Intrigued wrote:What it's doing (or not doing more specifically) is that the video shows up fine when the CAM is on. It's the captures that are not happening. I also do not see those icons (images) you had to signify that a capture was happening and I did the default settings and then tried several configuration combonations to no avail. It still would not capture an image.
:cry: Can you can say me what OS your use? and the graphic card bits (16 or 32)?.

Posted: Sat Oct 22, 2005 6:23 pm
by Intrigued
@zikitrake

This system is running Windows XP Pro and has a Radeon 9000 video adapter (card). Color Quality = 32bit

Posted: Sat Oct 22, 2005 6:44 pm
by zikitrake
:( I don't understand it. I have same graphic card and number of bits.

I'll try to find a solution for it. Sorry for inconvenences (and for my bad english :oops: )

Posted: Sun Oct 23, 2005 4:35 pm
by Intrigued
zikitrake wrote::( I don't understand it. I have same graphic card and number of bits.

I'll try to find a solution for it. Sorry for inconvenences (and for my bad english :oops: )
I understand, np.

Posted: Tue Mar 07, 2006 7:27 pm
by zikitrake
updated!

News:

- New Detection algorithm
- Copy changed to FTP
- Others....

TODO:
- video capture
- more... and more... :D

Please, test it

http://personales.ya.com/zikitrake/pb/whoareu.zip