runsnake Posted August 31, 2011 Share Posted August 31, 2011 following script doesnot work! #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StructureConstants.au3> #include <GUIScrollBars.au3> #include <ScrollBarConstants.au3> Run("Notepad") Sleep(200) $hWin = WinGetHandle("[CLASS:Notepad]") For $i = 1 To 40 ControlSend($hWin, "", "Edit1", $i & @LF) Next $hCtrl = ControlGetHandle("[CLASS:Notepad]", "", "Edit1") $Max = _GUIScrollBars_GetScrollInfoMax($hCtrl, $SB_VERT) $TrackPos = _GUIScrollBars_GetScrollInfoTrackPos($hCtrl, $SB_VERT) $PageSize = _GUIScrollBars_GetScrollInfoPage($hCtrl, $SB_VERT) For $i = $Max To 1 Step -1 _GUIScrollBars_ScrollWindow($hCtrl, 0, 1) Sleep(100) Next Link to comment Share on other sites More sharing options...
sleepydvdr Posted August 31, 2011 Share Posted August 31, 2011 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StructureConstants.au3> #include <GUIScrollBars.au3> #include <ScrollBarConstants.au3> Run("Notepad") Sleep(200) WinWaitActive("Untitled - Notepad") ; <-------------- Added this line $hWin = WinGetHandle("[CLASS:Notepad]") For $i = 1 To 40 ControlSend($hWin, "", "Edit1", $i & @LF) Next $hCtrl = ControlGetHandle("[CLASS:Notepad]", "", "Edit1") $Max = _GUIScrollBars_GetScrollInfoMax($hCtrl, $SB_VERT) $TrackPos = _GUIScrollBars_GetScrollInfoTrackPos($hCtrl, $SB_VERT) $PageSize = _GUIScrollBars_GetScrollInfoPage($hCtrl, $SB_VERT) For $i = $Max To 1 Step -1 _GUIScrollBars_ScrollWindow($hCtrl, 0, 1) Sleep(100) Next #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
runsnake Posted August 31, 2011 Author Share Posted August 31, 2011 Thx for warm answer. But I pointed to scrolling notepad be wrong! #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StructureConstants.au3> #include <GUIScrollBars.au3> #include <ScrollBarConstants.au3> Run("Notepad") Sleep(200) $hWin = WinGetHandle("[CLASS:Notepad]") WinWaitActive("[CLASS:Notepad]") For $i = 1 To 40 ControlSend($hWin, "", "Edit1", $i & @LF) Next $hCtrl = ControlGetHandle("[CLASS:Notepad]", "", "Edit1") $Max = _GUIScrollBars_GetScrollInfoMax($hCtrl, $SB_VERT) $TrackPos = _GUIScrollBars_GetScrollInfoTrackPos($hCtrl, $SB_VERT) $PageSize = _GUIScrollBars_GetScrollInfoPage($hCtrl, $SB_VERT) For $i = $Max To 1 Step -1 _GUIScrollBars_ScrollWindow($hCtrl, 0, 1) Sleep(100) Next Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now