ReaImDown Posted April 22, 2008 Posted April 22, 2008 using filewrite (or the same type of function) is it possible to backspace a certain amount of times without actually opening the file in question? [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
Bert Posted April 22, 2008 Posted April 22, 2008 Are you trying to delete some text that is in the file by overwriting what is there? The Vollatran project My blog: http://www.vollysinterestingshit.com/
ReaImDown Posted April 22, 2008 Author Posted April 22, 2008 Are you trying to delete some text that is in the file by overwriting what is there?say I have a txt file, and I dont know what it says inside... now, what I want to do is (without opening it) Backspace...say it said "This is my txt file" I want it then to say "This is my txt fil" [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
weaponx Posted April 22, 2008 Posted April 22, 2008 (edited) How do you expect to edit something without opening it? $filename = "sometext.txt" $file = FileRead($filename) $file = StringTrimRight($file, 1) FileDelete($filename) FileWrite($filename, $file) Edited April 22, 2008 by weaponx
monoceres Posted April 22, 2008 Posted April 22, 2008 say I have a txt file, and I dont know what it says inside... now, what I want to do is (without opening it) Backspace...say it said "This is my txt file" I want it then to say "This is my txt fil"You can't change a file without opening it, it's just doesn't work that way. Like going through a door without opening it Broken link? PM me and I'll send you the file!
ReaImDown Posted April 22, 2008 Author Posted April 22, 2008 (edited) You can't change a file without opening it, it's just doesn't work that way. Like going through a door without opening it I know that, I meant without having it open on my computer screen, I know I need it open, problem was, I didnt want to see it open or I would send("{BS}")p.s. my girlfriend tried to go through a door without opening it first, that was funny as shit, hah Edited April 22, 2008 by ReaImDown [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
Bert Posted April 22, 2008 Posted April 22, 2008 Ok, I think I understand what you want to do. You want to edit the file without having the file in viewing mode on your screen. Ok that you can do. Take a look at the following commands and review the examples for each command. It will make sence to you: FileOpenDialog FileOpen FileClose Review all the string management commands. Depending on how you want to edit the txt file is what string command you want to use. You can review all the string examples, and get a quick handle on how each one works. You should catch on quickly on how the string command name tells what it does. Example: StringLeft returns a number of characters from the left-hand side of a string. StringRight returns a number of characters from the right-hand side of a string. The Vollatran project My blog: http://www.vollysinterestingshit.com/
ReaImDown Posted April 24, 2008 Author Posted April 24, 2008 Ok, I think I understand what you want to do. You want to edit the file without having the file in viewing mode on your screen. Ok that you can do. Take a look at the following commands and review the examples for each command. It will make sence to you:FileOpenDialog FileOpenFileCloseReview all the string management commands. Depending on how you want to edit the txt file is what string command you want to use. You can review all the string examples, and get a quick handle on how each one works. You should catch on quickly on how the string command name tells what it does. Example: StringLeft returns a number of characters from the left-hand side of a string. StringRight returns a number of characters from the right-hand side of a string.this is what I am looking for basically (doesnt work predictably)$a = fileopen("a.txt",1)FileWrite($a, "{Bs}")FileClose($a)but that is basically what I would want, if it would work [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
weaponx Posted April 24, 2008 Posted April 24, 2008 I posted the code way back at the beginning...#510119
ReaImDown Posted April 24, 2008 Author Posted April 24, 2008 I posted the code way back at the beginning...#510119sorry boss, missed that, guess I read it b4 u edited it...thank you very much [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
weaponx Posted April 24, 2008 Posted April 24, 2008 sorry boss, missed that, guess I read it b4 u edited it...thank you very much The only edit I did was to add autoit tags.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now