BlazeLondon Posted March 20, 2006 Share Posted March 20, 2006 Can anyone see why the #7 isnt being passed to the web page before it displays? its just loading the page at the start and not jumping to section 7. typing this into the command prompt works! start /max file:///c:/scripts/html.htm#7 RunWait(@ComSpec & ' /C start /max file:///' & @scriptdir & '/html.htm' & '#7') Link to comment Share on other sites More sharing options...
slightly_abnormal Posted March 21, 2006 Share Posted March 21, 2006 (edited) maybe..? run("rundll32 url.dll,FileProtocolHandler html.htm"& "#7",@SW_MAXIMIZE) Edited March 21, 2006 by slightly_abnormal Link to comment Share on other sites More sharing options...
BlazeLondon Posted March 21, 2006 Author Share Posted March 21, 2006 Can anyone see why the #7 isnt being passed to the web page before it displays?its just loading the page at the start and not jumping to section 7.typing this into the command prompt works!start /max file:///c:/scripts/html.htm#7RunWait(@ComSpec & ' /C start /max file:///' & @scriptdir & '/html.htm' & '#7')This works and i can live with it; but I dont much like it RunWait(@ComSpec & ' /C start /max iexplore file:///' & @scriptdir & '/html.htm' & '#7') Link to comment Share on other sites More sharing options...
BlazeLondon Posted March 21, 2006 Author Share Posted March 21, 2006 maybe..? run("rundll32 url.dll,FileProtocolHandler html.htm#7",@SW_MAXIMIZE) cant make that work, heres the syntax run("rundll32 url.dll,FileProtocolHandler " & FileGetShortName(@scriptdir) & "\qbsetup.htm#7",@SW_MAXIMIZE) Link to comment Share on other sites More sharing options...
CyberSlug Posted March 21, 2006 Share Posted March 21, 2006 (edited) Interesting. This "feature" only seems to affect locally saved files.If I create a desktop shortcut to the following, it works finehttp://www.autoitscript.com/autoit3/docs/faq.htm#7However, if I save that page to C:\faq.htm and create a shortcut to file:///C:/faq.htm#7then the #7 isn't passed.You can have the '#' sign just fine in file names--the browser urlencodes to %23 and displays the page--but the # is stripped when referring to an anchor. Edited March 21, 2006 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Joon Posted March 21, 2006 Share Posted March 21, 2006 (edited) Interesting. This "feature" only seems to affect locally saved files.If I create a desktop shortcut to the following, it works finehttp://www.autoitscript.com/autoit3/docs/faq.htm#7However, if I save that page to C:\faq.htm and create a shortcut to file:///C:/faq.htm#7then the #7 isn't passed.You can have the '#' sign just fine in file names--the browser urlencodes to %23 and displays the page--but the # is stripped when referring to an anchor.file:///C:/faq.htm#7 works if you put this as URL address."C:\Program Files\Internet Explorer\IEXPLORE.EXE" file:///C:/faq.htm#7 -> this works also. Edited March 21, 2006 by Joon Link to comment Share on other sites More sharing options...
Joon Posted March 21, 2006 Share Posted March 21, 2006 Can anyone see why the #7 isnt being passed to the web page before it displays? its just loading the page at the start and not jumping to section 7. typing this into the command prompt works! start /max file:///c:/scripts/html.htm#7 RunWait(@ComSpec & ' /C start /max file:///' & @scriptdir & '/html.htm' & '#7') RunWait(@ComSpec & ' /C start /max iexplore file:///' & @scriptdir & '/html.htm' & '#7') Link to comment Share on other sites More sharing options...
CyberSlug Posted March 21, 2006 Share Posted March 21, 2006 @Joon: But some people try to avoid using Internet Explorer;) Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Joon Posted March 21, 2006 Share Posted March 21, 2006 @Joon: But some people try to avoid using Internet Explorer;) Shouldn't this work? $reg = RegRead("HKEY_CLASSES_ROOT\htmlfile\shell\opennew\command","") $browser = StringLeft($reg,StringInStr($reg,"%")-1) RunWait($browser & " file:///c:/faq.htm#7") Not sure why need ComSpec... 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