Sign in to follow this  
Followers 0
yngwie

Help ! Problem with FTP Autoit Function

2 posts in this topic

Hey Guys.

Atm I am using this Script :

#Include <FTP.au3>

$DateiName   = "Screenshot105.jpg"
$PfadUndName = @DesktopDir & "\" & $DateiName



FTP_PUT()

Func FTP_PUT()

    $server      = 'ftp.mitglied.multimania.de'
    $username    = 'myname'
    $pass        = 'mypw'
    $UPLOADFILE  = $PfadUndName
    $FTPFILENAME = $DateiName

    $Open = _FTPOpen('Was hier steht ist egal')
    $Conn = _FTPConnect($Open, $server, $username, $pass)
    $Ftpp = _FtpPutFile($Conn, $UPLOADFILE, $FTPFILENAME)
    $Ftpc = _FTPClose($Open)

EndFunc

It works fine,it also uploads the File I want it to...

But is there any way,to put this Script in anothter Script?

Example :

HERE IS A SCRIPT WHICH TAKES SCREENSHOTS

HERE IS THE FTP SCRIPT WHICH RUNS EVERY 5 MINUTES TO UPLOAD THE SCREENSHOT

So that both scripts are in one Script...That i dont need seperately start the FTP Script...

I would be so thankfull if u guys could help me out :mellow:

Sorry for my bad english...

-Yngwie

Share this post


Link to post
Share on other sites



Easiest way - make it sleep for 5 minutes.

#Include <FTP.au3>

$DateiName   = "Screenshot105.jpg"
$PfadUndName = @DesktopDir & "\" & $DateiName

While 1
    _TakeScreenshot()
    FTP_PUT()
    Sleep(300000)       ;sleep 5 minutes
WEnd

Func _TakeScreenshot()
    ;fill in the screenshot taking part
EndFunc

Func FTP_PUT()

    $server      = 'ftp.mitglied.multimania.de'
    $username    = 'myname'
    $pass        = 'mypw'
    $UPLOADFILE  = $PfadUndName
    $FTPFILENAME = $DateiName

    $Open = _FTPOpen('Was hier steht ist egal')
    $Conn = _FTPConnect($Open, $server, $username, $pass)
    $Ftpp = _FtpPutFile($Conn, $UPLOADFILE, $FTPFILENAME)
    $Ftpc = _FTPClose($Open)

EndFunc

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0