kor Posted April 7, 2015 Share Posted April 7, 2015 (edited) I've always thought these are pretty nifty, but have never really understood how they work. I've looked in the help and even tried the BitAnd visualizer that has come up in my searching, but can't quite wrap my head around them. as I test with code I'm just getting more confused. ; Indicates write method options Global Const $L_CONSOLE = 1 Global Const $L_FILE = 2 Global Const $L_EVENT = 4 $iFlag = 4 ; write to console = 1, 3, 5, 7 ; write to file = 2, 3, 6, 7 ; write to evenlog = 4, 5, 6, 7 If BitOR($iFlag, 3) Then ConsoleWrite("yes" & @CR) ConsoleWrite(BitAND($iFlag, 1) & @CR) ConsoleWrite(BitAND($iFlag, 2) & @CR) ConsoleWrite(BitAND($iFlag, 3) & @CR) ConsoleWrite(BitAND($iFlag, 4) & @CR) ConsoleWrite(BitAND($iFlag, 8) & @CR) Basically what I'm trying to figure out is how to get BitAnd, and BitOR's to return true if the numbers are between the numbers in the code comments. The returns never seem to be true or false either, they are numbers. Which I don't quite get yet either. Edited April 7, 2015 by kor Link to comment Share on other sites More sharing options...
jchd Posted April 7, 2015 Share Posted April 7, 2015 http://en.wikipedia.org/wiki/Bitwise_operation This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
SadBunny Posted April 7, 2015 Share Posted April 7, 2015 (edited) I don't understand those three comment lines. I guess your intention is to determine where to write stuff by setting $iFlag. But what do you mean by "if the numbers are between the numbers in the code comments"? Edited April 7, 2015 by SadBunny Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
czardas Posted April 7, 2015 Share Posted April 7, 2015 I use the following analogy to wrap my head around BitOr() It might help, or it might confuse you even more. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
SadBunny Posted April 7, 2015 Share Posted April 7, 2015 (edited) Hard to explain this without lots of binary numbers. If you are fluent in number systems, this whole bitwise operation thing kind of makes intuitive sense, so if it doesn't it probably means that you don't want to worry about number systems. Let me try to explain it without talking about bits, binary numbers or number system conversions at all and just stick to the decimal system we all know and love, and elementary school math (all we'll need is addition and exponentiation). Just for checking flags like this, you can go with BitAnd. (You can do a lot with BitOr, BitNot, BitXor and all other bitwise operations, but that is outside the scope of this trick that enables you to toggle an arbitrary number of flags using only one piece of data.) Ok. So why do we like binary and bitwise calculation for this way of specifying flags? Because to create ANY (positive) number, even floats (but let's stick to integers), all we have to do is turn a certain combination of powers of 2 "off" or "on" (that's our bit). In other words: ANY number has a unique set of distinct powers of 2 that you can add to get that number. Distinct meaning that you will never need the same power twice. ; Say we want to express 5 as a combination of powers of 2: ; 2^2 (=4) + 2^0 (=1) ; ; (remember: x^0 is always 1, for any x!) So how to use this as a way to specify flags? Well, we assign every flag a unique power of 2: $FLAG1 = 2 ^ 0 ; dec 1, bin 1 $FLAG2 = 2 ^ 1 ; dec 2, bin 10 $FLAG3 = 2 ^ 2 ; dec 4, bin 100 $FLAG4 = 2 ^ 3 ; dec 8, bin 1000 ... and when we get a number, say $iFlag = $FLAG2 + $FLAG4 = 2 + 8 = 10, all we need to know is which combination of powers of 2 we need to make that number 10. Remember, we named the powers of 2, so when we know which powers of 2 we need, we know which names were "on" and which were "off". How to figure this out? Well, with BitAnd: $FLAG1 = 2 ^ 0 ; dec 1, bin 1 $FLAG2 = 2 ^ 1 ; dec 2, bin 10 $FLAG3 = 2 ^ 2 ; dec 4, bin 100 $FLAG4 = 2 ^ 3 ; dec 8, bin 1000 checkFlags($FLAG2 + $FLAG4) Func checkFlags($iFlags) For $i = 0 To 3 ; check which of the first four powers of 2 we need to make $iFlags ConsoleWrite("Do we need 2^" & $i & " (" & 2 ^ $i & ") to make " & $iFlags & "? ") If BitAND($iFlags, 2^$i) Then ConsoleWrite("YEP! That means that FLAG " & $i & " was turned on." & @CRLF) Else ConsoleWrite("NOPE! That means that FLAG " & $i & " was turned off." & @CRLF) EndIf Next EndFunc ;==>checkFlags Result: Do we need 2^0 (1) to make 10? NOPE! That means that FLAG 0 was turned off. Do we need 2^1 (2) to make 10? YEP! That means that FLAG 1 was turned on. Do we need 2^2 (4) to make 10? NOPE! That means that FLAG 2 was turned off. Do we need 2^3 (8) to make 10? YEP! That means that FLAG 3 was turned on. I am cutting a few mathematical corners here, but hopefully this makes sense without having to break your head over the binary system. http://en.wikipedia.org/wiki/Bitwise_operation explains it much more in-depth, but perhaps less intuitively, because it assumes some knowledge on converting between number systems. It is very concise though. Hope I made it easier instead of harder Good luck. /edit: Why is the result of these BitAnd (and related) functions a number and not a boolean truth value? That's because it's a mathematical operation that is done on two numbers, just like *, +, -, /, ^... And just like those operations it results in a new number. For this, we will need to think about bits and binary, because the catch is that you will need to convert both numbers to binary (base-2) before you can see what the operators do exactly. They work on the digits of the numbers represented in binary. Because those digits can only be 0 and 1, they can be used in these logical operations. The aforementioned wiki explains exactly how that works. Edited April 7, 2015 by SadBunny Professor_Bernd 1 Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
kor Posted April 7, 2015 Author Share Posted April 7, 2015 I don't understand those three comment lines. I guess your intention is to determine where to write stuff by setting $iFlag. But what do you mean by "if the numbers are between the numbers in the code comments"? @SadBunny, thank you for the explanation. I don't understand it right now, but as I experiement more I'll keep coming back to your comment and hopefully it will click eventually. Re: your post about the comments, using the word 'between' was probably not the best. For the first code example I'll explain what I mean. ; write to console = 1, 3, 5, 7 This means that the function should 'write to console' IF the result of the BitAND(or BitOR???) would equal 1, 3, 5, or 7. console = 1 file = 2 eventlog = 4 so (console = 1), (console + file = 3), (console + eventlog = 5), (console + file + eventlog = 7) At least that's how I understand BitAND's to work? Link to comment Share on other sites More sharing options...
JakeJohnson74 Posted April 7, 2015 Share Posted April 7, 2015 This is a good question, but a hard response! I think of it as a light switch. Binary is either a 0 or 1 (aka Base 2) where as our numbering system is Base 10 or 0-9 Example in base 10: We have the 1's place, 10's place, 100's place ect. (base 10 increments by ten each place you move) 1362 means <- we have 2 1's, 60 10's, 3 100's and 1 1000. Add it all up and you get 1362. Example in base 2: We have 1's place, 2's place, 4's place, 8's place, 16's place ect. (each place increments by 2) 101 0101 0010 means <- we have: 0 1's 1 2's 0 4's 0 8's 1 16's 0 32's 1 64's 0 128's 1 256's 0 512's 1 1024's So add up each of the places that had a 1 (2+16+64+256+1024 = 1362) In a nutshell that's binary vs decimal Binary is used for many things related to computers because it is, in it's simplest form a logical 2 choice state (on off, 0 1, true false etc.) Think of a light switch - you could use binary to control it because a 1 can mean "on" and a 0 can mean "off" Decimal numbers can not do this In terms of programming as others have said it is used to decipher which flags you have set and it is done very specific to the particular to the item you are referring to. Normally you are looking at something like: https://msdn.microsoft.com/en-us/library/windows/desktop/ms632612(v=vs.85).aspx There is a flags param with a type UINT (unsigned int) If you convert each of those Hex values to Binary you'll see that each one is unique 0000 0000 0000 0001 0000 0000 0000 0010 0000 0000 0000 0100 0000 0000 0000 1000 0000 0000 0001 0000 0000 0000 0010 0000 0000 0000 0100 0000 0000 0000 1000 0000 etc etc There is only ever a one bit enabled that designates each flag. So the Bitand does multiplication on the bits it is comparing and BitOR does a logical "or" meaning, if there is a 1 in either position the answer is 1, otherwise its a 0. Example bitAnd: Value we are looking at: 0000 1010 1110 0001 BitAnd Value: 1111 1111 0000 0001 *___________________ Multiply it together. 0000 1010 0000 0001 This is basically used to "mask" the original value only allowing certain flags to get through. So lets say a huge set of flags are coming through and you REALLY only care about 2 of them, you could mask all the rest and watch just the 2 bits you cared about, convert that to decimal and test for that number in your code. Example bitOR: value we are looking at: 0000 0000 0000 0000 BitOR Value: 0000 0000 1110 0011 ____________________ Or them all together 0000 0000 1110 0011 Looking at something like a control this would turn "on" certain aspects of it where there was a 1. Obviously this is hard to decipher, so the term "constants" come into play. They assign binary values to constants so us humans can more easily read what flags we are setting. Something like: GUICtrlCreateTreeView(0, 25, 175, 678, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_SHOWSELALWAYS),$WS_EX_CLIENTEDGE) would look a little hard to read if it just said: GUICtrlCreateTreeView(0, 25, 175, 678, 10110110101,1) <- fake flags set, but you get the idea of Constants vs. just using a Bin or Hex value here. Either way it will work fyi as long as it is getting binary or hex (whatever the item is calling for in that parameter) typically its a hex number, that the system then converts to binary internally. Long winded haha but maybe it will help? Professor_Bernd and SupaNewb 2 Link to comment Share on other sites More sharing options...
SadBunny Posted April 7, 2015 Share Posted April 7, 2015 (edited) Awesome Jake That was exactly the kind of answer that most people give to these questions because it's the best and most thorough one. The problem with it is that it requires not one but two types of math that few people ever touch, namely boolean algebra and number systems. Even many programmers only touch those subject (s)lightly. If you're just, kinda, an occasional developer, you may not want to delve into that and just kinda "know the BitAnd trick". That approach is seldomly used in explanations of this subject which is why I wrote some Ok, so here it is as concisely as I can put it: The BitAnd Trick, by SadBunny 1) Assign a distinct power of 2 to each flag. 2) Specify the flags that you want to turn ON by simply adding up the powers of two that correspond to them. This leads to a certain integer X. 3) To see if a certain flag Y is on, check whether BitAnd(X, Y) gives a non-zero value. Edited April 7, 2015 by SadBunny SupaNewb 1 Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
JakeJohnson74 Posted April 7, 2015 Share Posted April 7, 2015 Yeah I agree @SadBunny. I hate trying to respond to these haha It's hard to dodge the meanings and keep it simple. I took his example and tried to comment and detail it out step by step, as a second approach. I thought that maybe "Seeing" is better than reading. @Kor - Copy/Paste this and run it. Reading the comments after each console write. Maybe this will hit home? expandcollapse popup; Indicates write method options ;Showing hex Global Const $L_CONSOLE = 0x1 ; binary 0001 Global Const $L_FILE = 0x2 ; binary 0010 Global Const $L_EVENT = 0x4 ; binary 1000 ;bitORs are used to set something typically. $iFlag = bitOR($L_CONSOLE,$L_FILE,$L_EVENT) ;<--- flag set containing all bits (or constants) turned on ;Think of $iFlag being 0000 to start with, and we just Or'd in our values ;So $iflag = 0000 ;and bitOR = 1011 ; Result = 1011 ; converted to dec = 7 ConsoleWrite(">====================" & @LF) ConsoleWrite("- L_CONSOLE = "& $L_CONSOLE & " or in binary: 0001"& @LF) ConsoleWrite("- L_FILE = "& $L_FILE & " or in binary: 0010" & @LF) ConsoleWrite("- L_EVENT = "& $L_EVENT & " or in binary: 1000" & @LF) ConsoleWrite("- iFlag = "& $iFlag & " or in binary: 1011" & @LF) ConsoleWrite(">====================" & @LF) ;bitANDs are used to filter or mask an output typically. ;So now lets say I just wanted to see if the File flag is set and I dont care about the others. ;Well I look at the flag... Well its a 7, I cant use that to see if my File flag is set. ConsoleWrite(">====================" & @LF) ConsoleWrite("- iFlag = "& $iFlag & " or in binary: 1011" & @LF) ConsoleWrite(">====================" & @LF) ;Create a mask ;0000 would result in zero essentially not allowing anything through. ;If you wanted to test ONLY for the file flag regardless of what other data was coming through your mask would be $mask = $L_FILE ConsoleWrite(">====================" & @LF) ConsoleWrite("- iFlag anded with mask = "& BitAND($iFlag,$mask) & " or in binary: 0010" & @LF) ConsoleWrite(">====================" & @LF) ;The result is 2 or our L_FILE flag telling us that "yes", this setting is "on" ;Lets reset the mask to filter on L_FILE and L_CONSOLE $mask = BitOR($L_FILE,$L_CONSOLE) ;Run the same code As above. ConsoleWrite(">====================" & @LF) ConsoleWrite("- iFlag anded with mask = "& BitAND($iFlag,$mask) & " or in binary: 0011" & @LF) ConsoleWrite(">====================" & @LF) ;Telling us that L_FILE and L_CONSOLE are in "ON" Link to comment Share on other sites More sharing options...
SadBunny Posted April 7, 2015 Share Posted April 7, 2015 (edited) @SadBunny, thank you for the explanation. I don't understand it right now, but as I experiement more I'll keep coming back to your comment and hopefully it will click eventually. Sure, you're welcome. Note that if you really want to understand this, my explanation is not very complete/satisfying. As I said it cuts mathematical corners and requires you to just kinda take my word for a few things. Like the requirement to have every flag set to a distinct power of 2. (The whole thing falls apart if one of the flags is set to 3, for instance.) The powers of two are actually not important at all for how and why of these these bitwise functions, it's just a way to approach it without worrying about number systems. If you want to really understand what is going on, start by wrapping your head around what a number system actually means. My explanation will not help you do that, you'll need Jakes explanation, that wiki link and the plethora of information available on the internet about number systems Start by trying to really understand that any base-X representation of numbers is just a way to express quantities, and is usable to do the exact same math with the exact same results. The only reason we have 10 digits in one of the oldest and by far most commonly known numeric system (decimal) is that we have 10 fingers that we used to do calculations with (like a crude impromptu abacus) before we invented more structural math. There is nothing special about the decimal system. (Note: this is also definitive proof for the fact that numerology makes literally no sense at all.) ; write to console = 1, 3, 5, 7 This means that the function should 'write to console' IF the result of the BitAND(or BitOR???) would equal 1, 3, 5, or 7. so (console = 1), (console + file = 3), (console + eventlog = 5), (console + file + eventlog = 7) At least that's how I understand BitAND's to work? That understanding is wrong For these purposes, you will not need the actual number that the BitAnd function returns. The thing is, you need to perform one BitAnd call for every flag that you want to check, and you can only check one flag per BitAnd call. (See my earlier 3-step-guide.) If the result is non-zero, the flag was set, and if the result is zero, the flag was not set. Edited April 7, 2015 by SadBunny Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
kor Posted April 7, 2015 Author Share Posted April 7, 2015 If you're just, kinda, an occasional developer, you may not want to delve into that and just kinda "know the BitAnd trick". this exactly. I know OF the bitand trick, but not much ABOUT the bitand trick. I'll read these posts from you guys carefully tonight and see if I can get it. Link to comment Share on other sites More sharing options...
JakeJohnson74 Posted April 7, 2015 Share Posted April 7, 2015 Good Luck May the force be with you! In the simplest terms: BitOR's are like you standing in front of a wall of switches and turning some on and some off. BitAND's are like you standing in front of that same wall with all the switches covered up as if they don't exist, except the one(s) you want to see. I hope that didn't just push you further down the hole! haha Link to comment Share on other sites More sharing options...
jchd Posted April 7, 2015 Share Posted April 7, 2015 Why do you guys make that all black magic? There is zero link to number theory nor set theory here. Uneducated readers just have to follow posted link to Wikipedia which explains everything in understandable terms. Come on that's just plain basic stuff. Engage brain and just learn, try, correct, rince and repeat until the fog vanishes. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
SadBunny Posted April 7, 2015 Share Posted April 7, 2015 I do admit a few stiff drinks last night caused me to perhaps maybe slightly somewhat go off on a bunch of tangents yesterday night Changed my single mention of number theory to number systems, which was what I meant. Don't think set theory was mentioned anywhere. Also don't think it was presented as black magic or an advanced university-level subject or anything. If it came across as such it's probably because of my poor choice of words and/or contorted grammar. English not being my first language may have something to do with that. And yes, you certainly don't need a math degree (or a pointy hat and a cooking pot filled with Daedra hearts) to just understand what the bit operations do. To merely reproduce the trick to toggle multiple options through a single integer, all you need is the three simple steps I mentioned earlier and it requires no further understanding. Even actually reproducing the bit[and/or/xor] operations manually requires little more than the windows calculator and three simple instructions on what the three operators do. But familiarizing yourself with (basic) logic and developing a better feeling for number systems is actually really helpful for understanding this, and many other things, on a more basic level. Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
guinness Posted April 8, 2015 Share Posted April 8, 2015 I agree with jchd. When I asked something like this ages ago I got this response >> '?do=embed' frameborder='0' data-embedContent>>which was perfect. It seems times have changed and people have stopped putting in that extra effort to learn. PS I understood it too. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
JakeJohnson74 Posted April 8, 2015 Share Posted April 8, 2015 If you will notice, both posters here with +5000 posts have talked about extra effort and learning on your own. The problem with that is that people come here specifically TO learn from others. It's like the feeling of long time posters on these types of forums is "Use all the 'other' resources, but not us" To me? There is Google, YouTube, Stack overflow, Wikipedia, THIS forum, etc. They are all in my bag of resources and I use them all at different times and for one explicit reason - To find an answer to a question I have about something. Normally time is a factor with me, and if that means I can come here, ask a question, alt tab and go back to work and let someone else who knows the answer respond to my question and give me the answer? I am happy. Before the whole "I will not give you the fish, but I will teach you HOW to fish" comment shows its ugly head, let me just say that most people know full well, how to fish. It's just sometimes I don't have the time or feel like fishing - and the fact is, there are always people that will offer the answer for no other reason than to help another person in need. Am I trying to "enable" Kor by reinforcing the despicable habit of easily getting feedback on a question, rather than telling him to go RTFM which would reinforce the "fishing" mentality? Absolutely not. I would like to think that developers as a group are pretty intelligent people to begin with. Sometimes, just like myself, they don't feel like "fishing" and so I will gladly give them the "fish". Just as many people have given me the "fish" many times before. Keep in mind that if everyone found the answers to their own questions, this forum wouldn't even exist other than to chit chat about the weather Times have not changed, people have used and mixed both methods from the beginning of time. Insinuating that it is a black and white choice is little short sighted. Link to comment Share on other sites More sharing options...
SadBunny Posted April 8, 2015 Share Posted April 8, 2015 (edited) Times HAVE changed. I grew up in a time where you actually had to ride your bicycle to the library to look up something in a book, which you in turn had to look up using some sort of enormous rolodex. Where you had to actively and secretly search for your father's porn stash (which your and your friends' fathers invariably hid behind that stack of 33 1⁄3 rpm LP records in that dusty hallway shelf ) Where it was normal to type in 20 pages of BASIC code from a magazine into your TRS-80 to play an ascii-based hangman. Where you needed to fold open a big paper map to fumble your way over an unknown road. Etc.. Right now, you just clicketyclick everything into one of your magical machines and blammo, you get everything you ask for on your billions-of-colors multimonitor setup and store it on your SSD that easily reads or writes TWO BILLION bits of data per damn second. While watching free full-hd youtube on the other monitor. And still there are many people who think even that's too much work. Until that point I agree with guiness and jchd. Laziness and expecting something-for-nothing indeed runs rampant. BUT... Many things still take a lot reading and effort to puzzle out before you're able to reach your own goal. The power of the technology grows and evolves, but so do the possibilities to use it and the goals to reach with it, and so does the veritable ocean of information you have to wade through before you get the actual information 1. applicable to your question and 2. written in just that way that hits your spot. Some people are much more capable of that wading than others, and some more people get turned off by that and give up altogether. Weakness/laziness? Perhaps, often even, but it's also often just a question of getting lost in that ocean just because it looks or feels intimidating. Different things come easily to different people. In this case, you'll notice that Kor never asked for anyone to code anything for him, and he posted the code that he tried. He has obviously already tried to use information available elsewhere. Those are the only two things that everyone clamors for on this forum when someone misforms a question. He asked for information on a very specific piece of functionality, which to me looks suspiciously much like someone who IS actually willing to learn something. So, to facilitate that, both me and Jake did our best to come up with an explanation(s) we thought could actually help. I don't understand what's so wrong with that. Sorry for the long story again. I should really go to bed. Have a nice day all Edited April 8, 2015 by SadBunny pixelsearch, JakeJohnson74 and SupaNewb 3 Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
JakeJohnson74 Posted April 8, 2015 Share Posted April 8, 2015 Well Spoken SadBunny. Has anyone seen Kor? haha wonder how he made out last night Link to comment Share on other sites More sharing options...
guinness Posted April 8, 2015 Share Posted April 8, 2015 If you will notice, both posters here with +5000 posts have talked about extra effort and learning on your own.5 years ago I only had less than 100 posts, so when I asked I was still in the learning stages. I actually learnt AutoIt by coding in a real project called DropIt, whereby I implemented features the developer had on the "todo" list. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
nitekram Posted April 9, 2015 Share Posted April 9, 2015 Everyone learns differently... 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator 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