Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] check for popup dialog in spreadsheet editor
#1
How do I check for a pop up dialog box?

I tried using window text and accessible object, but neither works.

My problem:

I want to search my spreadsheet for a url. When, it's not found, an error popups with the text "Kingsoft Spreadsheets cannot find the data you're searching for. Please check your searching options."

I'd like to know if that box shows up.

Thanks
#2
I don't have the program to test. If cannot find the text as object, try to find it as image. To create code - dialog 'Find image'.
Or maybe you try to find object too early, immediately when the dialog appears. Try to wait eg 0.5 s.
#3
Thanks. I found a solution by using an err if the error popup window isn't found, which means no duplicate was found.

;this is the code for the spreadsheet
Code:
Copy      Help
int w1=win("" "XLMAIN")
act w1

;this is the code for the find box
int w2=win("Find" "bosa_sdm_XL9")
act w2

;this is the code for the "Kingosft Spreadsheets cannot find the data you're searching for. Please check your search options."
int w=win("Spreadsheets" "QWidget")
act w
err
    key "no dupe"


Forum Jump:


Users browsing this thread: 1 Guest(s)