ReaImDown Posted February 20, 2009 Share Posted February 20, 2009 why does this not trim right? #include<misc.au3> $file = FileOpen("testing.txt",1) while 1 if _IsPressed("08") then StringTrimRight($file,1);backspace if _IsPressed("5a") Then;Z FileClose($file) Exit EndIf WEnd [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
Ealric Posted February 20, 2009 Share Posted February 20, 2009 why does this not trim right? #include<misc.au3> $file = FileOpen("testing.txt",1) while 1 if _IsPressed("08") then StringTrimRight($file,1);backspace if _IsPressed("5a") Then;Z FileClose($file) Exit EndIf WEnd You have your file open in write mode. You aren't reading anything in the file. Use FileRead to read the data and assign it to a variable and trim the variable. My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic] Link to comment Share on other sites More sharing options...
FireFox Posted February 20, 2009 Share Posted February 20, 2009 @ReaImDown FileRead is properly used for read files... Cheers, FireFox. Link to comment Share on other sites More sharing options...
ReaImDown Posted February 20, 2009 Author Share Posted February 20, 2009 @ReaImDownFileRead is properly used for read files...Cheers, FireFox.is there any other way? [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
Ealric Posted February 20, 2009 Share Posted February 20, 2009 #include<misc.au3> $file = FileOpen("testing.txt", 1) $fileread = FileRead($file) While 1 If _IsPressed("08") Then StringTrimRight($fileread,1);backspace If _IsPressed("5a") Then;Z FileClose($file) Exit EndIf WEnd You need something along the lines of... My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic] Link to comment Share on other sites More sharing options...
ReaImDown Posted February 20, 2009 Author Share Posted February 20, 2009 #include<misc.au3> $file = FileOpen("testing.txt", 1) $fileread = FileRead($file) While 1 If _IsPressed("08") Then StringTrimRight($fileread,1);backspace If _IsPressed("5a") Then;Z FileClose($file) Exit EndIf WEnd You need something along the lines of... that would be the slower way of doing it, is there anything quicker? [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
Ealric Posted February 20, 2009 Share Posted February 20, 2009 Check out the user-defined functions for file management in the help file. My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic] Link to comment Share on other sites More sharing options...
Aceguy Posted February 20, 2009 Share Posted February 20, 2009 what is it your tring to achieve [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
Developers Jos Posted February 20, 2009 Developers Share Posted February 20, 2009 If _IsPressed("08") Then $fileread = StringTrimRight($fileread,1);backspace SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Marlo Posted February 20, 2009 Share Posted February 20, 2009 If _IsPressed("08") Then $fileread = StringTrimRight($fileread,1);backspace ahh beat me to it, cant believe no one else noticed that Click here for the best AutoIt help possible.Currently Working on: Autoit RAT Link to comment Share on other sites More sharing options...
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