Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/08/2013 in all areas

  1. orbs

    Out parameter

    look up ByRef in AutoIt help.
    1 point
  2. asilcot, Try this, #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiTreeView.au3> #include <GuiScrollBars.au3> #include <ScrollBarConstants.au3> Global $iScrollUp=False Global $iScrollDown=False ;Create GUI $hWnd = GUICreate("Auto Scroll Treeview", 300, 600, (@DesktopWidth/2)-150, (@DesktopHeight/2)-300, BitOR($WS_SIZEBOX,$WS_SYSMENU,$WS_MINIMIZEBOX,$WS_MAXIMIZEBOX)) ;Create Treeview Global $iTreeView = GUICtrlCreateTreeView(0, 0, 300, 600, BitOR($TVS_HASBUTTONS,$TVS_HASLINES,$TVS_LINESATROOT,$TVS_SHOWSELALWAYS,$WS_GROUP,$WS_TABSTOP), $WS_EX_CLIENTEDGE) Global $hTreeView = GUICtrlGetHandle($iTreeView) ;Initialize Scrollbar _GUIScrollBars_Init($hTreeView) ;Populate Treeview _GUICtrlTreeView_BeginUpdate($hTreeView) For $i=0 To 200 _GUICtrlTreeView_Add($hTreeView, 0, "Item" & $i,0,0) Next _GUICtrlTreeView_EndUpdate($hTreeView) GUISetState() While 1 $Msg = GUIGetMsg() Select Case $Msg = $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_MOUSEMOVE Local $tMPos = _WinAPI_GetMousePos(True, $hTreeView) If DllStructGetData($tMPos, 2) <= 30 Then ;mouse moved into upper portion of treeview, set flag to scroll up $iScrollUp=True $iScrollDown=False ElseIf DllStructGetData($tMPos, 2) >= 540 Then ;mouse moved into lower portion of treeview, set flag to scroll down $iScrollUp=False $iScrollDown=True Else ;mouse is not in either upper or lower portion of treeview, so don't move $iScrollUp=False $iScrollDown=False EndIf EndSelect If $iScrollUp Then If _GUIScrollBars_GetScrollInfoPos($hTreeview, $SB_VERT) <> _GUIScrollBars_GetScrollInfoMin($hTreeview, $SB_VERT) Then ;Move scrollbar up 1 ;_GUIScrollBars_ScrollWindow($hTreeView, 0, 1) _GUIScrollBars_SetScrollInfoPos($hTreeview, $SB_VERT, _GUIScrollBars_GetScrollInfoPos($hTreeview, $SB_VERT)-1) _GUICtrlTreeView_EndUpdate($hTreeView) ; <------------- added to re-draw treeview EndIf ;Sleep(50) EndIf If $iScrollDown Then If _GUIScrollBars_GetScrollInfoPos($hTreeview, $SB_VERT) <> _GUIScrollBars_GetScrollInfoMax($hTreeview, $SB_VERT) Then ;Move scrollbar down 1 ;_GUIScrollBars_ScrollWindow($hTreeView, 0, -1) _GUIScrollBars_SetScrollInfoPos($hTreeview, $SB_VERT, _GUIScrollBars_GetScrollInfoPos($hTreeview, $SB_VERT)+1) _GUICtrlTreeView_EndUpdate($hTreeView) ; <------------- added to re-draw treeview EndIf ;Sleep(50) EndIf WEnd kylomas edit: there is an interesting discussion of a related issue >here... I tried the alternate suggestions from this thread but they did not work. Maybe scrollbars are a different animal, don't know, never used them.
    1 point
  3. You can use controlgetpos to see when mousegetpos is in the bounds of this combo...then send _guictrlcomboboxex_showdropddown($hcontrol,True)
    1 point
  4. You get it wrong principle. They prohibit automate game, do not forbid them to create.
    1 point
  5. Hi guys, not sure if i am at the place here, but that's my first post. I m having the following issue: i m trying to change an ad user password, provided that i know the current one (no admin rights). The following code is perfectly working when I change my personal pass, when logged in with my username of course. (username and both passwords stored in an ini file) Local $var = IniReadSection(@ScriptDir & "\param.ini","account") ;MsgBox(0,"",@ScriptDir) Local $objUser, $username, $oldpw, $newpw If @error Then MsgBox(4096, "", "Error occurred, probably no INI file or wrong path.") Else $username = $var[1][1] $oldpw = $var[2][1] $newpw = $var[3][1] EndIf $objUser = ObjGet("LDAP://cn=" & $username & ",OU=T-Account,OU=User,OU=Administration,dc=dekager,dc=dekabank,dc=intern") MsgBox (0,"",@UserName & " " & $objUser.displayname) $objUser.ChangePassword($oldpw, $newpw) if @error Then MsgBox(4096,"","Error occured") Else MsgBox(0,"","Password changed: " & $username) EndIf But when I tried the same code with another user account (logged in as that user) all I got was an error message, namely my error message "error occured". I really don't see any reasonable explanation, so any help would be much appreciated Thank u in advance
    1 point
×
×
  • Create New...