goldenix Posted February 11, 2009 Share Posted February 11, 2009 (edited) I want the code to generate randomly the same number. but its not working. while 1 $a = Random(1,1,1) ConsoleWrite ($a & ' ') If $a = 0 then MsgBox(0,'',$a) WEnd Edited February 11, 2009 by goldenix My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
trancexx Posted February 11, 2009 Share Posted February 11, 2009 All Fools' Day already? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Manjish Posted February 11, 2009 Share Posted February 11, 2009 What is it that u want to do.. i kinda agree with trancexx.. [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
goldenix Posted February 11, 2009 Author Share Posted February 11, 2009 (edited) What is it that u want to do.. i kinda agree with trancexx.. An experiment. I want to generate randomly the same number in an infinite loop & then use my psychokinetic abilities to make the computer generatea number Zero. That was the plan, But I have my doubts now, maybe I should let the code do infinite random 0 & 1 generations & then try to force the computer to generate more zeros at constant rate by using my mind. But I dont know how to read how many lines are in the file, is there already built in function to read a nr of lines in a file? This is what I have so far: #Include <Misc.au3> $dll = DllOpen("user32.dll") while 1 For $x=1 to 100000 $a = Random(0,1,1) If $a = 0 Then filewriteline('0.txt',$a & @CRLF) If $a = 1 Then filewriteline('1.txt',$a & @CRLF) If _IsPressed("78", $dll) Then ExitLoop ; F9 to exitloop Next ;~ compare wich filehas more lines in it ;~ ConsoleWrite (0 or 1 wins & @CRLF) WEnd DllClose($dll) Edited February 11, 2009 by goldenix My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
Xand3r Posted February 11, 2009 Share Posted February 11, 2009 (edited) While 1 $rnd=Random(0.1,1.000000001) $rnd1=Ceiling($rnd) ToolTip($rnd,0,0) If $rnd1=2 Then MsgBox(0 , "OMG" , "WoW you have pk :))") WEnd although it should be possible it's virtually impossbile to do it Edited February 11, 2009 by TheMadman Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
weaponx Posted February 11, 2009 Share Posted February 11, 2009 If this topic was meant to be a joke, its not very funny. Link to comment Share on other sites More sharing options...
goldenix Posted February 11, 2009 Author Share Posted February 11, 2009 If this topic was meant to be a joke, its not very funny.Why would anyone assume this is a joke? Im trying to see if I can make the computer generate more 0 than 1 & see what will happen.So there is no built in finction to read total amount of lines in a file? My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
Paulie Posted February 11, 2009 Share Posted February 11, 2009 Why would anyone assume this is a joke? Im trying to see if I can make the computer generate more 0 than 1 & see what will happen.So there is no built in finction to read total amount of lines in a file?_FileCountLines()I don't quite understand your point, however... Link to comment Share on other sites More sharing options...
Xand3r Posted February 11, 2009 Share Posted February 11, 2009 try your pk abilities on my example Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
goldenix Posted February 11, 2009 Author Share Posted February 11, 2009 _FileCountLines()I don't quite understand your point, however...Thanx I finished my code, Ill share it under sample scripts section. My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] 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