Jump to content
Sign in to follow this  
top

Include Help

Recommended Posts

top

i wanna compile the code

its possible to include random.txt in the exe?

#include <file.au3>

$file = "random.txt"

FileOpen($file, 0)

$linecount = _FileCountLines($file)

Opt("WinTitleMatchMode", 4)

HotKeySet("{ENTER}", "ff")
HotKeySet("{ESC}","_Terminate")

Run("notepad.exe")

While 1
    Sleep(300)
WEnd

FileClose($file)

Func _Terminate()
    Exit
EndFunc

Func ff()
    HotKeySet("{ENTER}")
    $bb = WinGetHandle("classname=Notepad")
    $num = Random(1, $linecount, 1)

    $line = FileReadLine($file, $num)
    ControlSetText("Untitled -", "", "Edit1", $line)
    Send("{ENTER}")
    HotKeySet("{ENTER}", "ff")
EndFunc ;==>ff

Share this post


Link to post
Share on other sites
BigDod

Use FileInstall, you will find it in the help file.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

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  

×