Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/23/2014 in all areas

  1. Yeah, the change is intentional. Jon had a post about that some time ago giving explanation and basically redefining the word "stupid". However, I hope people that influence Jon these days will be smart, and more importantly eloquent, enough to make him reconsider the decision. I also hope for peace in the world. How big are chances for that?
    2 points
  2. Here is a way : #Include <Array.au3> Local $iCount Local $sData = FileRead("data.txt") ; Uniq lines Local $aDuplicates = StringRegExp($sData, "(?s)(?:\A|\R)(\N+)(?=\R|\Z)(?!.*\1)", 3) Local $aResult[ UBound($aDuplicates)][2] For $i = 0 To UBound($aDuplicates) - 1 $iCount = UBound( StringRegExp($sData, "(?:\A|\R)\Q" & $aDuplicates[$i] & "\E(?=\R|\Z)", 3) ) $aResult[$i][0] = $aDuplicates[$i] $aResult[$i][1] = $iCount Next _ArraySort($aResult, 1, 0, 0, 1) ; Delete uniq rows ######################## For $i = UBound($aResult) - 1 To 0 Step -1 If $aResult[$i][1] > 1 Then ExitLoop Next Redim $aResult[$i + 1][2] ; ######################################### _ArrayDisplay($aResult)
    1 point
  3. like this should work...... (maybe) Do Do Function1() Until Not @error Function2() Until Not @error
    1 point
  4. While 1 Do Function1() Until Not @error Function2() If Not @error Then ExitLoop WEnd
    1 point
  5. MikahS, My pleasure as always. M23
    1 point
  6. you could probably make your own with labels fairly simply.. heres 5 minutes to make 3 color picker #include <StaticConstants.au3> #include <GUIConstantsEx.au3> GuiCreate("3 color picker" , 320 , 100) $LBL_red = GUICtrlCreateLabel("" , 0, 0 , 100, 100) GUICtrlSetBkColor(-1 , 0xFF0000) $LBL_green = GUICtrlCreateLabel("" , 110, 0 , 100, 100) GUICtrlSetBkColor(-1 , 0x00FF00) $LBL_blue = GUICtrlCreateLabel("" , 220, 0 , 100, 100) GUICtrlSetBkColor(-1 , 0x0000FF) guisetstate() While 1 Switch GUIGetMsg() Case $GUI_EVENT_PrimaryDown Case $LBL_blue msgbox(0, '' , "You Picked Blue") Case $LBL_green msgbox(0, '' , "You Picked Green") Case $LBL_red msgbox(0, '' , "You Picked Red") Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
    1 point
  7. Solution: _GUICtrlListView_EnsureVisible($ConsoleArea, _GUICtrlListView_GetItemCount($ConsoleArea)-1) ; scroll to the end of ListView
    1 point
  8. If you go to https://www.autoitscript.com/autoit3/docs/functions/AutoItSetOption.htm#WinTitleMatchMode you will see that the default value for WinTitleMatchMode is 1 not 2. Opt("WinTitleMatchMode", 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase This is probably what is causing you to have the issue. At the top of the script you need to add Opt ("WinTitleMatchMode", 2) to get it to use that option.
    1 point
  9. @John404: You can simulate the mouse down event using _WinAPI_PostMessage with $WM_LBUTTONDOWN, and using AdlibRegister to simulate the mouse up with $WM_LBUTTONUP, too. But you will *not* get the *click* behavior, because it requires the correct state when the button receive $WM_LBUTTONUP msg. If what you expected is only down, then up, then a pair of _WinAPI_PostMessage is enough. But if what you want is a mouse click in 3 secs after mouse down, then you need some tweak like this: $hWndButtonToBeClick = GUICtrlGetHandle($idCtrlButtonToBeClick) Func ClickWait() _WinAPI_PostMessage($hWndButtonToBeClick, $WM_LBUTTONDOWN, 0, 0) AdlibRegister(3000, 'ClickExecute') EndFunc Func ClickExecute() AdlibUnRegister('ClickExecute') _WinAPI_PostMessage($hWndButtonToBeClick, $WM_LBUTTONUP, 0, 0) ; Need addition message to simulate click! _WinAPI_PostMessage($hWndButtonToBeClick, $WM_LBUTTONDOWN, 0, 0) _WinAPI_PostMessage($hWndButtonToBeClick, $WM_LBUTTONUP, 0, 0) EndFunc Edit: If you want to click a control in a window outside your script, then try ControlGetHandle instead of GUICtrlGetHandle
    1 point
  10. I don't think this is a bug. This is a limitation of Windows XP. In the bottom of the remarks for SHChangeNotifyRegister you can read: "For performance reasons, multiple notifications can be combined into a single notification. For example, if a large number of SHCNE_UPDATEITEM notifications are generated for files in the same folder, they can be joined into a single SHCNE_UPDATEDIR notification." The event you are receiving in post 1 (0x00001000) is exactly SHCNE_UPDATEDIR. Post 4 confirms that downloading a file generates a lot of events. On XP all these events are joined into a single SHCNE_UPDATEDIR notification. On Win 7 which is newer and faster there are no performance issues, and you are receiving all the events.
    1 point
×
×
  • Create New...