Jump to content

***remote Pc Control***


ConsultingJoe
 Share

Recommended Posts

  • Replies 104
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

How do you make a screen capture script?

I made a script like yours thanks to you and i added something like run program and type text!

;):D:D:(:):think:

I add this:

Case $gettext[1] = "screen"
    DllCall("captdll.dll", "int", "CaptureScreen", "str", @TempDir & "\PS.jpg", "int", 40)
    $Open = _FTPOpen('MyFTP Control')
    $Conn = _FTPConnect($Open, $server, $username, $pass)
    _FTPDelFile($Conn, '/gallery/SC.jpg')
    $Ftpp = _FtpPutFile($Conn, @TempDir & '\PS.jpg', '/gallery/SC.jpg')
    Return "Screen Captured "

You will need this and this

but for some reason, the FTP does not replace the original file. any ideas, the Screen cap works so i has to be the FTP

I also add this directory return that is great.

just add this in

Case $gettext[1] = "dir"
    Dim $dir
    _ArrayDelete($gettext, 0)
    $directory = _ArrayToString ( $gettext, "*" )
    $directory = StringReplace($directory, "dir*", "")
    $directory = StringReplace($directory, "\\", "\")
    $search = FileFindFirstFile($directory)
    $dir = _ArrayCreate("")
If $search = -1 Then
    Return "No files/directories matched the search pattern"
EndIf
While 1
    $file = FileFindNextFile($search) 
    If @error Then ExitLoop
    _ArrayAdd ( $dir, $file )
WEnd
FileClose($search)
$dirout = _ArrayToString ( $dir, "&" )
$dirout = StringReplace( $dirout, "&", "<br>" )
Return "Files in folder: " & $directory & "<br>" & $dirout & "<BR><BR>Directory listed "

If that was you on there, sorry for sounding so mean, it just bothers me when out of the blue I hear people messing with this.

Please do not use this off of my site, open your own account and use this because I use this too, Thank You

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

whatever happened to the arm? did you ever follow up on that?

oh yeah, I have it all done exept the arm I got lazy because the movments were slow reacting because of the gears, I will hook it up really quick and make a quick scipt for it, but there is no claw on it, there are three axies though
Check out ConsultingJoe.com
Link to comment
Share on other sites

  • 2 weeks later...
  • Moderators

zerocool60544, would you please send me the inet.au3 file you have, mine doesn't work.

email:jacksont123fs@gmail.com

or just pm me

thanks a lot!

You could probably get it here: ( http://www.autoitscript.com/forum/index.php?showtopic=19717 )

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I add this:

Case $gettext[1] = "screen"
    DllCall("captdll.dll", "int", "CaptureScreen", "str", @TempDir & "\PS.jpg", "int", 40)
    $Open = _FTPOpen('MyFTP Control')
    $Conn = _FTPConnect($Open, $server, $username, $pass)
    _FTPDelFile($Conn, '/gallery/SC.jpg')
    $Ftpp = _FtpPutFile($Conn, @TempDir & '\PS.jpg', '/gallery/SC.jpg')
    Return "Screen Captured "

You will need this and this

but for some reason, the FTP does not replace the original file. any ideas, the Screen cap works so i has to be the FTP

i tried to modify it to work on your old pc control server: http://www.autoitscript.com/forum/index.ph...pic=20094&st=30

i tried this and it did take a screenshot which is saved in a local dir, but when it uploads it, the file is there but the size is 0 bytes :)

Case StringInStr ($con, "screenshot") > 0
    DllCall("captdll.dll", "int", "CaptureScreen", "str", "gallery/PS.jpg", "int", 40)
    $Open = _FTPOpen('MyFTP Control')
    $Conn = _FTPConnect($Open, $server, $username, $pass)
    _FTPDelFile($Conn, 'PS.jpg')
    $Ftpc = _FTPClose($Open)
    $Open = _FTPOpen('MyFTP Control')
    $Conn = _FTPConnect($Open, $server, $username, $pass)
    $Ftpp = _FtpPutFile($Conn, 'PS.jpg', 'PS.jpg')
    $Ftpc = _FTPClose($Open)
Link to comment
Share on other sites

i tried to modify it to work on your old pc control server: http://www.autoitscript.com/forum/index.ph...pic=20094&st=30

i tried this and it did take a screenshot which is saved in a local dir, but when it uploads it, the file is there but the size is 0 bytes :)

