Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
get file data on middle click
#1
i try to get the file selected in windows explorer without
using right click (context menu).

with Accessible objects i can get the selected file when x and y are
activated.

but it doesn't work when i use Cursor coordinates relative to window.

when i change int l to 392 instead of 393 i get an object not found error.

Code:
Copy      Help
int hwnd=win("" "ExploreWClass")
POINT p
xm p hwnd
int l = 393
Acc a=acc("" "LISTITEM" "PowerPro_web" "SysListView32" "" 0x1100 l 407)
str name=a.Name
str value=a.Value
out name

out "Cursor coordinates relative to window ''Quick'' are:[]x=%i y=%i" p.x p.y

how can i use mouse position there ?
pi
#2
here is an alternative version:

Code:
Copy      Help
lef;
int hwnd=win("" "ExploreWClass")
Acc adr=acc("Adresse" "TEXT" hwnd "Edit" "" 0x1801 0x0 0x20000040)
str path=adr.Value
0.4
str selected.getsel
key Z
path.format("%s\%s" path selected)
out path
pi
#3
Code:
Copy      Help
[color=blue]int [/color]hwnd=[color=blue]win[/color](mouse); [color=blue]str [/color]s.getwinclass(hwnd)
[color=blue]if[/color](s~"ExploreWClass"=0 [color=blue]and [/color]s~"CabinetWClass"=0 [color=blue]and [/color]s~"Progman"=0) [color=blue]ret[/color]
Acc a=[color=blue]acc[/color](mouse)
[color=blue]if[/color](!a.a [color=blue]or [/color]![color=blue]acctest[/color](&a "" "LISTITEM" 0 "SysListView32")) [color=blue]ret[/color]

[color=blue]out [/color]a.Name

but without path.
#4
thanks !
pi


Forum Jump:


Users browsing this thread: 1 Guest(s)