No announcement yet.

[ASP] Digital Pcitre Frame code

  • Filter
  • Time
  • Show
Clear All
new posts

    [ASP] Digital Pcitre Frame code

    After looking for some slideshow scripts I didn't really find what I needed so I created my own.

    I have a networked laptop that has been stripped of its plastic cover and strapped to the back of a cherry wood picture frame. It communicates to an asp script on my permanent homeseer server. The script on the server pulls from the same directory it resides in looking for jpg/gif files and randomly displays them (without repeat).

    You can simply drag and drop (or delete) jpg files to that directory and it automatically regenerates the script to include the new files.
    The slides.asp file is attached if anyone wishes to use it. It doesnt do any cool resizing which is the next step.

    For the second part of the code I needed a way for homeseer to turn off the hdd and lcd when no one was in the room and turn them back on when it detects motion. To get the communication between the laptop and homeseer I used psexec.exe and pskill.exe from
    After 30 minutes of no motion I run:
    pskill.exe \\pictureframe -u myuser -p mypassword iexplore.exe

    psexec.exe \\pictureframe -u myuser -p mypassword -i c:\tools\off.bat

    The off.bat file has:
    "MonitorCtrl.exe /p_off" in it and the other command kills IE which stops the slideshow - I have the power settings on the laptop set so that the hdd spins down after 3 mins of inactivity.

    When I detect motion I run:
    psexec.exe \\pictureframe -u myuser -p mypassword -i c:\tools\on.bat

    psexec.exe \\pictureframe -u myuser -p mypassword -i "c:\program files\internet explorer\iexplore.exe" -k "http://homeseer:82/slides.asp"

    The on.bat file simply turns the lcd back on using MonitorCtrl.exe and the other command fires up IE in kiosk mode to start my slideshow.

    I haven't actually implemented the motion detection firing script stuff yet - I will have to work out a way to stop the "on" script from firing everytime motion is detected and only fire it when i know the lcd and IE are off.

    Please move this if it doesn't belong in this area - wasnt sure which "script" area that it belongs.


    p.s the code is messy but works :-)
    Attached Files