Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
filezilla copy url
#1
filezilla has no option for copy remote file(s) as web url (my ftp server is well structured, each domain has a folder)
so i show a custom menu with my options on mouse middle click.
i found out that using match in acc is helping a lot.
currently it does work as expected when one file is selected.
but how do i get the selected items of the SysListView32 i spot?
Macro filezilla
Code:
Copy      Help
out
Acc m=acc(mouse)
str file = m.Name
;out m.Name
int w=win("* - FileZilla" "wxWindowClassNR" "" 0x5)
Acc aSelectedFiles.Find(w "LIST" "" "class=SysListView32" 0x4 0 3)

out "how to get selected items of SysListView32 when using acc?"




Acc aFolder.Find(w "COMBOBOX" "" "class=ComboBox" 0x1004 0 2)
;out aFolder.Value
str folder.gett(aFolder.Value -1 "/" )
str path.gett(aFolder.Value 1 "/" 2)


sel PopupMenu("Copy URL[]Delete")
,case 1
,,_s.format("http:/%s.com/%s/%s" folder path file)
,,out _s
,,err
,case 2
,,out "delete"
,,;key X
,,;int hwnd=win("Bestätigung erforderlich" "#32770")
,,;
,,;wait 0 WC hwnd
,,;but id(6 hwnd)
,,;wait 0 WC win("FileZilla" "#32770")
,,;but id(6 win("FileZilla" "#32770"))

Confusedhock: :roll: Tongue
pi
#2
i got it working, but please give input.

Macro filezilla
Code:
Copy      Help
out
int w=win("* - FileZilla" "wxWindowClassNR" "" 0x5)
Acc aSysListView32.Find(w "LIST" "" "class=SysListView32" 0x4 0 3)
ARRAY(Acc) files; int i
aSysListView32.Selection(files)

Acc aFolder.Find(w "COMBOBOX" "" "class=ComboBox" 0x1004 0 2)
;out aFolder.Value
str folder.gett(aFolder.Value -1 "/" )
str path.gett(aFolder.Value 1 "/" 2)


sel PopupMenu("Copy URL[]Delete")
,case 1
,,for i 0 files.len
,,,_s.formata("http:/%s.com/%s/%s[]" folder path files[i].Name)

,case 2
,,out "delete"
,,;key X
,,;int hwnd=win("Bestätigung erforderlich" "#32770")
,,;
,,;wait 0 WC hwnd
,,;but id(6 hwnd)
,,;wait 0 WC win("FileZilla" "#32770")
,,;but id(6 win("FileZilla" "#32770"))

out _s
pi
#3
shows text of selected listview control items, first column
Macro Macro1874
Code:
Copy      Help
int w=win("FileZilla" "wxWindowClassNR")
int c=child("" "SysListView32" w 0 0 0 3)
Acc a.Find(c "LIST" "" "" 0x1004)
ARRAY(int) asi; int i
LvGetSelectedItems c asi
for i 0 asi.len
,a.elem=asi[i]+1
,str s=a.Name
,out s

LvGetSelectedItems is in Archive.qml. If don't have, here it is:
Function LvGetSelectedItems
Code:
Copy      Help
;/
function! hlv ARRAY(int)&a

;Populates a with indices of selected items of listview control.
;Returns 1 if there are selected items, 0 if not.


a=0
int i=-1
rep
,i=SendMessage(hlv LVM_GETNEXTITEM i LVNI_SELECTED)
,if(i<0) break
,a[]=i

ret a.len!0

Note that other related functions from Archive.qml don't work with controls of other processes.


Forum Jump:


Users browsing this thread: 1 Guest(s)