Jump to content

Recommended Posts

hi,

i have this script:

Func restore($text)
$obj = ObjGet("winmgmts:{impersonationLevel=impersonate}!root/default:SystemRestore")
$obj.CreateRestorePoint($text, 12, 100)
EndFunc

and i want to make a dll of it. can someone help me. how can i make a dll of this or could someone make a dll of it for me and post it on this topic.

thanks,

Link to post
Share on other sites

hi,

i have this script:

Func restore($text)
$obj = ObjGet("winmgmts:{impersonationLevel=impersonate}!root/default:SystemRestore")
$obj.CreateRestorePoint($text, 12, 100)
EndFunc

and i want to make a dll of it. can someone help me. how can i make a dll of this or could someone make a dll of it for me and post it on this topic.

thanks,

why a dll? if it's just for use with autoit, UDF is a much easier way to go...
Link to post
Share on other sites

what is a UDF? and i want a dll of it because i can use it in other programlanguages.

Link to post
Share on other sites

what is a UDF? and i want a dll of it because i can use it in other programlanguages.

UDF = User Defined Function

You could make an exe with autoit that takes command line arguments to what you want also

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to post
Share on other sites

oke so a UDF is a exe file and queit the same as a dll file, but you can only use UDF's in autoit.

is this right?

if so, how can i make a UDF of the script

Link to post
Share on other sites

oke so a UDF is a exe file and queit the same as a dll file, but you can only use UDF's in autoit.

is this right?

if so, how can i make a UDF of the script

an exe can contain code you want to use and it is not only available to autoit

for example compile the following and call it with a command line


If $CmdLine [0] > 0 Then
   For $x = 1 To $CmdLine [0]
      MsgBox(0, "test", $CmdLine [$x]
   Next
EndIf

[code=auto:0]


            
        

        

        
            

    
        

        
            

    SciTE for AutoItDirections for Submitting Standard UDFs



     



    
        Don't argue with an idiot; people watching may not be able to tell the difference.
    



     


        
    

        
    

    

    
        Link to post
        
            
        
        
        

        
            Share on other sites
            

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

        
    

    

                    
                    
                    
                

                    

                    
                    






    

    

    
        
            


    
        
    

            
        
        
            
                

seandisanti
                

    
        
    
             6
    
        
    

            
            
                Posted 
                
            
        
    
    
        

seandisanti

        
            
                Universalist
            
            

            
                


    
        
    

                
            
            Active Members
            
            
                
                    

    
        
    
             6
    
        
    

                    
                
                2,900 posts

                
                

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            Posted  
            
            
                
                
            
        
    

    


    
        
        
            oke so a UDF is a exe file and queit the same as a dll file, but you can only use UDF's in autoit.is this right?if so, how can i make a UDF of the scriptactually a udf is usually left as an .au3 (or other extension, but still script) file, and then #include<>'d into other scripts, so that the functions contained therein can be accessed as if they were written into the code of the calling program.  You can however turn a UDF into a standalone executable that takes command line parameters, and works with those.  that could be called from any language via the language specific syntax for running executables w/ command line arguments.


            
        

        

        
    

    

    
        Link to post
        
            
        
        
        

        
            Share on other sites
            

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

        
    

    

                    
                    
                    
                

                    

                    
                    






    

    

    
        
            


    
        
    

            
        
        
            
                

Pakku
                

    
        
    
             0
    
        
    

            
            
                Posted 
                
            
        
    
    
        

Pakku

        
            
                Prodigy
            
            

            
                


    
        
    

                
            
            Active Members
            
            
                
                    

    
        
    
             0
    
        
    

                    
                
                178 posts

                
                

            
        
    
    
        



    
        
            
                
                    
                        Author
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            Posted  
            
            
                
                
            
        
    

    


    
        
        
            an exe can contain code you want to use and it is not only available to autoit

for example compile the following and call it with a command line

If $CmdLine [0] > 0 Then
For $x = 1 To $CmdLine [0]
MsgBox(0, "test", $CmdLine [$x]
Next
EndIf
i put it in a script named test.au3

and i compiled it: test.exe

but than what?

a command line is trough DOS isn't it?

what do i have to do?

and

actually a udf is usually left as an .au3 (or other extension, but still script) file, and then #include<>'d into other scripts, so that the functions contained therein can be accessed as if they were written into the code of the calling program. You can however turn a UDF into a standalone executable that takes command line parameters, and works with those. that could be called from any language via the language specific syntax for running executables w/ command line arguments.

when i compile one of my scripts to a exe, how can i call them?
Link to post
Share on other sites

i put it in a script named test.au3

and i compiled it: test.exe

but than what?

a command line is trough DOS isn't it?

what do i have to do?

and

when i compile one of my scripts to a exe, how can i call them?

with autoit you'd call them with Run() Runwait(), with VB it's Shell(), etc etc

and you run them like you would any other program that requires extra arguments....

run("myscript.exe argument1 argument2 argument3")

Link to post
Share on other sites
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...