Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need some help
#4
Hi. For similar cases in the future you can use regular expressions (which is a powerful and versatile way to define a string) or wildcard characters. The program will acknowledge you intend to use one of these if you add the right flags.

Related info from the page "Find window (get handle); compare properties", in the help document:
flag "1":
name is full or with wildcard characters (*?).
For example, if window name must end with " - Notepad", use "* - Notepad" and flag 1. If it must be exactly "Notepad", use "Notepad" and flag 1.
String "*" matches windows with no name.


For example, for the name you could use this:

"Linnworks - Order Management - Release*"

or

"Linnworks - Order Management*"

but for these two you will have to add the exename and the flags. It's easy but if you don't understand how to do it, ask here.

Have in mind that, if you use the "Find window or control" dialog (and some other ones), after you fill some of the fields you can test whether the information you have entered is accurate enouph or not for the macro to find (during the present conditions) the window (or the child window, or the accessible object, depending on the dialog). That is, you put some values in the dialog's fields - either manually or by using the "Drag" tool - and then you click at the "test" button. If it can find it with the info you have entered, a black rectangle will flicker about 5 times arround the object you try to "describe". If it can't find it, you will see a warning message - in this case you can edit the fields and try again.

Plus when you need to replace or just find some text in one or many macros (e.g. replace "Linnworks - Order Management - Release 4 - 4.1.1.1 - 467" with "Linnworks - Order Management - Release 4 - 4.1.1.1 - 468" or with "Linnworks - Order Management*") you can do it very easily with the "Find" pane; it's very-very useful!

Also, if you have (or intend to have) more macros that use the Linnworks window you could create a function that finds it and returns its handle. Then, where you need the handle, you can enter just the function's name and, if they change the text of the window again, you will have to make a change only to this function and not to all the macros and functions that use it.
OS: Windows XP Home Edition SP2
Memory: 1024 MB (1016 MB system + 8 MB video)
Virtual Memory: 2.00 GB
CPU: 1.60 GHz


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)