Sign in to follow this  
Followers 0
lobstersim

How to open HTML file as Text File?

4 posts in this topic

need help

how to open HTML file as text file?

open for editing its source.

I don't see the file pop up when using FileOpen()

thanks in advanced

$message = "Select the HTML file you want to edit"
$filePath = FileOpenDialog($message, "", "HTML Files(*.htm;*.html)")

If @error Then
    Exit
Else
    $file = FileOpen($filePath, 1)
EndIf

Share this post


Link to post
Share on other sites



need help

how to open HTML file as text file?

open for editing its source.

I don't see the file pop up when using FileOpen()

thanks in advanced

$message = "Select the HTML file you want to edit"
$filePath = FileOpenDialog($message, "", "HTML Files(*.htm;*.html)")

If @error Then
    Exit
Else
    $file = FileOpen($filePath, 1)
EndIf
Run("notepad.exe mypage.html")

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

need help

how to open HTML file as text file?

open for editing its source.

I don't see the file pop up when using FileOpen()

you won't see a popup using fileopen() - you need to open the file for reading first, put the contents

in a variable, close the filehandle, make your edits, then write the file back out..

ie

;get filehandle for reading in file
$fh = FileOpen($filename,0)
;get contents of file
$contents = FileRead($fh,FileGetSize($filename))

fileclose($fh)
;do stuff to $contents
;write out new file

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Share this post


Link to post
Share on other sites

thanks flyingboz & cameronsdad for your replies.

really appreciate it ;)

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