Sign in to follow this  
Followers 0
andy09

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

5 posts in this topic

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

Share this post


Link to post
Share on other sites



Why not using _ExcelBookSaveAs() from Excel UDF ?


Best Regards BugFix  

Share this post


Link to post
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

Share this post


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

Share this post


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

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

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

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  
Followers 0