Sign in to follow this  
Followers 0
Swimming_Bird

File isnt being written to until script is done

9 posts in this topic

This is the UDF i'm using

Global $fileloc = "c:\sig.html"

Func _PlainHTML ( $address , $branch , $name , $title, $department , $phone , $fax , $email , $registered )
; the 2 flag designates that it will overwrite any info currently in the target file.
    Local $file = FileOpen ( $fileloc , 2 )
    FileWriteline ( $file , "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">" )
    .....
    writing some more html to be written
    .....
    Return ( $fileloc )
EndFunc

Then in my script i call it like this

If $plainb = 1 Then
    $sigloc = _PlainHTML ( $address , $branch , $name , $title, $department , $phone , $fax , $email , $registered )
    $type = "Plain Signature"
ElseIf $fbropenb =1 Then
    $sigloc = _FBROpenHTML ( $address ,$branch , $name , $title, $department , $phone , $fax , $email , $registered )
    $type = "FBROpen 2006 Signature"
ElseIf $investorb = 1 Then
    $sigloc = _FBRInvHTML ( $address , $branch , $name , $title, $department , $phone , $fax , $email , $registered )
    $type = "FBR Investor Conf 2005 Signature"
EndIf

and later on in the script i have it added to outlook but when it enters $sigloc into the destination the file exists but is empty. After the script is done however the file is written as intended.

Share this post


Link to post
Share on other sites



I'm pretty sure FileInstall is the only way...


FootbaG

Share this post


Link to post
Share on other sites

the issue with that is i cant get it to use a temp directory. i cant even get it to open a file in a temp directory. basically when i set the images to be in "@tempDir & "\Sigstuff\files" it doesnt like it, it also doesnt like it when i try to open "@tempDir & "\Sigstuff\sig.html""

Share this post


Link to post
Share on other sites

the issue with that is i cant get it to use a temp directory. i cant even get it to open a file in a temp directory. basically when i set the images to be in "@tempDir & "\Sigstuff\files" it doesnt like it, it also doesnt like it when i try to open "@tempDir & "\Sigstuff\sig.html""

<{POST_SNAPBACK}>

what errors dod you get? Is it a permissions issue? Do the directories exist? Are there files already in there, being held open by another program/process?

Share this post


Link to post
Share on other sites

directory does not already exist, the error i'm getting is that the files are not copied at all.

Share this post


Link to post
Share on other sites

OK, so what happens when you create the directories before copying the files? Do you still get the same error?

Which function is returning the error, and what is the error code?

Share this post


Link to post
Share on other sites

figured out the error, stupid me assumed that it would make the directory for me. i have to manually make 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