Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/14/2014 in all areas

  1. Melba23

    If $var check

    AutID, Remember that AutoIt does not "type" its variables. Thus the following are considered "True": True "Any string" Any number other then integer 0 while these are considered False: False "" ; An empty string 0 ; Integer 0 So the simple comparison "If $var Then" is perfectly valid syntax and will work without problem. M23
    2 points
  2. 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
  3. JLogan3o13

    FileCreateShortcut

    Look at the FileCreateShortcut line. Compare to what you wrote.
    1 point
  4. tanahara

    Help with If/Then

    If $first7char = $CF53AU Or $first7char = $CF53AS Then _CF53AU_AS() ElseIf $first7char = $CF53SU Then _CF53SU() endif The second comparison in the or has nothing to compare $CF53AS against. Correct me if im wrong autoit gurus. I always fully qualify my second condition. Try that. Edit: By seconds lol Gj BreManNH
    1 point
  5. Imagesearch uses external dll
    1 point
  6. Melba23

    An easy one

    kudrow, Dog eaten your Help file? Opt("GUICloseOnESC", 0) M23
    1 point
  7. ;\Q your text \E \Qte.st\E
    1 point
  8. Do you realize the distance that light travelled since the last post in this thread? You're lost somewhere between Luhman 16 and Wolf 359.
    1 point
  9. You can Use WinGeTtitle. If is Select Setup Lenguage Do something. Saludos
    1 point
  10. Me = 1 vs MVPs/Mod = 0, this time and maybe only this time i have the ANSWER Yeah is not a competition but it is a satisfaction ;~ ;johnmcloud - 2014 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> ;~ Global Const $tagSTARTUPINFO = "int Size;ptr Reserved1;ptr Desktop;ptr Title;int X;int Y;int XSize;int YSize;int XCountChars;" & _ ;~ "int YCountChars;int FillAttribute;int Flags;short ShowWindow;short Reserved2;ptr Reserved3;int StdInput;" & _ ;~ "int StdOutput;int StdError" Global $sState = @SW_SHOW Global $sShortcut = _RunFromShortcut() If IsArray($sShortcut) Then If $sShortcut[6] = 3 Then $sState = @SW_SHOWMAXIMIZED If $sShortcut[6] = 7 Then $sState = @SW_SHOWMINIMIZED EndIf $hGUI = GUICreate("Johnmcloud knows best", 265, 250, -1, -1, $WS_MAXIMIZEBOX) _WinAPI_ShowWindow($hGUI, $sState) ;@SW_SHOWMAXIMIZED with GUISetState not work While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _RunFromShortcut() Local $tSI = DllStructCreate($tagSTARTUPINFO) DllCall('kernel32.dll', 'none', 'GetStartupInfoW', 'struct*', $tSI) If @error Then Return SetError(@error, @extended, 0) Local $vFlag = DllStructGetData($tSI, 'Flags') If BitAND($vFlag, 0x800) Then Local $sTitle = DllStructCreate('wchar ShortcutPath[261]', DllStructGetData($tSI, 'Title')) Local $sShortcutPath = DllStructGetData($sTitle, 'ShortcutPath') If $sShortcutPath Then Return FileGetShortcut($sShortcutPath) Else Return SetError(1, 0, 0) EndIf Else Return SetError(2, 0, 0) EndIf EndFunc ;==>_Shortcut
    1 point
  11. Your English is fine... Welcome to the Forum ! an alternative would be to send TAB to move down and then Spacebar to fill in the checks. Bill
    1 point
×
×
  • Create New...