Case StringInStr ($con, "screenshot") > 0
    DllCall("captdll.dll", "int", "CaptureScreen", "str", "gallery/PS.jpg", "int", 40)
    $Open = _FTPOpen('MyFTP Control')
    $Conn = _FTPConnect($Open, $server, $username, $pass)
    _FTPDelFile($Conn, 'PS.jpg')
    $Ftpc = _FTPClose($Open)
    $Open = _FTPOpen('MyFTP Control')
    $Conn = _FTPConnect($Open, $server, $username, $pass)
    $Ftpp = _FtpPutFile($Conn, 'PS.jpg', 'PS.jpg')
    $Ftpc = _FTPClose($Open)
The only thing I can think of is that it is not uploading the right file so it just creates the file.
Check out ConsultingJoe.com
Link to comment
Share on other sites

The only thing I can think of is that it is not uploading the right file so it just creates the file.

Case StringInStr ($con, "screenshot") > 0
    DllCall("captdll.dll", "int", "CaptureScreen", "str", "PS.jpg", "int", 40)
    $Open = _FTPOpen('MyFTP Control')
    $Conn = _FTPConnect($Open, $server, $username, $pass)
    _FTPDelFile($Conn, 'PS.jpg')
    $Ftpc = _FTPClose($Open)
    $Open = _FTPOpen('MyFTP Control')
    $Conn = _FTPConnect($Open, $server, $username, $pass)
    $Ftpp = _FtpPutFile($Conn, 'PS.jpg', 'PS.jpg')
    $Ftpc = _FTPClose($Open)

i think i fixed it because it was in fact in the wrong directory

but it still is at 0 bytes :)

is the code right?

Edited by The Great 'Awesoma-Powa!'
Link to comment
Share on other sites

Case StringInStr ($con, "screenshot") > 0
    DllCall("captdll.dll", "int", "CaptureScreen", "str", "PS.jpg", "int", 40)
    $Open = _FTPOpen('MyFTP Control')
    $Conn = _FTPConnect($Open, $server, $username, $pass)
    _FTPDelFile($Conn, 'PS.jpg')
    $Ftpc = _FTPClose($Open)
    $Open = _FTPOpen('MyFTP Control')
    $Conn = _FTPConnect($Open, $server, $username, $pass)
    $Ftpp = _FtpPutFile($Conn, 'PS.jpg', 'PS.jpg')
    $Ftpc = _FTPClose($Open)

i think i fixed it because it was in fact in the wrong directory

but it still is at 0 bytes :)

is the code right?

it looks ok to me. I dont think that the connection has to be close and reopened, try to have a 1 second sleep between each command and see what happeneds
Check out ConsultingJoe.com
Link to comment
Share on other sites

it looks ok to me. I dont think that the connection has to be close and reopened, try to have a 1 second sleep between each command and see what happeneds

Case StringInStr ($con, "screenshot") > 0

DllCall("captdll.dll", "int", "CaptureScreen", "str", "PS.jpg", "int", 40)

$Open = _FTPOpen('MyFTP Control')

$Conn = _FTPConnect($Open, $server, $username, $pass)

_FTPDelFile($Conn, 'PS.jpg')

$Ftpc = _FTPClose($Open)

$Open = _FTPOpen('MyFTP Control')

$Conn = _FTPConnect($Open, $server, $username, $pass)

