Jump to content
Sign in to follow this  
d4rk

Copy Array To a .Txt

Recommended Posts

d4rk

hello every1,

I've make a script to copy all elements from the array to a .txt file, but it seem can't work

with _ArrayToClip(), i just can copy a part of the array (it's too large ?)

hope for help

thx


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
monoceres

Why do you use _ArrayToClip to make a txt file?

Dim $array[3]=[1,3,8]
$handle=FileOpen("Array Output.txt",1)
For $i=0 To UBound($array)
FileWriteLine($handle,$array[$i])
Next

:)


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
d4rk

:) Nope

I'm using a 2D array (don't know if it's the correct name)

i'll try abit later


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
monoceres

:) Nope

I'm using a 2D array (don't know if it's the correct name)

i'll try abit later

If you're using a 2D array how would you like the layout to be?

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
d4rk

sorry,i'm making non sense

It's an array in a loop, show all files in a folder

and the total dirs are 4

not 2D, sozi

Edited by d4rk

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
monoceres

Could you please post example :)


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
d4rk

#include <Array.au3>
#include <File.au3>

func _MakeLog()
;||----------
$ContentDir = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Paths", "Directory")
$InContent=_FileListToArray($ContentDir,"*.*",2);show content
;----------||


;||----------
$Delindex=_ArraySearch($InContent,"index.dat");delete index.dat file from the array
If Not @error Then
_ArrayDelete($InContent,$Delindex)
EndIf
;----------||


;||----------
$Deldesktop=_ArraySearch($InContent,"desktop.ini");delete desktop.ini file from the array
If Not @error Then
_ArrayDelete($InContent,$Deldesktop)
EndIf
;----------||


;||----------
$Element=0
_ArrayDelete($InContent,$Element);delete the [0]
;----------||




_ArrayDisplay($InContent, "Danh Sach Cac Folder Trong Content");displey

for $i=0 to UBound($InContent)-1
$Dir=$ContentDir & "\" & $InContent[$i];dir for each folder inside Content.IE5


$Files=_FileListToArray($Dir,"*.*")
_ArrayDisplay($Files); show 4 Array display tables



for $j=0 to UBound($Files)
MsgBox(0, "Search result:", $Files[$j]);work very well here, show value of all element in each msgbox()
;but when use FileWriteLine($log,$Files[$j]), it won't work .

Next
Next

EndFunc

Edited by d4rk

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
monoceres

This should do it:

;...
for $j=0 to UBound($Files)-1 ; Always use -1 when using UBound, or the script will crash
MsgBox(0, "Search result:", $Files[$j]);work very well here, show value of all element in each msgbox()
;but when use FileWriteLine($log,$Files[$j]), it won't work .
FileWriteLine("log.txt",$Files[$j]); I'm sure this will work.

Next
;...

:)


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
d4rk

Super Cool !

i haven't thought how simple it was :)

this's a part of my Temporary Looker, i'll post it in the Example Forum in the next few days

Thanks again MONO :(


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.