Jump to content
Sign in to follow this  
top

Newbie

Recommended Posts

top

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)

Share this post


Link to post
Share on other sites
flaxcrack

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()

Share this post


Link to post
Share on other sites
top

$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 by top

Share this post


Link to post
Share on other sites
GaryFrost

#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.

 

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.