Jump to content

Recommended Posts

Posted

Hidey ho everyone,

I'm a noob :) (yet not so noob). Been following the site for a while, and have gotten most of the answers i needed from searching previous posts... But this is my first actual post.

I'm stuck, i have an editbox which i'm outputting dos commands into using stdout.

Thats not the issue, what i'm trying to do is save the output that is in the editbox to a text file.

What i got so far is below... I just dont know what to put into the DoSave function to make it actually save the file. Any help would be great!! :D

Many thanks!!

Func Save()$fsave = FileSaveDialog( "Save File...", $MyDocs, "Text File (*.txt)", 3 )    if @error=0 Then   DoSave()    EndIfEndFunc


            
        

        

        
    

    
    

    

                    
                    
                        
                            


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

                        
                    
                    
                

                    

                    
                    






    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


buzz44
            
            
                Posted 
                
            
        
    
    
        


buzz44
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 1.3k
                            
                                
                            
                        
                        
                    
                
            
            
                

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
           
           Posted 
           
            
            
                
                
            
        
    

    

    

    
        
        
            Use INIWrite or RegWrite()


            
        

        

        
            

    
        

        
            
    qq

        
    

        
    

    
    

    

                    
                    
                        
                    
                    
                

                    

                    
                    






    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


zeroZshadow
            
            
                Posted 
                
            
        
    
    
        


zeroZshadow
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 414
                            
                                
                            
                        
                        
                    
                
            
            
                

    
    
        
Autoit Veteran
    
    

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
           
           Posted 
           
            
            
                
                
            
        
    

    

    

    
        
        
            $output = GuiCtrlRead(*ur editbox*)

FileWrite ($fsave, $output)


that would work i think


            
        

        

        
            

    
        

        
            
*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...

        
    

        
    

    
    

    

                    
                    
                        
                    
                    
                

                    

                    
                    






    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


buzz44
            
            
                Posted 
                
            
        
    
    
        


buzz44
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 1.3k
                            
                                
                            
                        
                        
                    
                
            
            
                

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
           
           Posted 
           
            
            
                
                    (edited)
                
                
            
        
    

    

    

    
        
        
            I would use INIWrite(). If your logging data then yes, I would use FileWrite(), but if your wishing to use this data again, later in your script, or upon execution of your script I would use INIWrite() / INIRead().


            
                


    Edited  by Burrup
    
    

            
        

        

        
            

    
        

        
            
    qq

        
    

        
    

    
    

    

                    
                    
                        
                    
                    
                

                    

                    
                    






    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


Nossy
            
            
                Posted 
                
            
        
    
    
        


Nossy
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Members
                
            
            
                
                    
                        
                            
                                
                            
                                 5
                            
                                
                            
                        
                        
                    
                
            
            
                

            
        
    
    
        



    
        
            
                
                    
                        Author
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
           
           Posted 
           
            
            
                
                
            
        
    

    

    

    
        
        
            
Hello again...

I'm confused more now, i cant see how the iniread/write would work, i guess i just dont ge the details  

Well, heres what i've re-written (without referring to another function inside this one).

$fsave = FileSaveDialog( "Save File...", $MyDocs, "Text File (*.txt)", 3 )
    if @error=0 Then
        $output=GuiCtrlRead($EditBox)
        FileWrite=($fsave, $output)
        FileClose($file)
    else
        msgbox(0, "Error", "Please write or select a filename")

But i get an error on the FileWrite line.

FileWrite=($fsave, $output)

^ ERROR

Error: Error parsing function call

Can anyone help me out with this one? I think it should work myself, but i'm clueless at this stage!

Many thanks!!

Nos

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
  • Recently Browsing   0 members

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