Jump to content

Excel Error


Guest rich
 Share

Recommended Posts

I have the following script:

run("c:\program Files\Microsoft Office\office\EXCEL.EXE ""c:\lookup.xls""")

When I run it from the command line or compiled on an unlocked workstation it works fine.

If I run the script on a locked workstation from the command line or compiled it will run, however I get the following error: Noy enough system resources to display completely.

I am using Windows XP SP1 as the OS (Have tried SP2 wit no luck), I have tried on Office 2000 and Office Xp both failing.

The Version of Autoit is 3.0.101.0 also used 3.0.102 with no luck

Any ideas on how to run Excel or open the file a different way.

Link to comment
Share on other sites

Use the following provided code.

Dim $path = "C:\Documents and Settings\JSThePatriot\My Documents\"
Dim $excel = "lookup.xls"

Run(@ComSpec & " /c " & $path, "",@SW_HIDE)
Run(@ComSpec & " /c start /max " & $excel, "",@SW_HIDE)

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Use the following provided code.

Dim $path = "C:\Documents and Settings\JSThePatriot\My Documents\"
Dim $excel = "lookup.xls"

Run(@ComSpec & " /c " & $path, "",@SW_HIDE)
Run(@ComSpec & " /c start /max " & $excel, "",@SW_HIDE)

JS

<{POST_SNAPBACK}>

JS, the first run command with the $path isn't doing what you think it's doing. use FileChangeDir dir that, the actions from one @comspec call doesn't effect another one. It'd be better just to have the full path specified along with the start command.

Run(@ComSpec & " /c start /max " & $path & $excel, "",@SW_HIDE)

Though all of this really ends up starting it all in the same way, telling Excel to open the file, and I bet if you had a batch file that opened the excel file while the machine was locked it'd have the same effect, that it's a bug in the excel file or excel itself.

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

Link to comment
Share on other sites

OH... hrm I thought I had used that before and it worked for me... odd...

Thanks for the heads up,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

OH... hrm I thought I had used that before and it worked for me... odd...

Thanks for the heads up,

JS

<{POST_SNAPBACK}>

yeah, that's like opening a cmd window, changing directories, opening another window and typing the start command. they don't see each other.

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

Link to comment
Share on other sites

Yea I thought so too... but for some reason it worked for me :-P or maybe I just thought it did... I know why it doesnt work and even as I wrote that out I was thinking to myself hmm this doesnt logically work but I went ahead and posted it.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

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