Sign in to follow this  
Followers 0
bogQ

need more info about _FileWriteToLine

3 posts in this topic

The first one replace the 2 line of Lista.load.dat with txt (this is working)

#include <File.au3>
$file = FileOpen("Lista.load.dat", 1)
$linija_1 = FileReadLine("Lista.load.dat", "2")
FileClose($file)
_FileWriteToLine("Lista.load.dat", 2, "omg now its working O_o", 1)

But when i need to read 2 line and add it +1 and then put it ower 2 line its not working

#include <File.au3>
$file = FileOpen("Lista.load.dat", 1)
$linija_1 = FileReadLine("Lista.load.dat", "2")
FileClose($file)
$linija_x1 = $linija_1 + 1
_FileWriteToLine("Lista.load.dat", 2, $linija_x1, 1)
MsgBox(0x40, "start", $linija_x1, 10)

note that my Lista.load.dat nave only 2 lines and its in the same dir where script is

1. number
1

if the second line = 1

$linija_x1 = $linija_1 + 1 ;this is = 2

and msg box telme that its canculating 1+1=2 (this is ok)

but it isnt wtiting number 2 (or other canculations) on second line

can someone pls telme what did i understand wrong from help file ^^


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites



The first one replace the 2 line of Lista.load.dat with txt (this is working)

#include <File.au3>
$file = FileOpen("Lista.load.dat", 1)
$linija_1 = FileReadLine("Lista.load.dat", "2")
FileClose($file)
_FileWriteToLine("Lista.load.dat", 2, "omg now its working O_o", 1)

But when i need to read 2 line and add it +1 and then put it ower 2 line its not working

#include <File.au3>
$file = FileOpen("Lista.load.dat", 1)
$linija_1 = FileReadLine("Lista.load.dat", "2")
FileClose($file)
$linija_x1 = $linija_1 + 1
_FileWriteToLine("Lista.load.dat", 2, $linija_x1, 1)
MsgBox(0x40, "start", $linija_x1, 10)

note that my Lista.load.dat nave only 2 lines and its in the same dir where script is

1. number
1

if the second line = 1

$linija_x1 = $linija_1 + 1 ;this is = 2

and msg box telme that its canculating 1+1=2 (this is ok)

but it isnt wtiting number 2 (or other canculations) on second line

can someone pls telme what did i understand wrong from help file ^^

_FileWriteToLIne needs a string for the line to write, so you need to replace $linija_x1 with String($linija_x1)


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

_FileWriteToLIne needs a string for the line to write, so you need to replace $linija_x1 with String($linija_x1)

ty martin

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

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