top Posted April 11, 2006 Posted April 11, 2006 my code doesnt work ;( please help. thanks in advance $file = FileOpen("random.txt", 0) $line = FileReadLine($file) Run("notepad.exe") WinWait("Untitled -") ControlSetText("Untitled -", "", "Edit1", "$line" ) FileClose($file)
flaxcrack Posted April 11, 2006 Posted April 11, 2006 my code doesnt work ;( please help. thanks in advance $file = FileOpen("random.txt", 0) $line = FileReadLine($file) Run("notepad.exe") WinWait("Untitled -") ControlSetText("Untitled -", "", "Edit1", "$line" ) FileClose($file) $file = "random.txt" FileOpen($file) $line = FileReadLine($file) Run("notepad.exe") WinWait("Untitled -") ControlSetText("Untitled -", "", "Edit1", "$line" ) FileClose($file) [quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD()
GaryFrost Posted April 11, 2006 Posted April 11, 2006 ControlSetText("Untitled -", "", "Edit1", $line ) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
top Posted April 11, 2006 Author Posted April 11, 2006 (edited) $file = "random.txt" FileOpen($file, 0) $line = FileReadLine($file) Run("notepad.exe") WinWait("Untitled -") ControlSetText("Untitled -", "", "Edit1", $line ) FileClose($file) now works but how can i make to result a random line Edited April 11, 2006 by top
Bert Posted April 11, 2006 Posted April 11, 2006 Random ( [Min [, Max [, Flag]]] ) The Vollatran project My blog: http://www.vollysinterestingshit.com/
GaryFrost Posted April 11, 2006 Posted April 11, 2006 #include <file.au3> $file = "random.txt" FileOpen($file, 0) $linecount = _FileCountLines($file) $num = Random(1,$linecount,1) $line = FileReadLine($file, $num) Run("notepad.exe") WinWait("Untitled -") ControlSetText("Untitled -", "", "Edit1", $line ) FileClose($file) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
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