Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/29/2014 in all areas

  1. chrispetersinc, Nice first post. Necroing a 5 year old thread to comment on the tone of one of the posts - prepare yourself to be even more shocked by some of the other posts from that period, particularly from one individual. Anyway, this is the internet - either live with it or stay off-line. M23
    2 points
  2. Yes ... absolutely Why do it simple when it can be complicated ? $txt = _ "TEST1 2013-02-08 some text" & @crlf & _ "TEST1 2013-2-08 some text" & @crlf & _ "TEST1 2013-01-15 some text" & @crlf & _ "TEST2 2013-01-15 some text" & @crlf & _ "TEST2 2013-01-03 some text" & @crlf & _ "TEST3 2013-1-17 some text" & @crlf & _ "TEST4 2013-1-18 some text" & @crlf & _ "TEST4 2013-1-19 some text" & @crlf & _ "TEST5 2013-1-21 some text" $txt = StringRegExpReplace($txt, '((?<=\v)(\S+).+\R(?!\2))', '$1' & @crlf ) Msgbox(0,"", $txt) Melba, read and agreed
    1 point
  3. I took out "playing = true" and it starts automatically now. Thanks.
    1 point
  4. jaberwacky, Don't let pointer-to-pointer recursion dissuade you from learning a language. Pointers more than one level deep are just all-around messy and require a bit more care and thought from the programmer in trying to keep things straight and bug-free - both in their code and in their head! The trend with modern C++ is to avoid pointers completely because of the inherent dangers and possible false assumptions associated with them. If you use arrays in C++ now, you prefer to use std::array for arrays of predetermined size, std::vector for dynamic arrays, and Start/End Iterators (or possibly array_ref) for observing an array with a size determined during runtime. Still, the one problem every high-level language runs into with interfacing with the O/S, external APIs, and module files (DLLs in Windows) is that there is no easy way to interface with external code without a 'flattening' of the language code to at least C-level style pointers and functions. That's one of the reasons why you will see tons of wrapper classes for interfacing with external APIs - to maintain an abstraction and hide the ugly details of implementation. But hmm, back to the point..ers. When someone refers to a 'char *' as an array of characters (or a string), thats not entirely true. Nor is it true that 'char **' is always an array of string pointers. These are all assumptions that are made when looking at something in isolation. It's only when there is a given context that something more can be made of them. What I mean by this is that, given 'char *' in isolation, the only reasonable assumption you can make is that the variable contains a pointer to a character. One typically assumes that more characters follow, but this is not possible to determine from just a variable declaration. Likewise, 'char **' is a pointer to a pointer to a character, and so on. Each '*' is just one more level of indirection via a pointer. Without more information as to the context with which that occurs, and whether each level of indirection has more than one pointer (or character) in a row, one can only assume the pointer-to-pointer-to-etc relationship. So, given something like this: char *** CharDeepPtr; We know that: CharDeepPtr itself is a pointer. *CharDeepPtr (one level down) is ALSO a pointer **CharDeepPtr (2 down) is another pointer ***CharDeepPtr is a character. When people say that 'char ***' is an array of pointers to string pointers, they are making the assumption that: at EACH level prior to the 'bottom', there is more than one pointer in a row (array) at the bottom level, there are more than one character in a row, and together they form a string (also an array) Assumptions and facts aside though, what I'm trying to get across is that each extra asterisk represents one more pointer in between the variable and the data type declared on the left-hand side. Each pointer has its own declarative type certainly, but underneath it all it still is just a pointer. Want it to get even more messy and hard-to-decipher? Sprinkle some 'const' modifiers in, hah const char * const * const * const p = 0; // const pointer to const ptr to const ptr to const char! Luckily, the ambiguity of pointer-to-pointer variables and whether each level is an array (or just one element) is something you won't usually come across. Most modern code will strive to make things much more readable and understandable by using modern features, or at least some level of abstraction. You can usually get at least 2 levels of indirection (more is atypical) in C++ without it getting confusing and looking plain ugly, but there are still a few issues with the language.. Modern C++11 definition for a 2D array: std::array<std::array<int, 2>, 3> arr = {{{5, 8}, {8, 3}, {5, 3}}}; vs. old-style: int myArr[3][2] = {{5, 8}, {8, 3}, {5, 3}}; Still, on a whole, modern C++ is generally much more understandable and safe. Not as nice as D perhaps, but much better than C and C++98 code styles..
    1 point
  5. SlowCoder74, As explained in this thread you need to use my StringSize UDF and some maths. Please ask if you get stuck implementing the solution I suggested. M23 P.S. And I never did find a solution to the problem discussed at the end of that thread.
    1 point
  6. mLipok, When I first started learning about SREs, GEOSoft gave me the best piece of advice I ever got concerning them - "learn when not to use them". I now pass the same advice on to you (and anyone else reading). M23
    1 point
  7. mLipok

    Automating via AutoIt

    You can try out these functions: WinExists(... _IEPropertyGet(... _IECreate(... _IEAttach(... _IENavigate(...
    1 point
  8. Hi, Kovacic. Please give your posts a full 24 hours before you update or bump. Those of us who volunteer on the forum are all over the world in different time zones; sometimes it takes a while for us to read through and answer all the questions
    1 point
  9. Bert

    PixelGetColor problem

    Sorry about my robust response. I was a bit carried away there. The question remains however - what is the name of the application you wish to monitor?
    1 point
  10. AutoIt SysInfo Clock is a small tool in widget style to show the clock, current CPU usage, CPU speed, memory usage and network activity (tcp, ip and udp). Additionally you can use it as an alarm clock. To stop alarm clock tone press the left LED (mail) or wait 60 seconds. The current CPU usage code is beta and might be not working for some CPUs! Main window: Move mouse to area below seconds and press rmb to select different color scheme. Alarm Clock window: Tray menu: Credits: see scroller (select About). Special thanks to trancexx for helping me to read out current CPU speed using the WinAPI stuff, AndyG for troubleshooting performance counter issue, czardas for composing "Für Elise" and Ascend4nt for the support! Download source code + compiled version: Click Me (previous downloads: 1386) (Please don't use any download manager!) Compiled version only: MediaFire.com or 4Shared.com Coded on Win7 x64 using Aero / Win8.1 x64 and AutoIt v3.3.12.0. Br, UEZ This project is discontinued! Change log: v0.9.5.0 build 2013-06-14: initial release v0.9.6.0 build 2013-06-15: added _WinAPI_CreateRoundRectRgn() to fix transparency issue on non Aero desktops, small internal modifications and added check for whether performance counters are enabled v0.9.6.5 build 2013-06-15: fixed a bug when "Reset Windows Position" was selected twice and color of scroller will fit to clock color schema v0.9.8.0 build 2013-06-20: added little music to About part -> many thanks to czardas for mus++ and arranging "Für Elise", added date to clock, replaced CPU usage code -> thanks Ascend4nt v0.9.9.0 build 2013-06-21: added 2 more color schemas (mint and purple), added network traffic LED, compiled exe now included in archive v0.9.9.0 build 2013-06-22: forgot to increase a variable in ini section v0.9.9.0 build 2013-06-24: found also missing modification in context menue after adding two more color schemas v0.9.9.0 build 2013-06-26: Ops, forgot to change also radio item proper check in clock color schema sub menu v0.9.9.1 build 2013-06-27: added option to select whether SysInfo Clock should start at windows startup v0.9.9.2 build 2013-07-01: added yellow-red mark to the small info indicators and additional info when hovering about the small indicators, small internal changes v0.9.9.5 build 2013-07-05: added features: singleton, update check, visit web site, bring GUI to front and fixed some smaller bugs + some internal changes v0.9.9.6 build 2013-07-11: added alarm clock feature v0.9.9.7 build 2014-06-23: adapted code to run on AutoIt version 3.3.12.0 v0.9.9.7 build 2014-08-27: some internal "cosmetic" changes -> this project is discontinued!
    1 point
  11. No need to get pissy little one. You'll find yourself quite short lived here. You proved a point though, rather than wasting the forums time, if you took your own time and did a bit of research, you would have found what you wanted.
    1 point
×
×
  • Create New...