Dan Bratt Posted February 16, 2010 Share Posted February 16, 2010 Hello, I've been running this script for about a year now. I useit to load a SQL reporting services report page. You'll seein the script that I have disabled all of the links on theweb page because I don't want the user to go outside of the page.It all works perfectly, until the user hits [F5] refresh. The page reloads and all of my custom link event traps goaway. I really don't want to disable the refresh function,but is there a way that I can trap for it ? Here is myscript:#include <IE.au3>$URL = $CmdLine$IsSSRS = StringInStr($URL,"http://sql05srv/Reports")If $IsSSRS <> 1 Then MsgBox (0,"Warning","This function can only be used with SSRS pages.") ExitEndIf$oIE = _IECreate ($URL)_IEPropertySet ($oIE, "addressbar", False)_IEPropertySet ($oIE, "menubar", False)_IEPropertySet ($oIE, "toolbar", False)For $i = 0 to 9 Step 1 $oLink = _IELinkGetCollection($oIE,$i) $sLinkId = $oLink.uniqueId _IEHeadInsertEventScript($oIE, $sLinkId, "onclick", "alert('Function not available');return false;")NextOpt("WinTitleMatchMode", 2)WinSetState("- Windows Internet Explorer", "", @SW_MAXIMIZE)ExitThanks to anyone who can help ! Link to comment Share on other sites More sharing options...
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 account
Already have an account? Sign in here.Sign In Now