Jump to content

PC CONTROL with a browser or cell phone


ConsultingJoe
 Share

Recommended Posts

BETTER VERSION HERE

Hey,

I want to start out by saying I love AUTOITv3 and this is my first topic. :lmao:

I wanted to be able to control my computer from anywhere with my cell phone and I wanted to keep it quiet in case I wanted to mess with a friend so I used the FTP.au3 and InetGet

WHAT YOU NEED:

THE AUTOIT SCRIPT => commandme.au3

THE FTP AUTOIT SCRIPT writen by: Wouter van Kesteren

THE PHP SCRIPT => action.php

THE HTML FILE

WEB HOST

-SUPPORTING PHP

-SUPPORTING FTP

-I USE WWW.T35.COM IT"S FREE

USE AUTOIT Version 3.1.1

what you need to do is replace the YOURACCOUNT AND PASSWORD with you INFO.

This is worth checking out.

Let me know of bugs and what I could inprove on

Edited by zerocool60544
Check out ConsultingJoe.com
Link to comment
Share on other sites

  • Replies 178
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Well, It can control anything on the pc really.

I only set up the basics for it.

It will currently:

Beep

Run WMP

send media keys

shutdown, restart...

shutdown server

open cd tray

ect...

I am adding more as i go.

It gets the commands pritty fast even on dial-up

I would like for someone very good with autoit to look over it and help me with improvements! :lmao:

Edited by zerocool60544
Check out ConsultingJoe.com
Link to comment
Share on other sites

so how do we use this exactly?

There are four files:

commandme.au3==>The server files that goes on the computer you want to control

commandme.html==>The client control that you input the command with dropdown menus

action.php==>The php script that the html posts to that writes a file that the server grabs and clears over and over until a command is present in the file. ("com.con")

FTP.au3==>The file that commandme.au3 includes to upload and delete

I ALSO FORGOT TO SAY TO CREATE A BLANK FILE ON THE SERVER CALLED "com.con"

LOOK AT THE DIAGRAM (RELINKED)

Edited by zerocool60544
Check out ConsultingJoe.com
Link to comment
Share on other sites

There are four files:

commandme.au3==>The server files that goes on the computer you want to control

commandme.html==>The client control that you input the command with dropdown menus

action.php==>The php script that the html posts to that writes a file that the server grabs and clears over and over until a command is present in the file. ("com.con")

FTP.au3==>The file that commandme.au3 includes to upload and delete

I ALSO FORGOT TO SAY TO CREATE A BLANK FILE ON THE SERVER CALLED "com.con"

LOOK AT THE DIAGRAM

Welcome to the forums.... very nice first post... this is an area i am very interested in

for starters, how about changing this

EndSelect

if $con <> "" Then 
FileOpen ( "com.con", 2 )
$Open = _FTPOpen('MyFTP Control')
$Conn = _FTPConnect($Open, $server, $username, $pass)
_FTPDelFile($Conn, '/com.con')
$Ftpc = _FTPClose($Open)

$Open = _FTPOpen('MyFTP Control')
$Conn = _FTPConnect($Open, $server, $username, $pass)
$Ftpp = _FtpPutFile($Conn, @ScriptDir & '/com.con', '/com.con')
$Ftpc = _FTPClose($Open)
endif

Endif

Wend

to this

EndSelect

if $con <> "" Then clear()

Wend

??????

8)

NEWHeader1.png

Link to comment
Share on other sites

GOD... I'm dumb. I did't even notice the clear() that I put in... LOL

Thank you for you intrest... please feel free to give me ideas or fixes, this is a very rough copy and i need to fix the close process from (explorer) to (explorer.exe) and put the option for blockinput into the html options and change the run windows media player to use the macro cuz i have my program files on my D: drive and it puts out an error, i also need to change open/close cd tray to get drive info incase the drive isn't on D:

so I have a lot of work to do mostly little stuff though but I wanted to put the IDEA OUT THERE. :lmao:

Edited by zerocool60544
Check out ConsultingJoe.com
Link to comment
Share on other sites

cold this

