Jump to content

Whats wrong on this script?


Guest Franz
 Share

Recommended Posts

Guest Franz

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


            
        

        

        
    

    

    




    Link to comment
    
        
    
    
    

    
    Share on other sites
    

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    


    
    More sharing options...

    


    

                    
                    
                    
                

                    

                    
                    





    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


emmanuel
            
            
                Posted 
                
            
        
    
    
        


emmanuel
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 1.1k
                            
                                
                            
                        
                        
                    
                
            
            
                

    
    
        
No one ever accused me of being normal.
    
    

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            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)
        
    

        
    

    

    




    Link to comment
    
        
    
    
    

    
    Share on other sites
    

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    


    
    More sharing options...

    


    

                    
                    
                    
                

                    

                    
                    





    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


emmanuel
            
            
                Posted 
                
            
        
    
    
        


emmanuel
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 1.1k
                            
                                
                            
                        
                        
                    
                
            
            
                

    
    
        
No one ever accused me of being normal.
    
    

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            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)

Link to comment
Share on other sites

  • Developers

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...

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

  • 2 weeks later...
Guest Franz

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

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

Link to comment
Share on other sites

Guest Franz

Hi SlimShady!

Yes I mean 'Thanks for your time'.

Sorry for my bad english. :ph34r:

Again thanks for your time.

Franz

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...