EKY32 Posted October 3, 2012 Posted October 3, 2012 (edited) I Have this code, I need to hide the scroll bar and I did it, I could make a button to scroll down the page but i couldn't make another to scroll it up, Healp please? #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Text = "Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>" $oIE = ObjCreate("Shell.Explorer.2") $Form1 = GUICreate("Form1", 380, 300) $Label12 = GUICtrlCreateObj($oIE, 10, 10, 353, 259) $oIE.navigate("") $oIE.document.write($Text) $oIE.document.body.scroll = "no" $oIE.document.body.style.borderWidth = 1 $btn = GUICtrlCreateButton("down", 10, 270, 100, 25) $btn2 = GUICtrlCreateButton("up", 250, 270, 100, 25) GUISetState(@SW_SHOW) $x = 1 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $btn $oIE .document.parentWindow.scrollTo(0, $x + 10) $x = $x + 10 Case $btn2 ; scroll up EndSwitch WEnd Thank you. Edited October 4, 2012 by EKY32 [font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]
Danyfirex Posted October 3, 2012 Posted October 3, 2012 (edited) It's very simple. if you add 10 only subtract 10. #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Text = "Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>Text<br/>" $oIE = ObjCreate("Shell.Explorer.2") $Form1 = GUICreate("Form1", 380, 300) $Label12 = GUICtrlCreateObj($oIE, 10, 10, 353, 259) $oIE.navigate("") $oIE.document.write($Text) $oIE.document.body.scroll = "no" $oIE.document.body.style.borderWidth = 1 $btn = GUICtrlCreateButton("down", 10, 270, 100, 25) $btn2 = GUICtrlCreateButton("up", 250, 270, 100, 25) GUISetState(@SW_SHOW) $x = 1 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $btn $oIE .document.parentWindow.scrollTo(0, $x + 10) $x = $x + 10 Case $btn2 $oIE .document.parentWindow.scrollTo(0, $x - 10) $x = $x - 10 EndSwitch WEnd Edited October 3, 2012 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
EKY32 Posted October 4, 2012 Author Posted October 4, 2012 Thank you Mr.Danyfirex !!! I tried that but it didn't work, maybe because I used another integer ( $Y ). Thank you. [font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]
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