Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom program widget handling
#1
Hi Gintaras, hi all

I have a program (EZCd converter, poikosoft .com) which seems to have custom controls.

In one part of it, it shows a list of files, and i'd like to get full path of them to act in the directory they belong to,
but it is not a regular widget so I can't find a way. (image 1)

According to toolbar tool with Acc, it a TJamShellList class.

I can code a shell menu item based on flac extension, and then get the correct full path of the file(s) from th custom control, but it's not convenient and I don't know how to
use the shell trigger from code to avoid using the right button menu directly.

How can I get a complete file path from code then?

Thanks.


Attached Files Image(s)
   
#2
Try to send Ctrl+C, then call GetClipboardFiles.
Don't know other ways.
#3
Is it possible to do by code:

1. right click on file
2. jump directly to QM custom shell item for flac (known by name)
3. Press enter
4. Get result of acro to get it's full path?

I don't have a clue to do 2. step...
#4
If you right-click in Windows Explorer with Shift, it will add menu item "Copy as path". It probably depends on Windows language.
Macro Macro1867
Code:
Copy      Help
;---- Recorded 2014.01.14 11:06:51 ----
int w1=act(win("test" "CabinetWClass"))
'S{             ;; Shift+{
rig 298 508 w1 1 ;;list 'Items View'
'}              ;; }
int wMenu=wait(6 WV win("" "#32768"))
;--------------------------------------
str s.setclip ;;empty clipboard
Acc a.Find(wMenu "MENUITEM" "Copy as path")
a.DoDefaultAction
;;;wait for clipboard text, because in this case DoDefaultAction is asynchronous
rep 500
,0.01
,s.getclip
,if(s.len) break
s.trim("''")
out s
Similar code would be if you use a QM shell menu trigger instead of "Copy as path". The shell menu macro should be function, to avoid problems when 2 macros cannot run simultaneously.
#5
Yep, this helps, though the Ca Cc way does the job too.

is it possible to store the raw clipboard content before calling my function and restore it after doing code,
so it it transparent for clipboard content the manipulations I did?

By RAW, I mean retore the clipboard as it was before I used it, whatever it contained???
#6
Can save/restore clipboard text with getclip/setclip. To save other clipboard formats - very much work, and I think not everything/always possible.
Better use a shell menu trigger that stores file path in a global str variable, not in clipboard. As always with shared global str variables, use lock.
#7
Ok, will work on that.
Perfect support as always, cheers G.


Forum Jump:


Users browsing this thread: 1 Guest(s)