Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timeout for calls blocked by modal windows? #8

Open
randomee opened this issue Sep 28, 2016 · 5 comments
Open

timeout for calls blocked by modal windows? #8

randomee opened this issue Sep 28, 2016 · 5 comments

Comments

@randomee
Copy link

If I cause excel to pop up a question dialog box, excel.link calls hang until I dismiss that excel window.

Would it be possible to add a timeout to these calls? I know I'd have to catch the error, but that's better than a hung connection.

(I'm using excel & rserve for remote access to data in excel workbooks. so there may not be anyone at the screen to click on the dialog box.)

@gdemin
Copy link
Owner

gdemin commented Sep 28, 2016

By now I don't know how it can be done. And, secondary, timeout may cause problems in case of long operations with large amounts of data.

@randomee
Copy link
Author

As to how, I'm not much help. I assume it might be better exposed via RDCOM?

But for the long processing, I agree that it should not be turned on by default. If someone has a timeout that's too short, they did it to themselves. So that part does not bother me.

@randomee
Copy link
Author

Not sure if this is useful, but here are some links about dealing with modal windows & prompts.
https://msdn.microsoft.com/en-us/library/office/ff839782.aspx
http://thebuildingcoder.typepad.com/blog/2009/10/dismiss-dialogue-using-windows-api.html

@gdemin
Copy link
Owner

gdemin commented Oct 30, 2016

Thank you for the links. I will read them.
I think the most realistic way to implement timeouts is to make C code inside package compatible with base R function setTimeLimit. So one can write setTimeLimit(elapsed = 10) to set timeout to 10 seconds for further operation with Excel.

@randomee
Copy link
Author

randomee commented Nov 2, 2016

Having not played with it, I'd guess that would leave excel in a hung state as well. The current call would return, but with no/bad data, and no way to get back in excel. (short of a system() call to kill the excel process.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants