Jump to content

opening a simple file please help


zellis
 Share

Recommended Posts

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


            
        

        

        
    

    

    




    Link to comment
    
        
    
    
    

    
    Share on other sites
    

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    


    
    More sharing options...

    


    

                    
                    
                    
                

                    

                    
                    





    

    
        
            
                
                    Developers
                
                
                
                
            
        
    

    
        
            
                


    
        
    

                
                
                
                
                    
                        

                    
                
            
        
        
            
                


Jos
            
            
                Posted 
                
            
        
    
    
        


Jos
            
        
        
            
                
                    


    
        
    

                    
                        
                    
                    
                        

                    
                
            
            
                Developers
                
                    
                
            
            
                
                    
                        
                            
                                
                            
                                 34.3k
                            
                                
                            
                        
                        
                            
                                
                                    
                                        
                                        156
                                
                                    
                                
                            
                        
                    
                
            
            
                

    
    
        
Je maintiendrai
    
    

            
        
    
    
        



    
        
            
                
                    
                    
                        Developers
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...