Jump to content

Need Help.. Again ;(


top
 Share

Recommended Posts

wrong code? :think:

#include <file.au3>

$file = "random.txt"

FileOpen($file, 0)

$linecount = _FileCountLines($file)
$num = Random(1,$linecount,1)

$line = FileReadLine($file, $num)

opt("WinTitleMatchMode", 4)

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

Run("notepad.exe")

While 1
sleep(300)
WEnd

Func ff()
HotKeySet("{ENTER}")
$bb=WinGetHandle("classname=Notepad")
ControlSetText("Untitled -", "", "Edit1", $line )
send("{ENTER}")
HotKeySet("{ENTER}", "ff")
EndFunc


FileClose($file)
Link to comment
Share on other sites

?

#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

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

maybe

#include <file.au3>

opt("WinTitleMatchMode", 4)

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

Run("notepad.exe")

While 1
sleep(300)
WEnd

Func ff()
HotKeySet("{ENTER}")

$file = "lang.lng"
FileOpen($file, 0)
$linecount = _FileCountLines($file)
$num = Random(1,$linecount,1)
$line = FileReadLine($file, $num)
FileClose($file)

$bb=WinGetHandle("classname=Notepad")
ControlSend("Untitled -", "", "Edit1", $line )
send("{ENTER}")
HotKeySet("{ENTER}", "ff")
EndFunc

8)

phone rang...

Edited by Valuater

NEWHeader1.png

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...