Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/22/2015 in all areas

  1. And there is nothing I'd like more than to show my appreciation I'm amazed about the Autoit Forum in general. Haven't seen such a dedicated and helpful community elsewhere.
    2 points
  2. Danyfirex

    Search box for names

    I wrote this example. #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <File.au3> Global $g_hListView, $hGUI, $g_SearchInput Call("ListNames") Func ListNames() Local $hImage, $btnSearch $hGUI = GUICreate("Listview", 500, 420) Local $sDirPath = "C:\Test" $g_hListView = _GUICtrlListView_Create($hGUI, "", 2, 2, 494, 368, $LVS_REPORT) _GUICtrlListView_SetExtendedListViewStyle($g_hListView, $LVS_EX_GRIDLINES) GUICtrlCreateLabel("Search For: ", 20, 385) $g_SearchInput = GUICtrlCreateInput("", 100, 380, 100, 22) $btnSearch = GUICtrlCreateButton("Highlight", 220, 380) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") Local $aFiles = _FileListToArray($sDirPath, "*.txt") ;~ _ArrayDisplay($aFiles) Local $n For $i = 1 To $aFiles[0] $tmp = _FileCountLines($sDirPath & "\" & $aFiles[$i]) $n = ($n < $tmp) ? $tmp : $n Next For $i = 0 To $n _GUICtrlListView_AddItem($g_hListView, "") Next Local $aString = 0 For $i = 1 To $aFiles[0] _GUICtrlListView_AddColumn($g_hListView, StringTrimRight($aFiles[$i], 4), 100) $aString = FileReadToArray($sDirPath & "\" & $aFiles[$i]) If $i = 1 Then For $x = 0 To UBound($aString) - 1 _GUICtrlListView_SetItemText($g_hListView, $x, $aString[$x]) Next Else For $x = 0 To UBound($aString) - 1 _GUICtrlListView_AddSubItem($g_hListView, $x, $aString[$x], $i - 1) Next EndIf Next Local $idMsg = 0 While 1 $idMsg = GUIGetMsg() Select Case $idMsg = $GUI_EVENT_CLOSE GUIDelete() Exit Case $idMsg = $btnSearch _GUICtrlListView_RedrawItems($g_hListView, 0, _GUICtrlListView_GetItemCount($g_hListView)) EndSelect WEnd EndFunc ;==>ListNames Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam) Local $tNMHDR, $hWndFrom, $iCode $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = DllStructGetData($tNMHDR, "hWndFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $g_hListView Switch $iCode Case $NM_CUSTOMDRAW Local $tCustDraw = DllStructCreate($tagNMLVCUSTOMDRAW, $lParam) Local $iDrawStage = DllStructGetData($tCustDraw, "dwDrawStage") If $iDrawStage = $CDDS_PREPAINT Then Return $CDRF_NOTIFYITEMDRAW If $iDrawStage = $CDDS_ITEMPREPAINT Then Return $CDRF_NOTIFYSUBITEMDRAW Local $iSubItem = DllStructGetData($tCustDraw, "iSubItem") Local $iItem = DllStructGetData($tCustDraw, "dwItemSpec") Local $iColor = RGB2BGR(0xffffff) If GUICtrlRead($g_SearchInput) <> "" Then If _GUICtrlListView_GetItemText($g_hListView, $iItem, $iSubItem) = GUICtrlRead($g_SearchInput) Then $iColor = RGB2BGR(0x00ff00) EndIf EndIf DllStructSetData($tCustDraw, "clrTextBk", $iColor) Return $CDRF_NEWFONT EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func RGB2BGR($iColor) Return BitAND(BitShift(String(Binary($iColor)), 8), 0xFFFFFF) EndFunc ;==>RGB2BGR _WinAPI_SetWindowsHookEx Saludos
    2 points
  3. BBs19

    MetroGUI UDF

    Version 5.1

    8,855 downloads

    Features: Create modern looking borderless and resizable GUIs with control buttons (Close,Maximize/Restore,Minimize, Fullscreen, Menu) True borderless, resizeable GUI with full support for aerosnap etc. Many color schemes/themes included. See MetroThemes.au3 for more details. 2 type of Windows 8/10 style buttons. Modern checkboxes, radios, toggles and progressbar. All buttons, checkboxes etc. have hover effects! Windows 10 style modern MsgBox. Windows 10/Android style menu that slides in from left.
    1 point
  4. JohnOne

    Cant open new tabs

    Because what you have there is an IE activex control which does not have tabs. Browser's have tabs, if you want that you must pseudo embed full browser in gui. Search pseudo embed
    1 point
  5. Melba23

    Cant open new tabs

    Samir90, Please do not bump your own threads within 24 hours. Remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare. You just have to wait until someone who knows something about your particular problem, and is willing to help, comes online. Be patient and someone will answer eventually. M23
    1 point
  6. JohnOne

    Search box for names

    You could hit the like button on his post.
    1 point
  7. 7=Nomatch Yes _Example() Func _Example() ; attach to IE Local $oIE = _IEAttach($sURL,'url') ; find IFrame object which contain this Map element object Local $oIEFrame = _IEFrameGetObjByName($oIE, 'tableHeaderFrame') ; get Map element object by reference to IFrame Local $oIEMap = _IEGetObjByName($oIEFrame,'search_button_map') ; click in Map element object _IEAction($oIEMap,'click') EndFunc http://www.w3schools.com/tags/tag_iframe.asp "An inline frame is used to embed another document within the current HTML document."
    1 point
  8. You can also keep your Funcs in your map with your data ; Lets create our map first Local $mMap[] ; Lets add some information to the map, feel free to modify & add new elements $mMap["Name"] = "Damon Harris" $mMap["Alias"] = "TheDcoder" $mMap["Gender"] = "Male" $mMap["Age"] = 14 $mMap["Location"] = "India" $mMap["Keys"] = MapKeys($mMap) For $Key In $mMap["Keys"] If $Key <> "Keys" Then msgbox(0, '' , $Key & " = " & $mMap[$Key]) next
    1 point
  9. MagnumXL

    loops for a noob

    JohnOne's code is surely perfection... I just wanted to point out that the 3 after While is arbitrary. Any number other than zero (0) will evaluate as true. So these are all the same: While 3 While 1 While True While 2 > 1Just so you don't get hung up thinking it will repeat 3 times or something like that.
    1 point
  10. JohnOne

    loops for a noob

    _Example() Func _Example() While 3 $search = PixelSearch(1920, 50, 3839, 1079, 0xEF0FFF) If Not @error Then MouseMove($search[0], $search[1]) Sleep(750) MouseClick("left") Else Return SetError(1) ; Not found EndIf Send("{ctrldown}{f}{ctrlup}{altdown}{c}{altup}{altdown}{a}{altup}") Sleep(300) Send("open") WEnd EndFunc ;==>_Example
    1 point
  11. AutoItSC.bin (and its x64 variant) are now embedded in Aut2Exe's resource table in an a3x like format, perhaps that is why John. With modern versions of AutoIt (post 3.3.8.1) since the script is embedded in the standalones resource table you no longer have to worry about Mpress not supporting the overlay data, so you can now use it on an already built standalone should you wish to.
    1 point
  12. Exit

    Sound Playing Detection

    Would you please be so kind to share those modifications ?
    1 point
  13. JohnOne

    Search box for names

    I understand. I just gathered from your positioning of the functions I offered in your new code that did not now how to use a button and get the text of input box after pressing it. For the record you placed it incorrectly. You do not absolutely need a button, you are right about that, but once again I try to answer based on the level I deduce from the askee, a button is the simplest way you see.
    1 point
  14. dolphins, You cannot. The interpreter which is the executable itself using yoru script as a resource) is larger in 3.3.14.# for several reasons: New functions were added to the AutoIt core code.A full maths library was added so that more accurate maths operations were possible.The exectuable is no longer autoamtically compressed with upx in order to try and reduce the AV false positives associated with that app.And finally, an increase from 438kb to 555kb is hardly catastrophic. I have a 1Tb drive so it would take a fair few of either size to fill it.... M23
    1 point
  15. minimum 12 hours waitng.
    1 point
  16. water

    Active Directory UDF

    Check function _AD_ModifyAttribute.
    1 point
  17. You want to make code that has thoughts like a brain? Get yourself frozen for 200 years then thaw out and check again.
    1 point
  18. Does it? It doesn't for me... BTW I modified the filter, try this: $aFiles = _FileListToArray($sLocation, "*_*.txt", $FLTA_FILES) ; Will return an array containing txt files with an underscore in its name
    1 point
  19. Over the past year of use, I've made a few mods (but not much), and core code is unchanged. I discovered that the function got slower over time, and was cursing windows until I realised my font data file had been bloated horrifically with logging of unrecognised characters. I thus added a cleaner function to remove them. I've also slightly altered the default options, with defaults for initial training (when logging is useful) and another set once usage is stable (when it probably isn't) which also stops asking for user input. I thus thought an update was in order. I'll claim much of the kudos offerred by dmob, as civilcalc's code and subsequent discussion was only a stub, but did give me an idea of how to start with screen OCR (which is why my post appeared under hers in the first place - I was hoping for a bit of constructive input, but it never eventuated). Hopefully the 700 downloads so far of my code mean at least someone other than me is using it. Cheers David OCR.au3_PixelGetColor.au3
    1 point
×
×
  • Create New...