Jump to content
Sign in to follow this  
Meymoon

ControlSend not working

Recommended Posts

Meymoon

I'm just starting to mess with AutoIt and pretty much copied this code from the examples provided (in the help documentation) for ControlSend.

Unfortunately something isn't right and I can't figure it out.

Any help is greatly appreciated.

; Start OpenOffice and open Magic Set Spreadsheet
Run("C:\Program Files\OpenOffice\program\scalc.exe")
WinWaitActive("Untitled 1 - OpenOffice.org Calc")
Send("!f!o")
WinActivate("Open","Look in")
ControlSend("Open","","[CLASS:Edit; INSTANCE:1]","C:\Documents and Settings\mainuser\My Documents\Magic\MTGO Sets.ods")

Share this post


Link to post
Share on other sites
LarryDalooza

After...

Send("!f!o")

... you aren't waiting for anything.

Lar.


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
Share on other sites
Meymoon

After...

Send("!f!o")

... you aren't waiting for anything.

Lar.

Tried this too.. Not working either.

; Start OpenOffice and open Magic Set Spreadsheet
Run("C:\Program Files\OpenOffice\program\scalc.exe")
WinWaitActive("Untitled 1 - OpenOffice.org Calc")
Send("!f!o")
WinActivate("Open","Look in")
ControlSend("Open","","[CLASS:Edit; INSTANCE:1]","C:\Documents and Settings\mainuser\My Documents\Magic\MTGO Sets.ods")

Share this post


Link to post
Share on other sites
Meymoon

Is there a way to simply open the file outright?

That seems like it would be easier, but the only file opening function I could find is FileOpen and that's for text files only it seems.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.