func clear()
FileOpen ( "com.con", 2 )
$Open = _FTPOpen('MyFTP Control')
$Conn = _FTPConnect($Open, $server, $username, $pass)
_FTPDelFile($Conn, '/com.con')
$Ftpc = _FTPClose($Open)

$Open = _FTPOpen('MyFTP Control')
$Conn = _FTPConnect($Open, $server, $username, $pass)
$Ftpp = _FtpPutFile($Conn, @ScriptDir & '/com.con', '/com.con')
$Ftpc = _FTPClose($Open)
endfunc

be changed to this

func clear()
FileOpen ( "com.con", 2 )
$Open = _FTPOpen('MyFTP Control')
$Conn = _FTPConnect($Open, $server, $username, $pass)
_FTPDelFile($Conn, '/com.con')

Sleep(50)

$Ftpp = _FtpPutFile($Conn, @ScriptDir & '/com.con', '/com.con')
$Ftpc = _FTPClose($Open)
endfunc

file open to read/write is different in autoit.. but will it work with "one" opening on the website for FTP????

8)

NEWHeader1.png

Link to comment
Share on other sites

thanks again, I haven't tried the ftp change but I'm sure it will work

I am changing the ftp func like you said

I am changing some commands to refer the their functions

I updated the cdtray to open all cdtrays and the correct drive

I'm also thinking about adding something that will upload the results back to the webserver via the ftpupload() so the phone or browser will see results: pc info, folders and files, ect...

I think I will have to add a javascript in the html that will read the results file.

Thanks again :lmao:

Edited by zerocool60544
Check out ConsultingJoe.com
Link to comment
Share on other sites

It works cool! ;)

Keep it up!(Y)

Thanks Guys For Your Intrest, I feel so popular :lmao:

I am working on updating it and adding a way to do screen capture and reduce the size of the picture to see it on your phone (128x128)

I have mine set-up to open my bed room door with a relay board hooked up to my parallel port with motors and counter weights, I know sounds a little far fetched but its sweet.

please feel free to give me ideas on other commands

UPDATED CODE (unfinished functions and missing code but you can work off it to update the original code)

#include "FTP.au3"
HotKeySet ( "{ESC}",  "e")
;AutoItSetOption ( "TrayIconHide", 1 )
$server = 'ftp.t35.com'
$username = 'USERNAME.t35.com'
$pass = 'YOURPASSWORD'
$vol = 50
$cd = DriveGetDrive ( "CDROM" )
$pc = 1


While 1

InetGet("http://" & $username & "/com.con", "com.con", 1);CHANGED
$file = FileOpen ( "com.con", 0 )
$con = FileRead ( $file )
FileClose ( $file )

Sleep (1000)
if StringInStr ($con, "pc" & $pc) > 0 Then
Select
    
    Case StringInStr ($con, "opencd") > 0
    openCD()

    Case StringInStr ($con, "closecd") > 0
    closeCD()

    Case StringInStr ($con, "nextsong") > 0
    Send("{MEDIA_NEXT}")

    Case StringInStr ($con, "backsong") > 0
    Send("{MEDIA_PREV}")

    Case StringInStr ($con, "voldown") > 0
    $vol = $vol - 20
    SoundSetWaveVolume ( $vol )
    Send("{VOLUME_DOWN 5}")

    Case StringInStr ($con, "volup") > 0
    $vol = $vol + 20
    SoundSetWaveVolume ( $vol )
    Send("{VOLUME_UP 5}")

    Case StringInStr ($con, "stopsong") > 0
    Send("{MEDIA_STOP}")

    Case StringInStr ($con, "volmute") > 0
    Send("{VOLUME_MUTE}")

    Case StringInStr ($con, "playsong") > 0
    Send("{MEDIA_PLAY_PAUSE}")

    Case StringInStr ($con, "logoff") > 0
    clear()
    Shutdown (0)

    Case StringInStr ($con, "shutdown") > 0
    clear()
    Shutdown (9)

    Case StringInStr ($con, "reboot") > 0
    clear()
    Shutdown (6)

    Case StringInStr ($con, "suspend") > 0
    clear()
    Shutdown (32)

    Case StringInStr ($con, "hibernate") > 0
    clear()
    Shutdown (64)

    Case StringInStr ($con, "exit") > 0
   exitprogram()

    Case StringInStr ($con, "beep") > 0 
    pcbeep()

    Case StringInStr ($con, "unblock") > 0
    BlockInput ( 0 )

    Case StringInStr ($con, "block") > 0
    BlockInput ( 1 )

    Case StringInStr ($con, "run") > 0
   runprogram()

    Case Else
    $con = ""
    
