B3TA_SCR1PT3R Posted August 4, 2005 Share Posted August 4, 2005 $t = IniRead("C:\Program Files\Pop-Up Blocker\System.ini","Settings","Icon","0") $r = IniRead("C:\Program Files\Pop-Up Blocker\System.ini","Settings","Notify","0") $s = IniRead("C:\Program Files\Pop-Up Blocker\System.ini","Settings","Record","0") ;================= If BitAND($t,$r,$s) = 1 Then MsgBox(0,"","test") is this outputing wat i think its supposed to be outputing? does that mean they all equal 1 or would i change the = 1 to = 3? to show that they all equal 1 ......in other words is bitAND the sum ? [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right] Link to comment Share on other sites More sharing options...
B3TA_SCR1PT3R Posted August 4, 2005 Author Share Posted August 4, 2005 I couldn't explain but.. this is the exampleExample$x = BitAND(13, 7) ;x == 5 because 1101 AND 0111 = 0101$x = BitAND(2, 3, 6) ;x == 2 because 0010 AND 0011 AND 0110 = 0010this is use of hex ( i think )8)<{POST_SNAPBACK}>no your just giving me a headache from the confusion i cant understand that for sh*t [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right] Link to comment Share on other sites More sharing options...
GaryFrost Posted August 4, 2005 Share Posted August 4, 2005 $a = 1 $b = 2 $c = 4 $d = 8 $answer = $c + $b If BitAND($answer,$b) Then MsgBox(0,"test","Bit Found") If Not BitAND($answer,$a) Then MsgBox(0,"test","Bit Not Found") If BitAND($answer,$c) Then MsgBox(0,"test","Bit Found") 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 More sharing options...
therks Posted August 4, 2005 Share Posted August 4, 2005 Uh, why not just test it yourself?msgbox(0,0,BitAnd(1, 1, 1)); = 1 msgbox(0,0,BitAnd(1, 0, 1)); = 0 msgbox(0,0,BitAnd(1, 0, 0)); = 0Anyway, if you want the sum:If ($t + $r + $s) = 3 Then MsgBox(0,"","test")As for explaining the functions, I'll do my best.The way the functions work, in my understanding, is it evaluates whatever number you give it in binary. (ie: 13 = 1101, 7 = 0101).BitAND then compares which bits (the 1's or 0's) are set in each number you give it.BitAND(13, 7)Number A: 13 = 1101 Number B: 7 = 0101"The first bit of A is 1. The first bit of B is 0. These do not match. Return 0.The second bit of A is 1. The second bit of B is 1. Both values are 1. Return 1.The third bit of A is 0. The third bit of B is 0. Both values are 0. Return 0.The fourth bit of A is 1. The fourth bit of B is 1. Both values are 1. Return 1."Return 0Return 1Return 0Return 1Full Return = 01010101 in decimal = 5Function return: 5So BitAnd(13, 7) = 5 My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
B3TA_SCR1PT3R Posted August 4, 2005 Author Share Posted August 4, 2005 (edited) OMG MIGRANE!!!!!!! Edited August 4, 2005 by B3TA_SCR1PT3R [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right] Link to comment Share on other sites More sharing options...
therks Posted August 4, 2005 Share Posted August 4, 2005 Yeah, maybe you should just leave this topic entirely before your head explodes. 'Cus that's what's going to happen at the rate we're going. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
B3TA_SCR1PT3R Posted August 4, 2005 Author Share Posted August 4, 2005 i really want to grasp this thing cuz its a nesecity in the script im making Opt("WinTitleMatchMode", 1) ;======= $t = IniRead("C:\Program Files\Pop-Up Blocker\System.ini","Settings","Icon","0") $r = IniRead("C:\Program Files\Pop-Up Blocker\System.ini","Settings","Notify","0") $s = IniRead("C:\Program Files\Pop-Up Blocker\System.ini","Settings","Record","0") ;============ If $t = 1 Then Opt("TrayIconHide",1) ;============= ;================= If BitAND($t,$r,$s) = 1 Then MsgBox(0,"","test") While 1 If WinExists("http://") Then WinClose("http://") EndIf WEnd ok now i need to put certain things in betweeen While 1 and WEnd like "Filewrite line","Tray Tip" but if the keys in the ini are 0 i dont want the file and tray things ..... do u understand wat im saying and bitAND i was using that so like if ($t + $r +$s) = 3 do everything and if = 2 only do this and stuff [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right] Link to comment Share on other sites More sharing options...
GaryFrost Posted August 4, 2005 Share Posted August 4, 2005 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 More sharing options...
B3TA_SCR1PT3R Posted August 4, 2005 Author Share Posted August 4, 2005 <{POST_SNAPBACK}>that dosent look good [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right] Link to comment Share on other sites More sharing options...
Valik Posted August 4, 2005 Share Posted August 4, 2005 i really want to grasp this thing cuz its a nesecity in the script im makingIf you want to understand it, stop making idiotic posts like the two below (Yes, I'm aware this is chronologically out of sequence).no your just giving me a headache from the confusion i cant understand that for sh*tOMG MIGRANE!!!!!!!Really dude, you're getting very annoying very fast. If you want to learn AutoIt, act like you have some semblance of sense about you, if not, leave the forum and don't pester us with your childish antics. We've all seen your posts up until now and I think all of us are in agreement that you've acted quite immature in virtually all of them. 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