Sign in to follow this  
Followers 0
zellis

opening a simple file please help

2 posts in this topic

my excuese is that im new to auto it. :">

the plan is to automaticly generate a file named token.dat, write some data and then save and close the file. (no user input, all done in the background)

$test = "Saving DAT file"
$file = FileOpendialog ($test, "c:\ipu_final_config\", "DAT files (*.dat)" ,8, "token.dat")     
send ("!o") ; Check if file opened for writing OK
send ('Y')
FileWrite($file, "Generated by IPU setup tool// " & @CRLF & "DO NOT MODIFY!" & @CRLF & @CRLF)
FileWrite($file, "test line 1")
filecloese


why does this not work? am i using the a wrong function?

thanks 
shawn


            
        

        
            
                

    
        
            
        
    


            
        

        
            
                
                
                
            
            
                
            
        
        
    

    
        
            Share this post
            
Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    


    

                    
                        





(adsbygoogle = window.adsbygoogle || []).push({});




                    
                
                    
                    
                    






    
    
        
Jos   

    
        
    
             1,114
    
        
    

        
            
                Je maintiendrai
            
            

            
                

    
        
    

            
            Developers
            
                
            
            
                

    
        
    
             1,114
    
        
    

                27,477 posts
                
                

            
        
    
    
        


    

    
        
            
            
                
            
            
        

        
    #2 · 
            Posted 
            
                (edited)
            
            
            
        
    

    


            
        
            my excuese is that im new to auto it.  :">          
the plan is to automaticly generate a file named token.dat, write some data and then save and close the file. (no user input, all done in the background)

 

$test = "Saving DAT file"

$file = FileOpendialog ($test, "c:\ipu_final_config\", "DAT files (*.dat)" ,8, "token.dat")

send ("!o") ; Check if file opened for writing OK

send ('Y')

FileWrite($file, "Generated by IPU setup tool// " & @CRLF & "DO NOT MODIFY!" & @CRLF & @CRLF)

FileWrite($file, "test line 1")

filecloese

why does this not work? am i using the a wrong function?

thanks

shawn

Have a look at the helpfile example of FileWrite() ...
Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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