Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/11/2013 in all areas

  1. RESTRICT EDIT UDF Restrict the text that can be entered in an editbox through a String Regular Expression. The UDF works be subclassing the control. >Here is a similar UDF based on Windows Message. Functions The UDF is pretty simple and could be modified with ease. User can set their SRE pattern to block the text entered in the editbox Tooltips can be used in case of an error. The title of the Tooltip is Error_2 where the number(2) signifies the pattern that caused the error. The script is made to use function pointer variables rather than direct patterns, to make it more flexible and broader. Supports +ve and -ve SRE pattern matches. See example for better understanding. Note : The Pattern should be made such that every phase of typing is met, Example, if the user wants The second letter should be always a digit. Then he should make sure that the pattern is also satisfied when user enters the first character, as through the process of typing. Index ; #INDEX# ======================================================================================================================= ; Title .........: RestrictEdit ; Version........: 1.0 ; AutoIt Version : 3.3.8.0++ ; Language ......: English ; Author(s)......: Phoenix XL ; Librarie(s)....: WinAPI, Array and GUIEdit ; Description ...: Functions for restricting the text typed in an Edit control through SRE. ; The edit control is subclassed and the original processing is blocked when pattern isn't satisfied. ; =============================================================================================================================== ; #CURRENT# ===================================================================================================================== ;_Restrict_Edit ; =============================================================================================================================== ; #INTERNAL_USE_ONLY# =========================================================================================================== ; HideToolTip_Edit ;_NewWnd_Proc_ ;_SubClass_ ; =============================================================================================================================== ChangeLog v1.0 - First Release v2.0 - Replaced the SRE pattern parameter(2nd parameter) with function pointer parameter[A script Breaking change]. Added support for positive and negative pattern matches Download v2.0 RestrictEdit(UDF).7z Previous downloads : 161
    1 point
  2. JLogan3o13

    app apdate

    My only need for something like this is getting a file that is very small, so it may not work in all instances. This is what I do: inetget, renaming file xyz.txt to xyz<date>.txt. get the file size once it had downloaded and compare to xyz.txt. If it is the same, discard xyz<date>.txt, otherwise, move xyz<date>.txt to xyz.txt, overwriting previous version.
    1 point
  3. Keniger, How about this: #include <GUIConstantsEx.au3> #include <EditConstants.au3> $hGUI = GUICreate("Test", 500, 500) GUISetBkColor(0) GUICtrlSetDefColor(0xFFFFFF) GUISetFont(12, Default, Default, "Consolas") GUICtrlCreateLabel("Username", 10, 10, 240, 20) $cInput_UN = GUICtrlCreateInput("", 10, 40, 240, 30) GUICtrlSetFont(-1, 12, 600) GUICtrlSetBkColor(-1, 0x606060) GUICtrlCreateLabel("Password", 10, 80, 240, 20) $cInput_PW = GUICtrlCreateInput("", 10, 110, 240, 30, BitOR($ES_PASSWORD, $GUI_SS_DEFAULT_INPUT )) GUICtrlSetFont(-1, 12, 600) GUICtrlSetBkColor(-1, 0x606060) GUICtrlCreateLabel("", 10, 150, 60, 30) GUICtrlSetBkColor(-1, 0x808080) $cLogIn = GUICtrlCreateButton("LogIn", 11, 151, 58, 28) GUICtrlSetBkColor(-1, 0) GUICtrlCreateLabel("", 80, 150, 170, 30) GUICtrlSetBkColor(-1, 0x808080) $cReset = GUICtrlCreateButton("Hardware ID Reset", 81, 151, 168, 28) GUICtrlSetBkColor(-1, 0) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Any good? M23
    1 point
  4. According to the help file: "When you assign an Object variable a different value, the 'pointer' will automatically be released. You can, for instance, force deletion of an Object by assigning it any number or any text value."
    1 point
  5. jchd

    Learning Haskell

    Yes, in MMa, N[<expr>, x] internally works its way thru <expr> to give you at least x decimal digits accuracy. In fact there is a whole set of precision and accuracy parameters than you can tweak to achieve the desired goal with confidence. It's no big surprise that a monster like Mathematica has unmatched features to deal with overly complex or uncommon precision-hungry expressions, at least compared to a generic language where these complexities are not the main features nor the expected highlights. Nonetheless Haskell still has a pretty good arbitrary precision library for what it is and for the tasks you can expect it will do well. A top-notch CAS (computer algebra system) is required to embark an unbelievable set of both low-level and high level functions, optimizations and dedicated features that general-purpose software can't afford to mimic. Have a look for example at the incredible Wolfram Demonstration Project to see that Mma includes not only pure math abilities but also offers high-end graphics, sounds, databases support, distributed computation, ... My personal opinion about the Mathematica language itself is that even if it lacks some features Haskell has built-in (e.g. laziness + filters) it is more versatile and consistent from the ground up: everything being a list makes functional programming more systematic. There are no FP operators acting on tuples of integers only or such. Head and tail of an empty list are indeed emty lists and don't generate exceptions. Some web pages are doing a side by side comparison Mma vs Haskell and decide that Mma is slower on this and that algorithm. It's trivial that an interpreted language can hardly compete in speed with a compiled language. OTOH you can still emit C code with a paid version of Mma for any notebook, then speed is fairly comparable if not faster. Mma also has built-in support for massive GPU computations (both OpenCL and CUDA) which few languages have out of the box. Finally you can still use the power of MathLink to use the computing power of a remote supercomputer (or clusters of such) and have the result in almost real-time in your Mma notebook. I love unique features like up-values and down-values of functions, efficient sparse matrix operations, rules and patterns, built-in debugging and so much more. Mathematica offers all the programming paradigms I can dream of, which I can freely intermix when I need to. I told you I was a big fan!
    1 point
  6. BrewManNH

    TCPNameToIP

    @IPAddress# will return the LAN IP address of the computer, you need the external IP address which can be gotten using _GetIP which is a function that guiness wrote and a link can be found in his signature. Then you need to forward the port, that the server is using, to the correct computer in your router set up.
    1 point
  7. Melba23

    New MVPs

    In case anyone had not noticed, I am happy to announce that we have three new MVPs: PhoenixXL, FireFox and kylomas. I am sure you will all join in with my hearty congratulations to them all. M23
    1 point
  8. My Netbook had a little conniption, and so I missed what water said, but what he said too. A personal note here may also help you. A few things have helped me with my AutoIt learning. (1) Having something I needed/wanted as a goal ..... that is particularly helpful. (2) Following information in the Help file reference links. (3) Regularly checking anything in the Examples section of the forum, that took my interest ... usually downloading code and comments for a rainy day ... of which there has been many. I've learnt much of what I know, from other people's scripts and careful experimentation. (4) Not being afraid to challenge myself or ask what might seem like stupid questions. We all have dumb days and we were all newbies once. (5) Be thorough with searching the Help file, and then the Forum, before asking for help. You gain an immeasurable amount by doing that. (6) Making mistakes, but never (or rarely) giving up. Usually when I give up, it's only until I'm in a better position to deal with the difficulty or I realize there is a better way. I don't like conquering things just for the sake of it, unless I can see a real benefit for the time spent.
    1 point
  9. Great to hear of you interest, and I'm sure you will find many in this community to help you, and the experience you bring may help us too. The Help file for AutoIt and this Forum are it's greatest resources, outside of individual talented members. Like anything you learn, it's an as you go learning process. You will find plenty of info about Window's and their titles, classes, instances and how to get and apply handles, both here and in the Help file. What you want to get out of AutoIt, ultimately depends on your end goal, but my advice is jump in and get dirty and then follow your instincts from there. As you seem to already know some basics, you really need to either do some of the harder tutorials available or determine a project that will give you a learning curve. If you are really serious about becoming a programmer though, you will need to do some reading from other general sources outside of AutoIt, to understand better the concepts involved. In the end, this could take you away from AutoIt. Is that what you want or do you just want to become better with AutoIt? All knowledge can be helpful anyway.
    1 point
  10. Welcome to AutoIt and the forum! As you already have basic AutoIt knowledge I think the next step is to automate your applications. To check for a running application you can either use function "ProcessExist" to check if e.g. "application.exe" exists. Or if the application has a COM interface (like Word, Excel etc.) you could try ObjGet. The next step on the learning curve is: Start coding. If you are unsure how to or run into errors, ask. We will be happy to assist.
    1 point
  11. 1 point
×
×
  • Create New...