Niclas Posted December 14, 2006 Share Posted December 14, 2006 I've written a script with AutoIT, which opens the config of a Netgear router and enters a password in the wireless settings. After that the config is saved and the browser window will be closed. This works well already but naturally only the password used in the script is always being entered. Now I'd like the script to be run by the windows taskplaner each second day. For not having always the same password being entered I'd like AutoIt to open up a textfile (or whatever) and pick a random entry to enter as the new password in the Netgear configuration. Additionally a window should pop up, showing the recent password after it has been entered and eventually an e-mail should be generated in which also the used password is entered. Can this be realized with AutoIt ? There are the functions "FileRead" and "FileReadLine" but how can a textfile being opened before and a random entry being picked ? Link to comment Share on other sites More sharing options...
Xenobiologist Posted December 14, 2006 Share Posted December 14, 2006 Hi, no problem. Random. _FileReadToArray, even sending an email ist no prob. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
NeoFoX Posted December 14, 2006 Share Posted December 14, 2006 #include <file.au3> $pass = "pass.txt" $count = _FileCountLines($pass) $read = FileReadLine($pass,Random(1, $count, 1)) MsgBox(1,"tt",$read) little example Neo [center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center] Link to comment Share on other sites More sharing options...
Niclas Posted December 14, 2006 Author Share Posted December 14, 2006 Great ! That did it. Many thanks. The next problem is, that instead off one of the passwords being entered, the only entry being made is a "3". But the window popping up thereafter shows the randomly picked password. Any clue ? Link to comment Share on other sites More sharing options...
Xenobiologist Posted December 14, 2006 Share Posted December 14, 2006 Great ! That did it. Many thanks.The next problem is, that instead off one of the passwords being entered, the only entry being made is a "3". But the window popping up thereafter shows the randomly picked password.Any clue ?Hi,versuch es doch mal hier: Ist vielleicht einfacher. http://autoit.aufwaerts.de/portal.phpSo long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Niclas Posted December 14, 2006 Author Share Posted December 14, 2006 Ja, werde mich dann mal wohl registrieren. Habe diesen Post auch im deutschen Unattended-Forum gepostet, aber da kam noch nicht allzuviel zurück. Link to comment Share on other sites More sharing options...
Niclas Posted December 18, 2006 Author Share Posted December 18, 2006 Has anyone a clue why only a "3" is entered into the textfield of the router config instead off the randomly chosen password out of the textfile ? Like I said, the messagebox shows the chosen password correctly. Link to comment Share on other sites More sharing options...
Niclas Posted December 18, 2006 Author Share Posted December 18, 2006 Thanks to th.meger it's solved. Instead off "Send($count)" it had to be "Send($read)". 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