Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ACC converted to int
#1
I think it can be done but i just cant get it

how can i make an acc, like when you find acc not a acc action = and int

int b=Acc a=acc(

that doesn't seem to work but thats pretty much what i want to do

If anyone could show me an example i would appreciate it
Thanks
#2
I think you have to do a Get* (i.e. location, name, value, role, state...) Then you'll be able to play around with the data...

for example:

Acc a=acc("Check" "CHECKBUTTON" win("Dialog" "#32770") "Button" "" 0x1001)
int state=a.State(0)
out state

If the check box is checked you get "16" when you out int state, unchecked you get 0.

I'm no expert at this stuff...but that's at least what I've figured out for tonight myself.
#3
Acc a=acc(...)
str s=a.Name ;;or Value
int i=val(s)
#4
That doesn't seem to work because after i want to use a
SendMessage code and i need that int for it
#5
Do you need window (control) handle?

Acc a=acc(...)
int hwnd=child(a)
SendMessage hwnd ...
#6
that is very close
what i am trying to click without mouse is a column header of a Paint Program

the column headers are Colors, Transparency, Brushes, etc...

i want to click Brushes

Acc a=acc("Brushes" "COLUMNHEADER" win("PaintShopPro" "#32770") "SysHeader32" "" 0x1101 654 61)

int b=child(a)


SendMessage(b WM_LBUTTONDOWN 1 0)
SendMessage(b WM_LBUTTONUP 0 0)


that is my code, but the problem is it clicks the first column header, colors, it clicks it every time
im not sure why

do you think you could help fix that code?

Thanks
#7
Default action of COLUMNHEADER usually is Click.
Example with Windows Explorer:
Macro
Code:
Copy      Help
act "mp3" ;;the window must be active or DoDefaultAction will not work
Acc a=acc("Album" "COLUMNHEADER" win("mp3" "CabinetWClass") "SysHeader32" "" 0x1001)
a.DoDefaultAction
#8
This works with inactive window.
Macro
Code:
Copy      Help
Acc a=acc("Album" "COLUMNHEADER" win("mp3" "CabinetWClass") "SysHeader32" "" 0x1001)
int x y w h
a.Location(x y w h)
int b=child(a)
ScreenToClient b +&x
x+w/2; y+h/2 ;;center
int xy=(x&0xffff)|(y<<16)
SendMessage(b WM_LBUTTONDOWN 1 xy)
SendMessage(b WM_LBUTTONUP 0 xy)
#9
Thanks so much Gin

The second one was perfect


Forum Jump:


Users browsing this thread: 1 Guest(s)