Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/02/2017 in all areas

  1. So I think it's time to publish this little tutorial I have made on using DllCall() and DllStructs. It's not near completion but I think it's a good start at least This tutorial is mostly aimed for people who have never used DllCall() before or have very limited knowledge about it. In the future I will update it with more advanced topics so more advanced users can make use of it too. Well here goes. Dealing_with_Dll.pdf Previous downloads: 31 Suggestions, language corrections and errors in the tutorial is of course welcome.
    1 point
  2. Yeah, don't do that unless you like to be tortured. My general advice is, acquire a large toolkit, and use the best one for each part of a job. Don't use a hammer when you really need tweezers. Building a professional-looking GUI is kid's play in AutoIt, with intuitive function names and tons of examples (plus a helpful forum). And GUIs are by nature user-interactive, so they spend most of their time idling, waiting for a user to press a button, make a selection, flip a switch, or finally make up their minds what they actually want. You don't need lightning speed for that, and the price you pay in maintaining a complex multi-include C++ code, tracking memory leaks, figuring out unhelpful, sometimes downright wrong error messages, or just trying to recreate the conditions of a HeisenBug is just not worth it (in my opinion). Which is not to say that valid cases don't exist where using C++ (or assembly, or something else maybe) is absolutely the way to go. But don't expect to run into those in your first few years of coding. When you start out, you'd gain more from understanding good coding practice (where to declare which variables, how and when to loop, how to apply conditionals, how to use arrays, how to break up large tasks most efficiently into smaller UDFs that rely on each other, how and when to use recursion), which is going to help you in most other programming languages as well, than wasting time struggling to get a C++ GUI to do what you want it to do, and which would have been a breeze to set up in AutoIt. AutoIt is a much better sandbox environment than C++ to figure these things out. As a kid, I originally started at the other end (assembly, even closer to the metal than C++), but that was like the joke of asking directions in Ireland and being told: "Well, you really don't want to start from here." And I'd be very surprised if you come up with a scenario for a GUI that AutoIt cannot handle (or approximate satisfactorily), and that would be more easily achieved in C++.
    1 point
  3. Jos

    AdlibRegister including Sleep

    Yes, that is how I learned this language back in 2004 (i think), but have been programming since 1978 in various languages of which one is Basic, which is somewhat similar to AutoIt3. To me learning any language is initially investing in learning the words (Functions etc) and grammar (Syntax) and then putting them together into sentences (Scripts). I do realize it isn't always easy for everybody to have the discipline and patience, but to me it's the only way to properly learn. As to your last post (to make a link to the first part of this PM): did you try to goggle it? One of the first hits I got was this one. It is in general fair to assume you aren't the first one asking the questions and likely somebody already shared the answer somewhere on the internet so always try and search for the answer yourself. Jos
    1 point
  4. Somehow doubt that ... and there is no issue to ask questions. F1 /Search Read Think Try Goto 1 Jos
    1 point
  5. Can't you simply start a progressbar and update the with each loop and use a single loop? Something like this: (Untested) Func _Load() ; Display a progress bar window. ProgressOn("Loading Progress", "getting data", "0%") ; Set the "subtext" and "maintext" of the progress bar window. $readsectionnames = _IniReadSectionNamesEx("file.txt") GUICtrlSetData($Labelofloading, "1 %") For $i = 1 To $readsectionnames[0] ProgressSet($i*100/$readsectionnames[0], $i & "%") _GUICtrlListView_AddItem($ListView1, $readsectionnames[$i]) Sleep(100) GUICtrlSetData($Labelofloading, $i & " %") $Case = IniRead("file.txt", $readsectionnames[$i], "Case", "") _GUICtrlListView_AddSubItem($ListView1, $i, $Case, 1, 1) Sleep(100) GUICtrlSetData($Labelofloading, $i & " %") $Code = IniRead("file.txt", $readsectionnames[$i], "Code", "") _GUICtrlListView_AddSubItem($ListView1, $i, $Code, 2, 2) Sleep(100) GUICtrlSetData($Labelofloading, $i & " %") $Dateofbuying = IniRead("file.txt", $readsectionnames[$i], "Date of buying", "") _GUICtrlListView_AddSubItem($ListView1, $i, $Dateofbuying, 3, 3) Next ProgressOff() ;;etc EndFunc ;==>_Load
    1 point
  6. Updated: I have simplified the user's options/flags using BitAND rather than arithmetically processing them to whittle them down. I have tested it and it appears to be working well. Maybe it will slightly increase the speed at which it operates but it has certainly dropped the line count.
    1 point
  7. try to use this concept: Func _RTF_to_CLIPBOARD($sRTF_FileFullPath) _GUICtrlRichEdit_Create(... _GUICtrlRichEdit_StreamFromFile(... _GUICtrlRichEdit_SetSel(... _GUICtrlRichEdit_Copy(... _GUICtrlRichEdit_Destroy(... EndFunc
    1 point
×
×
  • Create New...