Jump to content

Recommended Posts

Posted

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")
Posted

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")
Posted

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.

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
×
×
  • Create New...