Trying to create a screen scraping macro that captures text from text boxes on a web-based form and then writes that data to a db. I'm just starting out here. Here is the code I have so far:
//Recorded Events
//Recorded Events
Let>WW_TIMEOUT=5
CapsOff
//Set focus to Appointment Scheduling--------------------------------
SetFocus>Appointment Scheduling*
WaitWindowOpen>Appointment Scheduling*
//Get window position and move mouse to the correct field------------
GetWindowPos>Appointment Scheduling*,WindowX,WindowY
Let>PosX=WindowX+220
Let>PosY=WindowY+191
Wait>0.2
MouseMove>PosX,PosY
Wait>0.2
LClick
Wait>0.8
GetTextInRect>220,191,LastName
MessageModal>LastName
With 220,191 being the X,Y point of the beginning of the text box. When the msg box pop up. It has no data. Any help would be greatly appreciated.
Thanks.
-brentmtc
GetTextInRect
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
GetTextIRect requires four points - it gets text from a rectangle. From the help file:
GetTextInRect>220,191,RIGHT,BOTTOM,LastName
These are screen coordinates.
So you need to add the right and bottom coordinates:GetTextInRect>left,top,right,bottom,result_variable
Retrieves text found in the screen rectangle bound by coordinates left,top and right,bottom.
GetTextInRect>220,191,RIGHT,BOTTOM,LastName
These are screen coordinates.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
GetTextInRext
Still nothing in msg box. Do I need the left, top,right,bottom of each txt box with many GetTextInRect> code blocks for each txt box?
GetTextInRect>220,191,892,448,LastName
MessageModal>LastName
Thanks.
-brentmtc
GetTextInRect>220,191,892,448,LastName
MessageModal>LastName
Thanks.
-brentmtc
-
- Macro Veteran
- Posts: 252
- Joined: Fri Apr 15, 2005 8:32 am
Same issue here. The result variable for GetTextInRect occasionally seems to be empty. This is a recurring, random issue for me. Will do some research on the forums.
(MS 10.1.21e. Have GetWordNT.dll and ICall.dll in the MS root dir.)
Will continue my updates here.
http://www.mjtnet.com/forum/viewtopic.php?p=21584#21584
(MS 10.1.21e. Have GetWordNT.dll and ICall.dll in the MS root dir.)
Will continue my updates here.
http://www.mjtnet.com/forum/viewtopic.php?p=21584#21584