Windows Path issues
Posted: Thu Aug 06, 2009 6:51 pm
Hi Everyone
I'm having some path issues with this program which is nearly finished!
Its cross-platform and all I'm trying to do is launch an html file from a little intro stack which plays off a cd.
The html file launches fine on the Mac but I can't get Windows to go for it. Here's my script:
on mouseUp
if the platform is "MacOS" then
set the itemDel to slash
put "file://" into myCD
put item 1 to -5 of the effective filename of this stack into myPath
put "/PDFs/etc etc/index.html" after myPath
revGoURL myCD && myPath
else if the platform is "Win32" then
set the itemDel to slash
put item 1 to -5 of the effective filename of this stack into myPath
put "/PDFs/etc etc/index.html" after myPath
revGoURL & myPath
if not (there is a file myPath) then
beep
answer error "Can't find file" && myPath
else
end if
end if
end mouseUp
I tried putting file:// infront but that does nothing. Windows tries to put 'http:' in the browser on previous efforts whereas to view it manually, the browser has the drive letter. But obviously, each PC might have a different cd drive letter?
How can I get Windows to put the right prefix for the browser?
Thanks in advance
I'm having some path issues with this program which is nearly finished!
Its cross-platform and all I'm trying to do is launch an html file from a little intro stack which plays off a cd.
The html file launches fine on the Mac but I can't get Windows to go for it. Here's my script:
on mouseUp
if the platform is "MacOS" then
set the itemDel to slash
put "file://" into myCD
put item 1 to -5 of the effective filename of this stack into myPath
put "/PDFs/etc etc/index.html" after myPath
revGoURL myCD && myPath
else if the platform is "Win32" then
set the itemDel to slash
put item 1 to -5 of the effective filename of this stack into myPath
put "/PDFs/etc etc/index.html" after myPath
revGoURL & myPath
if not (there is a file myPath) then
beep
answer error "Can't find file" && myPath
else
end if
end if
end mouseUp
I tried putting file:// infront but that does nothing. Windows tries to put 'http:' in the browser on previous efforts whereas to view it manually, the browser has the drive letter. But obviously, each PC might have a different cd drive letter?
How can I get Windows to put the right prefix for the browser?
Thanks in advance