Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/07/2014 in all areas

  1. 3 points
  2. mikell pointed to the the solution to solve your problem. You have two options, make the search case insensitive $aArray = StringRegExp(GUICtrlRead($Edit1), '(?i)\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b', $STR_REGEXPARRAYGLOBALMATCH) or add a-z to the pattern to match lowercase letters. $aArray = StringRegExp(GUICtrlRead($Edit1), '\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}\b', $STR_REGEXPARRAYGLOBALMATCH) Anyway, in the page I linked yesterday, you had this info "If you want to use the regular expression above, there's two things you need to understand. First, long regexes make it difficult to nicely format paragraphs. So I didn't include a-z in any of the three character classes. This regex is intended to be used with your regex engine's "case insensitive" option turned on." Cheers, sahsanu
    1 point
  3. It looks like it needs to be visible to draw, im not an expert on gdi, maybe others can step in and give some tips, but anyway, i think the best bet would be to draw it smaller, and save the result as screenshot, because when you save from memory, it'll save the tile itself, but as i said, maybe an expert can step in. My help is more focused on the loops.
    1 point
  4. A general piece of advice: When deleting rows (or sets of rows) several times, it's normally easier to start at the end of the array and work your way to the beginning. This avoids having to adjust index numbers to compensate for rows which have already been deleted.
    1 point
  5. kylomas

    Excel lookup

    Stimorol, This may get you started... #include <Excel.au3> #include <MsgBoxConstants.au3> Local $sString = '1238/12' ; string from Web page $sString = StringRegExpReplace($sString, '(\d+)/.*$', '$1') ; grab numbers to first '/' ; validate string If @error Or @extended = 0 Then Exit MsgBox($MB_ICONERROR, 'ERROR', 'Invalid input' & @CRLF & 'Input = ' & $sString) ; start an instance of excel Local $oExcel = _Excel_Open(False) If @error Then Exit MsgBox($MB_ICONERROR, 'ERROR', 'Excel failed to initialize') ;open a test excel workbook Local $sExcelFile = @ScriptDir & '\test010.xls' Local $oBOOK = _Excel_BookOpen($oExcel, $sExcelFile) If @error Then MsgBox($MB_ICONERROR, 'ERROR', 'Excel failed to open' & @CRLF & 'File Name = ' & $sExcelFile) _Excel_Close($oExcel) Exit endif ; search for our account number Local $aRSLT = _Excel_RangeFind($oBOOK, $sString, "A1:A99") If $aRSLT[0][2] = '' Then MsgBox($MB_ICONERROR, 'ERROR', 'Account not found' & @CRLF & 'Account = ' & $sString) _Excel_Close($oExcel) Exit EndIf ; set the adjacent column Local $sAdjacentColumn = Chr(Asc(StringRegExp($aRSLT[0][2], '[^\$]', 3)[0]) + 1) ; set the row Local $sRow = StringRegExp($aRSLT[0][2], '[^\$]', 3)[1] ; get the User Name Local $sUser = _Excel_RangeRead($oBOOK, Default, $sAdjacentColumn & $sRow) If $sUser = '' Then $sUser = InputBox('Account = ' & $sString, 'Enter User Name') MsgBox($mb_OK, 'User Lookup', 'Account = ' & $sString & @CRLF & 'User = ' & $sUser) _excel_close($oExcel) The test spreadsheet that I used looks like this test010.xls. Point #4 did not make sense to me because if you do not have an account # then you are not likely to have a user. I set the code up so that if you have an account # with a blank user then you are prompted for the user. If this is not your intent it is easily modified. Good Luck, kylomas edit: Assumptions data range is A1:Z99 AutoIT 3.3.12+ edit2: There is probably a way within excel to get to the adjacent column but I don't know what it is so I just added +1 to the found column to move to the next column to the right.
    1 point
  6. Well, it's not my call. My company want it this way. It's a measuring instrument they want me to find the position of a pointer. I can't take control of that pointer, because it's a measuring application.
    1 point
  7. thats the work in progress part so not working at the moment The thought is to make something like an ini file layout like [uIA_EditControlTypeId] 'Source here, below 2 dummy line examples _UIA_Action(@@REGEXP@@, "focus") _UIA_Action(@@REGEXP@@, "focus") and then do a straight forward search replace for all known @@<property>@@ with the values spy retrieves thru uiautomation but then when I was thinking out this layout there are many complications and as such I started with just outputting some standard code to straighten out my mind a little more. edit: anyway attached a preview template (feel free for comments / wishes) but not working in combination with simplespy yet codeTemplates.txt
    1 point
×
×
  • Create New...