Sign in to follow this  
Followers 0
Qual-IT London

#7

9 posts in this topic

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')

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

maybe..?

run("rundll32 url.dll,FileProtocolHandler html.htm"& "#7",@SW_MAXIMIZE)
Edited by slightly_abnormal

Share this post


Link to post
Share on other sites

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')

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')

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Interesting. This "feature" only seems to affect locally saved files.

If I create a desktop shortcut to the following, it works fine

http://www.autoitscript.com/autoit3/docs/faq.htm#7

However, if I save that page to C:\faq.htm and create a shortcut to

file:///C:/faq.htm#7

then 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 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!

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Interesting. This "feature" only seems to affect locally saved files.

If I create a desktop shortcut to the following, it works fine

http://www.autoitscript.com/autoit3/docs/faq.htm#7

However, if I save that page to C:\faq.htm and create a shortcut to

file:///C:/faq.htm#7

then 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 by Joon

Share this post


Link to post
Share on other sites

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')

Share this post


Link to post
Share on other sites

@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...

Share this post


Link to post
Share on other sites

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

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0