Вверх ↑
Ответов: 57
Рейтинг: 0
#1: 2016-07-21 19:22:40 ЛС | профиль | цитата
вот такой вариант получился - отображает имя и путь к файлу или папке на рабочем столе , но папку можно изменить ...
возможно если в InlineCode покавырять то будет казать любой файл и папку как на рабочем столе
так и в проводнике .
Add(MainForm,4053814,61,84)
{
Width=600
Height=126
Color=-16777216
Caption="File on the Desktop"
BorderStyle=3
Position=1
Point(onClose)
link(onCreate,3695030:doEvent1,[])
link(onClose,4565006:doStopWatch,[(122,111)(122,132)])
}
Add(Label,11373442,336,273)
{
Top=30
Width=600
Height=20
Color=255
Font=[MS Sans Serif,10,1,0,1]
Caption="---"
AutoSize=1
Alignment=2
}
Add(Label,12913422,476,126)
{
Top=80
Width=600
Height=20
Color=255
Font=[MS Sans Serif,10,1,0,1]
Caption="---"
AutoSize=1
Alignment=2
}
Add(InlineCode,12351837,224,273)
{
WorkPoints=#5:doGet|
EventPoints=#8:onResStr|
DataPoints=#3:inX|3:inY|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|29:uses kol,windows,Share,Debug;|0:|4:type|36: IAccessible = interface(IDispatch)|46: ['{618736E0-3C3D-11CF-810C-00AA00389B71}']|48: function Get_accParent: IDispatch; safecall;|50: function Get_accChildCount: Integer; safecall;|69: function Get_accChild(varChild: OleVariant): IDispatch; safecall;|69: function Get_accName(varChild: OleVariant): WideString; safecall;|70: function Get_accValue(varChild: OleVariant): WideString; safecall;|76: function Get_accDescription(varChild: OleVariant): WideString; safecall;|69: function Get_accRole(varChild: OleVariant): OleVariant; safecall;|70: function Get_accState(varChild: OleVariant): OleVariant; safecall;|69: function Get_accHelp(varChild: OleVariant): WideString; safecall;|100: function Get_accHelpTopic(out pszHelpFile: WideString; varChild: OleVariant): Integer; safecall;|81: function Get_accKeyboardShortcut(varChild: OleVariant): WideString; safecall;|48: function Get_accFocus: OleVariant; safecall;|52: function Get_accSelection: OleVariant; safecall;|78: function Get_accDefaultAction(varChild: OleVariant): WideString; safecall;|78: procedure accSelect(flagsSelect: Integer; varChild: OleVariant); safecall;|90: procedure accLocation(out pxLeft: Integer; out pyTop: Integer; out pcxWidth: Integer; |82: out pcyHeight: Integer; varChild: OleVariant); safecall;|86: function accNavigate(navDir: Integer; varStart: OleVariant): OleVariant; safecall;|77: function accHitTest(xLeft: Integer; yTop: Integer): OleVariant; safecall;|65: procedure accDoDefaultAction(varChild: OleVariant); safecall;|85: procedure Set_accName(varChild: OleVariant; const pszName: WideString); safecall;|87: procedure Set_accValue(varChild: OleVariant; const pszValue: WideString); safecall;|53: property accParent: IDispatch read Get_accParent;|59: property accChildCount: Integer read Get_accChildCount;|73: property accChild[varChild: OleVariant]: IDispatch read Get_accChild;|90: property accName[varChild: OleVariant]: WideString read Get_accName write Set_accName;|93: property accValue[varChild: OleVariant]: WideString read Get_accValue write Set_accValue;|86: property accDescription[varChild: OleVariant]: WideString read Get_accDescription;|72: property accRole[varChild: OleVariant]: OleVariant read Get_accRole;|74: property accState[varChild: OleVariant]: OleVariant read Get_accState;|72: property accHelp[varChild: OleVariant]: WideString read Get_accHelp;|108: property accHelpTopic[out pszHelpFile: WideString; varChild: OleVariant]: Integer read Get_accHelpTopic;|96: property accKeyboardShortcut[varChild: OleVariant]: WideString read Get_accKeyboardShortcut;|52: property accFocus: OleVariant read Get_accFocus;|60: property accSelection: OleVariant read Get_accSelection;|90: property accDefaultAction[varChild: OleVariant]: WideString read Get_accDefaultAction;|6: end;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|0:|9: public|33: onResStr,inX,inY: THI_Event;|47: procedure doGet(var dt: TData; idx: word);|0:|5: end;|1: |98:function AccessibleObjectFromPoint(Pt: TPoint; var Acc: IAccessible; var Child: Variant): HRESULT;|68: stdcall; external 'OleAcc.dll' name 'AccessibleObjectFromPoint';|0:|1: |0:|14:implementation|0:|3:var|19: OldPoint: TPoint;|0:|28:procedure THiAsmClass.doGet;|3:var|12: P: TPoint;|17: A: IAccessible;|13: V: Variant;|12: s: string;|5:begin|29: P.X := ToIntegerEvent(inX);|29: P.Y := ToIntegerEvent(inY);|52: if (P.X <> OldPoint.X) or (P.Y <> OldPoint.Y) then|7: begin|18: OldPoint := P;|57: if Succeeded(AccessibleObjectFromPoint(P, A, V)) then|9: begin|24: s := A.accName[V];|31: _hi_onEvent(onResStr, s);|39: end else _hi_onEvent(onResStr, '');|6: end;|4:end;|0:|4:end.|
link(onResStr,8657696:doEvent1,[])
link(inX,12464508:MouseX,[])
link(inY,12464508:MouseY,[])
}
Add(Hub,8657696,280,273)
{
link(onEvent1,11373442:doText,[])
link(onEvent2,4315181:doFind,[(317,286)(317,251)])
}
Add(FileSearch,3509777,336,119)
{
SubDir=1
Include=2
link(onSearch,12272121:doAdd,[])
link(Dir,6630974:Var2,[])
}
Add(Hub,3695030,140,98)
{
link(onEvent1,4319803:doWork2,[])
link(onEvent2,4565006:doStartWatch,[(172,111)(172,125)])
}
Add(Dir,8113355,336,42)
{
}
Add(Hub,15523515,294,98)
{
link(onEvent1,12272121:doClear,[(395,104)(395,132)])
link(onEvent2,3509777:doSearch,[(322,111)(322,125)])
}
Add(ArrayFind,4315181,434,245)
{
Partial=0
CaseSensitive=0
Point(doPartial)
link(onFind,12272121:doGetString,[(478,251)(478,209)(408,209)(408,167)])
link(Array,12272121:Array,[])
link(Value,11373442:Caption,[(454,233)(398,233)(398,317)(342,317)])
}
Add(StrList,12272121,420,119)
{
AddType=1
Point(doGetString)
Point(onGetString)
link(onGetString,12913422:doText,[])
}
Add(GMouseHook,12464508,224,210)
{
link(onMouseMove,12351837:doGet,[(267,216)(267,258)(212,258)(212,279)])
}
Add(Label,13086045,56,35)
{
Width=600
Height=30
Color=32768
Font=[Arial,16,1,65535,204]
Caption="ИМЯ ФАЙЛА ПОД КУРСОРОМ НА РАБОЧЕМ СТОЛЕ"
AutoSize=1
Alignment=2
}
Add(Label,13544903,126,35)
{
Top=50
Width=600
Height=30
Color=32768
Font=[Arial,16,1,65535,204]
Caption="ПУТЬ К ФАЙЛУ ИЛИ ПАПКЕ ПОД КУРСОРОМ"
AutoSize=1
Alignment=2
}
Add(DirectoryChanges,4565006,189,119)
{
Flags=3
link(onChange,4319803:doWork3,[(242,125)])
link(DirName,6630974:Var1,[(195,89)])
}
Add(HubEx,4319803,238,98)
{
link(onEvent,15523515:doEvent1,[])
}
Add(GetDataEx,6630974,343,84)
{
link(Data,8113355:DesktopDir,[])
}

карма: 0

0