Sign in to follow this  
Followers 0
Guest Franz

Whats wrong on this script?

7 posts in this topic

Hi all!

This script show the Window "Adobe Acrobat Professional" (Line 5) but do not send the "Send("^n")" - (Line 6) :D .

Sometimes it works, but mostly it dosnt! I try to include some sleep-statements, but it dosnt work.

The Line 4: WinWait("Adobe Acrobat Professional") is also a Test Line.

Run("C:\Programme\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe")
WinWaitActive("Willkommen") ;its the first Window
Send("&Start{ENTER}")
WinWait("Adobe Acrobat Professional") ;its the second Window
WinWaitActive("Adobe Acrobat Professional")
Send("^n") 
WinWaitActive("Öffnen") ;its another Window
Send("C:\InfoTeam\OIS\207\Produktion\100\80.rtf")
Send("{ENTER}")
WinWaitActive("Adobe Acrobat Professional - [80.pdf]")
Send("+^s")
WinWaitActive("Speichern unter")
Send("{ENTER}")
ProcessClose("Acrobat.exe")

Who can help me?

Thanks


            
        

        
            
                

    
        
            
        
    


            
        

        
            
                
                
                
            
            
                
            
        
        
    

    
        
            Share this post
            
Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    


    

                    
                        





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




                    
                
                    
                    
                    






    
    
        
emmanuel   

    
        
    
             0
    
        
    

        
            
                No one ever accused me of being normal.
            
            

            
                

    
        
    

            
            Active Members
            
            
                

    
        
    
             0
    
        
    

                1,107 posts
                
                

            
        
    
    
        


    

    
        
            
            
                
            
            
        

        
    #2 · 
            Posted 
            
            
            
        
    

    


            
        
            try a control send instead of the send, it may just be caught by some other app or something annoying...


            
        

        
            
                

    
        
            
        
    


            
        

        
            
                
                
                
            
            
                
            
        
        
            




  
  
    "I'm not even supposed to be here today!" -Dante (Hicks)
  


        
    

    
        
            Share this post
            
Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    


    

                    
                
                    
                    
                    






    
    
        
emmanuel   

    
        
    
             0
    
        
    

        
            
                No one ever accused me of being normal.
            
            

            
                

    
        
    

            
            Active Members
            
            
                

    
        
    
             0
    
        
    

                1,107 posts
                
                

            
        
    
    
        


    

    
        
            
            
                
            
            
        

        
    #3 · 
            Posted 
            
            
            
        
    

    


            
        
            It worked for me, I had to change it a bit, for language and my having acrobat standard.  I didn't have any issues with the ctrl-shift-s though it left it at the prompt to overwrite the existing file?  don't you want to rename it before the enter and wait for the save to complete before proccessclosing acrobat?  WinClose might be friendlier for that...

Run("C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe")
;WinWaitActive("Welcome");I don't get this window.
;Send("&Start{ENTER}")
WinWait("Adobe Acrobat Standard");its the second Window
WinWaitActive("Adobe Acrobat Standard")
Send("^n") 
WinWaitActive("Open");its another Window
Send("_Hahmolomake.pdf")
Send("{ENTER}")
WinWaitActive("Adobe Acrobat Standard - [_Hahmolomake.pdf]")
Send("+^s")
WinWaitActive("Save As")
Send("{ENTER}")
;ProcessClose("Acrobat.exe")

"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

Sometimes a window is activated without the controls being enabled, so you could have a timing issue here.

Maybe a sleep(.....) after the WinWaitActive helps...


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

Share this post


Link to post
Share on other sites

Hi emmanuel!

Your script is only the transscription into the english version. I have the german trial version.

Hi Jedb!

I try this before, it doesnt work.

I think it faults on my trial version.

So i try to get another Program, that works properly.

Thanks for your pain.

Franz

Share this post


Link to post
Share on other sites

Hi emmanuel!

Your script is only the transscription into the english version. I have the german trial version.

Hi Jedb!

I try this before, it doesnt work.

I think it faults on my trial version.

So i try to get another Program, that works properly.

Thanks for your pain.

Franz

Pain? :ph34r:

I think you mean:

Thanks for your time.

Share this post


Link to post
Share on other sites

Hi SlimShady!

Yes I mean 'Thanks for your time'.

Sorry for my bad english. :ph34r:

Again thanks for your time.

Franz

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