batch programming in win xp need some help

Status
Not open for further replies.

p dommi

Ars Legatus Legionis
12,467
heres my issue. I want to upload a webcam image and compare that image with one that was previously taken. In order to activate a green or red light on my webpage to indicate whether the webcam is active. Here is the code. Feel free to ask anything I will try and answer. Im getting some help on this already but I figure I should ask the experts on this. Any suggestions on alternate solutions will be taken too.
thanks
ng
code:<HR>
Code:
 ;start
del webcam.old
ren webcam.jpg webcam.old
comp webcam.old webcam.jpg >>text.txt
FOR /F "skip=1 tokens=*" %%i IN (text.txt) DO SET resultstring = %%i 
FOR /F "skip=1 tokens=*" %%i IN (correct.txt) DO SET correctstring = %%i  
IF "%resultstring%"=="%correctstring%" (insert autoftp cmd upload util) 
goto start
 

p dommi

Ars Legatus Legionis
12,467
code:<HR>
Code:
 :start
del webcam.old
ren webcam.jpg webcam.old
comp webcam.old webcam.jpg >text.txt
FOR /F "skip=1 tokens=*" %%i IN (text.txt) DO SET resultstring = %%i 
FOR /F "skip=1 tokens=*" %%i IN (correct.txt) DO SET correctstring = %%i  
IF "%resultstring%"=="%correctstring%" (insert autoftp cmd upload util) 
goto start

One change to the code. ; to a :

ng

[This message was edited by nearlygeeky on January 01, 2002 at 21:11.]
 

p dommi

Ars Legatus Legionis
12,467
Originally posted by santidog:
Is there a reason why you can't use Timershot from the Powertoys for XP pack ? It allows you to take a picture at a specified time, resize it, and upload it to wherever. ]http://www.microsoft.com/windowsxp/pro/downloads/powertoys.asp<HR></BLOCKQUOTE>
Maybe I didnt make my point clear. I want to compare the files and set something up to let users of my webcam space know when its active

ng
 
Status
Not open for further replies.