Swimming_Bird Posted July 6, 2005 Share Posted July 6, 2005 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. Link to comment Share on other sites More sharing options...
blindwig Posted July 6, 2005 Share Posted July 6, 2005 DId you ever close the file? My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
Swimming_Bird Posted July 6, 2005 Author Share Posted July 6, 2005 d'ohThank you guys so much! one bird down one to go, my script will be done soon as i can figue out how to bring my images with my compiled scripthttp://www.autoitscript.com/forum/index.php?showtopic=13237 Link to comment Share on other sites More sharing options...
layer Posted July 6, 2005 Share Posted July 6, 2005 I'm pretty sure FileInstall is the only way... FootbaG Link to comment Share on other sites More sharing options...
Swimming_Bird Posted July 6, 2005 Author Share Posted July 6, 2005 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"" Link to comment Share on other sites More sharing options...
blindwig Posted July 6, 2005 Share Posted July 6, 2005 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? My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
Swimming_Bird Posted July 6, 2005 Author Share Posted July 6, 2005 directory does not already exist, the error i'm getting is that the files are not copied at all. Link to comment Share on other sites More sharing options...
blindwig Posted July 6, 2005 Share Posted July 6, 2005 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? My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
Swimming_Bird Posted July 6, 2005 Author Share Posted July 6, 2005 figured out the error, stupid me assumed that it would make the directory for me. i have to manually make it. 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