Jump to content

How to avoid windows pop-ups like "save as" in a script?


Recommended Posts

Hi,

I've a code lite this:

1)Save data setas an excel file (raw.xls) from a software program called gx developer.

2)Open excel file "raw.xls"

3)read values from "raw.xls" into an array

4)copy array to a new row in another excel file "data.xls"

these steps are looped 100 times

I've set the raw.xls to invisible with the code

CODE

$oExcel.Visible = 0 ;raw.xls

$oExcel2.Visible = 1 ;data.xls

step 1) above involves

CODE

COntrolSend ("Save As","","","C:\raw.xls")

sleep(100)

ControlSend("Save As","","","{ENTER}")

sleep(100)

ControlSend("Save As","","","!y")

sleep(100)

The problem is that the "save as" pop up windows appears in fron of the excel file even though I use controlSend which is annoying. IS there a way of making these "save as/replave file" pop-up NOT Visbile like running in the background?

Best regards

Andy

Link to comment
Share on other sites

Thanks for your reply.

I wasn't completely clear in my problem statement.

In step 1) (See original post)

The program running is NOT EXCEL. It's a program called Developer and the data can be saved as an excel file.

I hope this makes my problem more clear!

Looking forward to your replies

Link to comment
Share on other sites

Hi,

I guess I dind't highlight my problem good enough.

My question is, How can I "suppress" (run in the background) pop-ups like "SAVE AS" from any windows application? I've tried ControlSend as seen above but it doesn't work.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

I guess I dind't highlight my problem good enough.

My question is, How can I "suppress" (run in the background) pop-ups like "SAVE AS" from any windows application? I've tried ControlSend as seen above but it doesn't work.

Maybe adding this after your "click" event may help:

ControlSend($hwnd, "", "", "!s")

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