Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I select a tab then a text box on that Tab ?
#1
I am trying to select “Link” Tab from the following Visual Studio 6 “Project Settings” dialog window.
With the following code I don’t get the expected behavior of left clicking on the “Link” tab to make it
Active and visible on top, then input data in the “Output file name:” textbox

If the default tab “General” is selected when dialog open my code below does not select the “Link” tab, then
Then “Output file name” textbox. What am I doing wrong ?

See attached image of dialog

QuickMacro Code:
;; Open Project Settings Menu Dialog
men(34048 win("Microsoft Visual C++"))
;;Select Link Tab
SelectTab(child("Link" "#32770" win("Project Settings" "Afx:400000:3:10013:10:*" "" 0x800) 0x1) 3)
;;Insert new Path in "Output file name:" text box
_s="c:\PATH"; _s.setwintext(id(19158 win("Project Settings" "Afx:400000:3:10013:10:*" "" 0x800)))


Warm Regards,

Edward


Attached Files
.zip   VS project settings screenshot.zip (Size: 51.55 KB / Downloads: 272)
#2
There is no real tab control. The control is a child dialog. Use keyboard or mouse.

Macro Macro1621
Trigger F12     Help - how to add the trigger to the macro
Code:
Copy      Help
;; Open Project Settings Menu Dialog
men(34048 win("Microsoft Visual C++"))
int w=wait(5 win("Project Settings" "" "" 0x808))
;;Select Link Tab
;press Ctrl+Tab until Link tab visible
rep 15
,int ppLink=child("Link" "#32770" w)
,if(IsWindowVisible(ppLink)) break
,key CT
;;Insert new Path in "Output file name:" text box
int c=id(19158 ppLink)
_s="c:\PATH"; _s.setwintext(c)
#3
int w=wait(5 win("Project Settings" "" "" 0x808))

in your code above I get a Error (RT) in Macro: wait timeout

not shure why I'm getting that since the Project Settings Dialog is opened by the code above this line

Thanks for showing me new ways to manipulate the controls and windows
#4
Maybe the dialog is not activated when opened with men. The wait function waits until the window is active.

Also try to remove flags:

int w=wait(5 win("Project Settings"))


Forum Jump:


Users browsing this thread: 1 Guest(s)