t1g3r Posted June 7, 2007 Posted June 7, 2007 ok bit stuck here been searching the forum for half and hour now and cant seem to find what im looking for, heres my question and i hope someone can answer. say for example i have a script running that is waiting for my internet browser to open, when the browser opens i want the script to close the browser by the cross in the top right 65% of the time and minimize the browser 35% of the time when it is detected. Is this possible and how would i script this. Thanks for any help.
McGod Posted June 7, 2007 Posted June 7, 2007 Local $sRand = Round(Random(0, 100)) If $sRand >= 65 Then MsgBox(1, "Part", "A") ElseIf $sRand < 65 Then MsgBox(1, "Part", "B") EndIf Try that. [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u]
Vindicator209 Posted June 7, 2007 Posted June 7, 2007 it gets a random number (1 - 100, representing the 100%) and ten it checks if it is greater then 65(35%), and if its not then its 65%... i know that explanation was a bit of a mouthful, but do you get it? [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]
t1g3r Posted June 7, 2007 Author Posted June 7, 2007 your script is perfect.... but i asked member t1g3r to explain why to close or minimize a browser in this manner. i see no sense in it.i just used an example of what im trying to achive, the information which was given works perfect thanks very much for the help.
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