Daywap Posted December 3, 2009 Share Posted December 3, 2009 Hi I am making random user agent maker on firefox, can anyone help me? First that I need to. Get random line from text and print in. Second I need to make it run every 2 minutes. (loop?) #Include <FF.au3> _FFStart("about:config") _FFPrefSet("general.useragent.override", "MY RANDOM USER AGENT SHOULD BE HERE :P") Any ideas? Link to comment Share on other sites More sharing options...
jvanegmond Posted December 3, 2009 Share Posted December 3, 2009 Any ideas?Yes: Go make it. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Daywap Posted December 3, 2009 Author Share Posted December 3, 2009 Yes: Go make it.So maybe you can help me? I need get random line from file, how to do it? Link to comment Share on other sites More sharing options...
Bert Posted December 3, 2009 Share Posted December 3, 2009 Seeing how you are new, I would suggest you take AutoIt 1 2 3 and review the help file. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Daywap Posted December 3, 2009 Author Share Posted December 3, 2009 Seeing how you are new, I would suggest you take AutoIt 1 2 3 and review the help file.Noo.. Cmon just say me how to get random line from text file. PLEEEEASE Link to comment Share on other sites More sharing options...
Zedna Posted December 3, 2009 Share Posted December 3, 2009 (edited) Start here:http://www.autoitscript.com/autoit3/docs/functions/FileRead.htmhttp://www.autoitscript.com/autoit3/docs/functions/StringSplit.htmhttp://www.autoitscript.com/autoit3/docs/functions/Random.htmAlso next time use descriptive topic title! Edited December 3, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
jvanegmond Posted December 3, 2009 Share Posted December 3, 2009 FileReadLine Random github.com/jvanegmond Link to comment Share on other sites More sharing options...
Daywap Posted December 3, 2009 Author Share Posted December 3, 2009 What I am doing wrong with random? #Include <FF.au3> _FFConnect() _FFPrefSet("general.useragent.override", "Random(1, 10)") Link to comment Share on other sites More sharing options...
Developers Jos Posted December 3, 2009 Developers Share Posted December 3, 2009 get rid of the double quotes around the random function. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Daywap Posted December 3, 2009 Author Share Posted December 3, 2009 Can you show me? Bad English, sorry ;\ Link to comment Share on other sites More sharing options...
Developers Jos Posted December 3, 2009 Developers Share Posted December 3, 2009 "Random(1, 10)" must be Random(1, 10) " -> Double Quote (but you could have spent a little time to figure that out yourself.) Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Daywap Posted December 3, 2009 Author Share Posted December 3, 2009 "Random(1, 10)" must be Random(1, 10) " -> Double Quote (but you could have spent a little time to figure that out yourself.) Jos I already tried it, but it wont work #Include <FF.au3> _FFConnect() _FFPrefSet("general.useragent.override", Random(1, 10)) I mean when I make not random it works. Link to comment Share on other sites More sharing options...
Developers Jos Posted December 3, 2009 Developers Share Posted December 3, 2009 (edited) Random works fine: MsgBox(0,"random",Random(1, 10)) Maybe you need an Integer as output of the random() func, just check the helpfile for that. Edited December 3, 2009 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Daywap Posted December 3, 2009 Author Share Posted December 3, 2009 Random works fine:MsgBox(0,"random",Random(1, 10))Maybe you need an Integer as output of the random() func, just check the helpfile for that.I searched for that about for 30minutes and nothing . Cmon is that so hard? Please just show me where I have to write random . PPPLEEEAAASEE Link to comment Share on other sites More sharing options...
Developers Jos Posted December 3, 2009 Developers Share Posted December 3, 2009 I searched for that about for 30minutes and nothing . Cmon is that so hard? Please just show me where I have to write random . PPPLEEEAAASEE Where did you search? The helpfile? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Daywap Posted December 3, 2009 Author Share Posted December 3, 2009 Where did you search? The helpfile?Yes, I mean I found something but have no idea how to use it Link to comment Share on other sites More sharing options...
Developers Jos Posted December 3, 2009 Developers Share Posted December 3, 2009 Yes, I mean I found something but have no idea how to use it How difficult can this be? Random -------------------------------------------------------------------------------- Generates a pseudo-random float-type number. Random ( [Min [, Max [, Flag]]] ) Parameters Min [optional] The smallest number to be generated. The default is 0. Max [optional] The largest number to be generated. The default is 1. Flag [optional] If this is set to 1 then an integer result will be returned. Default is a floating point number. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Daywap Posted December 3, 2009 Author Share Posted December 3, 2009 How difficult can this be? Something like this? Not really working #Include <FF.au3> _FFConnect() $var = Int(Random(1, 6, 1)) _FFPrefSet("general.useragent.override", $var) Link to comment Share on other sites More sharing options...
jvanegmond Posted December 4, 2009 Share Posted December 4, 2009 You're setting your useragent string to a random number between 1 and 6. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Zedna Posted December 4, 2009 Share Posted December 4, 2009 I searched for that about for 30minutes and nothing . Cmon is that so hard? Please just show me where I have to write random . PPPLEEEAAASEE If you have such big problems with such easy functions then you definitely should either more read helpfile (and its examples) or quit scripting Resources UDF ResourcesEx UDF AutoIt Forum Search 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