$Ftpp = _FtpPutFile($Conn, '?', '?')

$Ftpc = _FTPClose($Open)

what exactly goes in each '?', do we have to save the image in the include directory because thats where the ftp.au3 file is, or do we save it in the same folder as the script? (and if the file is in the same folder as the script, do we have to include the full path or just the filename?)

Edited by The Great 'Awesoma-Powa!'
Link to comment
Share on other sites

Case StringInStr ($con, "screenshot") > 0
    Sleep(1000)
    DllCall("captdll.dll", "int", "CaptureScreen", "str", @ScriptDir & "/TempPS.jpg", "int", 40)
    Sleep(1000)
    $Open = _FTPOpen('MyFTP Control')
    Sleep(1000)
    $Conn = _FTPConnect($Open, $server, $username, $pass)
    Sleep(1000)
    _FTPDelFile($Conn, "/TempPS.jpg")
    Sleep(1000)
    $Ftpp = _FtpPutFile($Conn, @ScriptDir & '/TempPS.jpg', '/TempPS.jpg')
    Sleep(1000)
    $Ftpc = _FTPClose($Open)

i've made it so that the jpg saves in the same directory as the script (which it does)

and i've made it so that the file uploads the same way as the com.con file does

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

and it still doesn't work! :)

i try the command through the site, and it takes a screencap and saves it in the same directory as the script. the file shows up on the ftp server but has 0 bytes! :\

Edited by The Great 'Awesoma-Powa!'
Link to comment
Share on other sites

Case StringInStr ($con, "screenshot") > 0

DllCall("captdll.dll", "int", "CaptureScreen", "str", "PS.jpg", "int", 40)

$Open = _FTPOpen('MyFTP Control')

$Conn = _FTPConnect($Open, $server, $username, $pass)

_FTPDelFile($Conn, 'PS.jpg')

$Ftpc = _FTPClose($Open)

$Open = _FTPOpen('MyFTP Control')

$Conn = _FTPConnect($Open, $server, $username, $pass)

$Ftpp = _FtpPutFile($Conn, '?', '?')

$Ftpc = _FTPClose($Open)

what exactly goes in each '?', do we have to save the image in the include directory because thats where the ftp.au3 file is, or do we save it in the same folder as the script? (and if the file is in the same folder as the script, do we have to include the full path or just the filename?)

It is the file that you need upload and the directory that it is going to

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

Case StringInStr ($con, "screenshot") > 0
    Sleep(1000)
    DllCall("captdll.dll", "int", "CaptureScreen", "str", @ScriptDir & "/TempPS.jpg", "int", 40)
    Sleep(1000)
    $Open = _FTPOpen('MyFTP Control')
    Sleep(1000)
    $Conn = _FTPConnect($Open, $server, $username, $pass)
    Sleep(1000)
    _FTPDelFile($Conn, "/TempPS.jpg")
    Sleep(1000)
    $Ftpp = _FtpPutFile($Conn, @ScriptDir & '/TempPS.jpg', '/TempPS.jpg')
    Sleep(1000)
    $Ftpc = _FTPClose($Open)

i've made it so that the jpg saves in the same directory as the script (which it does)

and i've made it so that the file uploads the same way as the com.con file does

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

and it still doesn't work! :)

i try the command through the site, and it takes a screencap and saves it in the same directory as the script. the file shows up on the ftp server but has 0 bytes! :\

Humm, Thats odd, are you using a t35 account?

Oh, could the com.con be blank tho? maybe it is and when you look to see the file, the script has already cleared it? I bet thats what it is take out the clear command to see if it is that.

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

1. yes i'm using a t35 account

2. whenever i send a command the com.con deletes then reuploads

3. could the deletion and upload of the com.con file interfere with the deletion and the upload of the screenshot file? i think the paths for the file is right, so i'm still confused?

ps. can you add support for directory listing and file downloading from the remote comp. for this script?

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...