All Activity

This stream auto-updates   

  1. Past hour
  2. @Yorgo: You are confusing a library (.lib) with a dll. If the ftdi library is linked with a compiled object (say, in C# or C++), then the version struct is returned directly. However, from AutoIt you need to call the D2XX dll, as detailed here (Google is your friend):'s_Guide(FT_000071).pdf and when calling that dll (function FT_GetLibraryVersion I think), you need to supply a pointer (LPDWORD) to your own struct, which the dll call can then fill with the version data. @Danyfirex is totally correct.
  3. Yes, that's the thing - i have noticed that the script is paused until i close the popup. Why does it wait? Here is my code snippet. You can see i tried many things to get the handle or the control. IF $oDiv.innerHTML = "Add Files..." Then ;~ ConsoleWrite("Test:"&$ ;~ ConsoleWrite("Test:"&$oDiv.title&@CRLF) _IEAction($oDiv,"click") Sleep(1000) ;~ ControlSetText("Choose File to Upload", "", "","C:\test.txt") ;~ $hWnd = WinWait("[CLASS:Edit; INSTANCE:1]" ,"",1) $hWnd = WinGetHandle("#32770") MsgBox(0, @error, $hWnd) ;~ ControlSend($hWnd, "", "", "This is some text") ;~ ControlClick("[CLASS:Button; INSTANCE:1]","", "") EndIf
  4. It would be helpful if you showed up the script so that we can see what you are trying to do. Chances are that the script is paused waiting for the dialog to disappear.
  5. And again a brand new update for the ISN Autoit Studio is out now! (Version 1.07) Many improvements in speed are made in this release! (Especial for big scripts) So happy testing! Changelog (by Google translator) -> ISN AutoIt Studio: <- ----------------------------------- [Fixes] - Various bugfixes - Indenting a lot of text with tabulator now works much faster. (And will not crash the ISN anymore) - The function "Repeat" or "Undo" in the Script Editor reacts faster with a lot of text. (And will not crash the ISN anymore) - When marking blank lines in the Script Editor, the ISN AutoIt Studio freezes for a few seconds. This is now fixed. - Fixed a bug that caused autocomplete not to work properly in some Scintilla controls (code deposit, code snippet). Bug with MustDeclareVars and the DBUG Tool fixed. - Fixed input problems after CTRL + G. - fixed bug with the scaling of the start logo and the small debug window [Improvements] - Speed with larger files has been greatly improved. (Also when copying / pasting text into the script editor) - The function "Mark last modified function in script tree" has been extended: Now an immediate marking can be selected. So as soon as the Coursor is placed in a function, the function is marked in the script tree. - revised the "Script Tree Settings" section in the program settings - All Scintilla controls (debug console, code deposit, code snippet etc.) now have a consistent context menu in the style of the "main editor" - Many hotkeys for the script editor (lines, bookmark, duplicate, etc.) now also work for other Scintilla Controls in ISN AutoIt Studio - The script tree of ISN AutoIt Studio now runs in its own thread. Thus, the script tree has now no more speed influence on the ISN AutoIt Studio! As a result, the generation of the script tree is now a bit faster. (Results are cached, for example, to be loaded faster when changing tabs) - The scroll position of the script editor is restored when the tab is changed! Added loading animation in the script tree - Autocomplete for variables and functions in the project runs much faster and no longer blocks the ISN AutoIt Studio. The internal list is now updated each time the script tree is updated. (So the "Save" command is executed) - Updated French translation (thx to Swirti) - Updated Russian translation (thx to 74LS00) - The list of "Recently opened items" (in the Welcome window) now automatically sorts items that are no longer available. Thus, no "holes" more in the list. - The project management can now be opened at any time. An open project does not have to be closed anymore. [New Features] - Autocomplete can now only be displayed from the second character on for UDF functions. To be found in the program settings under "Script Editor". - The filter for the script tree now supports wildcards (eg _test *). - A hotkey can now be assigned for the "Create temporary AutoIt script" function. - Added "Select All" function in the context menu of the Script Editor - The ISN AutoIt Studio now supports multiple paths for projects. In addition to the "main path", you can now specify additional folders that are searched for ISN projects. (See program settings -> program paths) - In project management, all projects from additional project paths are now displayed and grouped by folder. (For grouping Win Vista or higher is necessary) - In project management, projects can now simply be moved from one project folder to the other via drag and drop. -> ISN Form Studio 2: <- ----------------------------------- [Fixes] - Various bugfixes - Changing the tab pages in the Control Editor and GUI properties is now faster. (thx to lyogadi) [New Features] - In the GUI properties, the GUI code can now be packed into a function on request. (With the GUI handle as the return value) -> Plugin SDK: <- ----------------------------------- [Fixes] - Fixed a bug in the function "_ISNPlugin_ArrayStringToArray" that could cause the plugin to crash. - Bug fixed in the function "_ISNPlugin_Wait_for_Message_from_ISN_AutoIt_Studio".
  6. ;~ 1.SamanthaRichardson - Find this pattern ie twoCaps in single word ;~ Insert space before second Capital letter. $sIutputstring = "SamanthaRichardson" $sOutputstring = StringRegExpReplace($sIutputstring, "\w\K(?=[[:upper:]])", " ") ConsoleWrite($sIutputstring & " => " & $sOutputstring & @CRLF) ;~ 2.dson407 - word continued by numbers without space ;~ Insert space before Number $sIutputstring = "dson407" $sOutputstring = StringRegExpReplace($sIutputstring, "[A-Za-z]\K(?=\d)", " ") ConsoleWrite($sIutputstring & " => " & $sOutputstring & @CRLF) ;~ 3.cer"S - No space before doubleQuote ;~ Insert space before doubleQuote $sIutputstring = "cer""S" $sOutputstring = StringRegExpReplace($sIutputstring, "[A-Za-z]\K(?="")", " ") ConsoleWrite($sIutputstring & " => " & $sOutputstring & @CRLF) ;~ 4.ple.comBu - letters after .com ;~ Insert space after .com $sIutputstring = "ple.comBu" $sOutputstring = StringRegExpReplace($sIutputstring, "[A-Za-z]\K(?=\.com)", " ") ConsoleWrite($sIutputstring & " => " & $sOutputstring & @CRLF)
  7. Hi Guys, i am trying to automate a site where you click a button and a window open and ask you to select a file for upload. That part works fine, but after that i cant get Autoit to select a file for the upload. I am trying to use the "ControlSend" and similar functions, but i cant get it to work. Nothing happens. Here is the screenshot from the info tool: What am i missing ? It should be an easy thing to do...
  8. Try this: ; read file with FileReadToArray Local $s = [ _ '659855424638 Michelle Heidt 978-240-0653 214-585-8297 Maxillofacial radiologist "Michelle Heidt, 2095 Pearlman Avenue, Franklin, Massachusetts, United States, 2038"', _ '659855424639 Emilee Akins 904-724-3260 502-463-3665 Forest and conservation worker "Emilee Akins, 2054 Boundary Street, Jacksonville, Florida, United States, 32211"', _ '659855424640 Lori Girouard 512-963-1160 413-772-3313 Agricultural and food science technician "Lori Girouard, 4603 Short Street, Austin, Texas, United States, 78741"', _ '659855424628 SamanthaRichardson407-856-8677 973-447-6977 samanthatrichardson@example.comBudget officer "Samantha Richardson, 4599 McDonald Avenue, McDonald, McDonald, United States, 12345"', _ '659855424628 Samantha Richardson 407-856-8677 973-447-6977 Budget officer "Samantha Richardson, 4599 McDonald Avenue, McDonald, McDonald, United States, 12345"' _ ] Local $a For $i = 0 To UBound($s) - 1 $a = StringRegExp($s[$i], '(\d+\s[A-Z][a-z]+)\s?([A-Z][a-z]+)\s?([\d -]+[^@]+@[-a-z_]+\.[-a-z_]+(?:\.[-a-z_]+)?)\s?([A-Z][^"]+[a-z])\s?(".*)', 3) ConsoleWrite(@error & ' ' & @extended & @LF) $s[$i] = _ArrayToString($a, ' ') ConsoleWrite($s[$i] & @LF) Next ; delete input file and write with FileWriteFromArray (be sure you have a safe copy of input first! Exit
  9. Local $sIutputstring = "MichaelJackson" Local $sOutputstring = StringRegExpReplace($sIutputstring, "\w\K(?=[[:upper:]])", " ") ConsoleWrite($sOutputstring) \w Matches any "word" character: any digit, any letter or underscore "_" \K Resets start of match at the current point in subject string (the character before the mathing upper letter won't be part of the replacement) (?=X) Positive look-ahead: matches when the subpattern X matches starting at the current position. [:upper:] ASCII uppercase letters (same as [A-Z]).
  10. this is in your include directory
  11. Today
  12. I will try now. Thank you for the reply. Finding this one difficult , as locating the position of the second Capital seems challenging. Can you please help. (Two Upper in single Word) $inputString = "MichaelJackson" $outputSting = "Michael Jackson" I will use the answer for this , and try on the rest patterns. Trying with this , "([A-Z])\w+([A-Z])\w+") but getting confused with the positioning.
  13. @DavidLago : can you try with this one ? Func _AddPrinterConnection($sPrinterName) Local $aRet = DllCall("Winspool.drv", "bool", "AddPrinterConnectionW", "wstr", $sPrinterName) If @error Or Not $aRet[0] Then Return SetError(1, 0, 0) Return 1 EndFunc ; ===> _AddPrinterConnection
  14. Where can i get IE.au3?
  15. That does the trick! Since I don't know if there are any side effects I am using this alternative only if WIN7+AeroOFF. Func _ScreenCapture_Capture2($sFileName = "", $iLeft = 0, $iTop = 0, $iRight = -1, $iBottom = -1, $bCursor = True) Local $bRet = False If $iRight = -1 Then $iRight = _WinAPI_GetSystemMetrics($__SCREENCAPTURECONSTANT_SM_CXSCREEN) - 1 If $iBottom = -1 Then $iBottom = _WinAPI_GetSystemMetrics($__SCREENCAPTURECONSTANT_SM_CYSCREEN) - 1 If $iRight < $iLeft Then Return SetError(-1, 0, $bRet) If $iBottom < $iTop Then Return SetError(-2, 0, $bRet) Local $iW = ($iRight - $iLeft) + 1 Local $iH = ($iBottom - $iTop) + 1 Local $hWnd = _WinAPI_GetDesktopWindow() Local $hDDC = _WinAPI_GetDC($hWnd) Local $hCDC = _WinAPI_CreateCompatibleDC($hDDC) Local $hBMP = _WinAPI_CreateCompatibleBitmap($hDDC, $iW, $iH) _WinAPI_SelectObject($hCDC, $hBMP) ;~ _WinAPI_BitBlt($hCDC, 0, 0, $iW, $iH, $hDDC, $iLeft, $iTop, $__SCREENCAPTURECONSTANT_SRCCOPY) _WinAPI_BitBlt($hCDC, 0, 0, $iW, $iH, $hDDC, $iLeft, $iTop, BitOR($__SCREENCAPTURECONSTANT_SRCCOPY, $CAPTUREBLT)) If $bCursor Then Local $aCursor = _WinAPI_GetCursorInfo() If Not @error And $aCursor[1] Then $bCursor = True ; Cursor info was found. Local $hIcon = _WinAPI_CopyIcon($aCursor[2]) Local $aIcon = _WinAPI_GetIconInfo($hIcon) If Not @error Then _WinAPI_DeleteObject($aIcon[4]) ; delete bitmap mask return by _WinAPI_GetIconInfo() If $aIcon[5] <> 0 Then _WinAPI_DeleteObject($aIcon[5]); delete bitmap hbmColor return by _WinAPI_GetIconInfo() _WinAPI_DrawIcon($hCDC, $aCursor[3] - $aIcon[2] - $iLeft, $aCursor[4] - $aIcon[3] - $iTop, $hIcon) EndIf _WinAPI_DestroyIcon($hIcon) EndIf EndIf _WinAPI_ReleaseDC($hWnd, $hDDC) _WinAPI_DeleteDC($hCDC) If $sFileName = "" Then Return $hBMP $bRet = _ScreenCapture_SaveImage($sFileName, $hBMP, True) Return SetError(@error, @extended, $bRet) EndFunc ;==>_ScreenCapture_Capture Thank you @InnI
  16. This depends on which browser you are using, if IE then you could look for information on IE.au3 (this is in your include directory). I'm not really into browser automation, so perhaps have a go at something simple, post your code here and I'm sure one of the more experienced users will help.
  17. I didn't remember about this... (it's in the 1st example in the help page) edit : instead of using StringLen : Local $string = "abcdefghijklmnopqrstuvmxyz" MsgBox(0, "", _StringPos($string, "a") ) Func _StringPos($sString, $sSearch) StringRegExp($string, "(?=\Q" & $sSearch & "\E)", 1) Return @error ? 0 : @extended EndFunc
  18. Not worry, but how can i fill the two boxes?
  19. Use @extended Local $string = "abcdefghijklmnopqrstuvmxyz" MsgBox(0, "", _StringPos($string, "d") ) Func _StringPos($sString, $sSearch) StringRegExp($string, "\Q" & $sSearch & "\E", 1) Return @error ? 0 : @extended - StringLen($sSearch) EndFunc
  20. (?s) Single-line or DotAll: . matches anything including a newline sequence . Matches any single character except, by default, a newline sequence. Matches newlines as well when option (?s) is active. *? 0 or more, lazy (takes the smallest match) \Q...\E Verbatim sequence: metacharacters loose their special meaning between \Q and \E (if you have special characters in your search string)
  21. missed that... A-Jay
  22. Big thank you! It worked. Its been around 3 weeks, I have started working with autoit. Amazing tool! Was able to create some nifty scripts but a simple screen capture udf was driving me mad :-). Happy weekend!
  23. The site used the ReactJS library, which can be a PITA to automate. I previously wrote some code to deal with this in FF. Unfortunately, this doesn't appear to be working with this version of the library. The good news is that I found some code here that appears to work when I manually ran it in the console. var nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set;, 'react 16 value'); var ev2 = new Event('input', { bubbles: true}); input.dispatchEvent(ev2); This appears to work fine in my testing. Now you just need to implement the solution in Autoit.
  24. Interestingly, variables declared at the main level are always scoped as global, so it is less confusing to declare them as global. Try this: Opt('MustDeclareVars', 1) Local $ttt = "hello" VarTest() Func VarTest() MsgBox(0,"debug", $ttt) EndFunc
  25. Try to avoid Global vars Local $a, $b Should be enough.
  1. Load more activity