EndSelect
if $con <> "" then clear()
Endif
Wend
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;functions
func clear()
FileOpen ( "com.con", 2 )
$Open = _FTPOpen('MyFTP Control')
$Conn = _FTPConnect($Open, $server, $username, $pass)
_FTPDelFile($Conn, '/com.con')
Sleep(50)
$Ftpp = _FtpPutFile($Conn, @ScriptDir & '/com.con', '/com.con')
$Ftpc = _FTPClose($Open)
endfunc


func e()
    exit
endfunc

func openCD()
    if $cd[0] > 0 Then
        For $i = 1 to $cd[0]
            CDTray ( $cd[$i], "open" )
        Next
    endif
endfunc


func closeCD()
    if $cd[0] > 0 Then
        For $i = 1 to $cd[0]
            CDTray ( $cd[$i], "close" )
        Next
    endif
endfunc

func closeprogram()
    if StringInStr ($con, "server") > 0 then e()
   elseif StringInStr ($con, "wmplayer") > 0 Then ProcessClose ( "wmplayer.exe" )
   elseif StringInStr ($con, "explorer") > 0 Then ProcessClose ( "explorer.exe" )
   else     WinClose ( "" )
    endif
endfunc

func runprogram()
    if StringInStr ($con, "wmplayer") > 0 then run (@ProgramFilesDir & "\Windows Media Player\wmplayer.exe")
    ;if StringInStr ($con, "file") > 0 then run ($runfile)
endfunc

Func pcbeep()

endfunc
Check out ConsultingJoe.com
Link to comment
Share on other sites

$file = FileOpen ( "com.con", 0 )
$con = FileRead ( $file )
FileClose ( $file )

=>

$con = FileRead ( "com.con")

and i dont get what this does in your clear func: FileOpen ( "com.con", 2 )

it should be safe (if not better) to remove this.

Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Link to comment
Share on other sites

REMOTE CONTROLLED DOOR OPENER

STORY & VIDEO

THE RELAY BOARD I USE, ITS GREAT, AND EASY TO PROGRAM

I use lego mindstorms' motors, they don't a lot of torque but I geared them down to be a little slower but stronger.

The other files are scripts and interpreters of the door relay board

jsammarco@gmail.com

The water bottles are the counter weights so their is always tension on the line. There are two motors on either side. (one near the closed position and one near the open position)

Edited by CyberZeroCool
Check out ConsultingJoe.com
Link to comment
Share on other sites

Looks nice! :king:

What does you here script in AutoIT?

do you mean what does it have to do with autoit, if so, I have my cell phone control my computer, but from there I added the functionality to open and close my door. I could do this from my bed or from China. The possiblilities are endless. ;)

o:)

But, lets not get too far from the subject of the commandme script. I am working on adding the ablility for feed back from the script and custom options like run($custom) or winclose($custom) and I am try to add screen capture that will shrink the pic and send back to browser or cell (128X128) and other ideas let me know. What direction did you take the script??? :lmao:

Check out ConsultingJoe.com
Link to comment
Share on other sites

do you mean what does it have to do with autoit, if so, I have my cell phone control my computer, but from there I added the functionality to open and close my door. I could do this from my bed or from China. The possiblilities are endless. ;)

o:)

But, lets not get too far from the subject of the commandme script. I am working on adding the ablility for feed back from the script and custom options like run($custom) or winclose($custom) and I am try to add screen capture that will shrink the pic and send back to browser or cell (128X128) and other ideas let me know. What direction did you take the script??? :lmao:

Ah.. I get it! ;)

I was also thinking for a screen capture script to write it! :king:

But is it also possible to share files with the computer and the browser?

So if I want a file from my computer, can I pick this up from a list and download it with the browser...? :lol:

:)

Edited by YoseMite
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...