Вверх ↑
Ответов: 783
Рейтинг: 168
#1: 2023-04-01 06:29:16 ЛС | профиль | цитата
3042 писал(а):
Что я делаю неправильно, как указать ссылку на текст для вставки?

Для отправки текста в Notepad++
вместо - SendMessage(IntPtr hWnd, int uMsg, int wParam, string lParam)
надо использовать - SendMessageW(IntPtr hWnd, int uMsg, int wParam, string lParam)
Add(MainForm,12256942,63,84)
{
link(onCreate,12564252:doWork2,[])
}
Add(FindWindow,10888653,182,91)
{
ClassName="Scintilla"
SkipParam=1
link(onFind,11027644:doValue,[])
}
Add(FindWindow,7289101,133,98)
{
ClassName="Notepad++"
SkipParam=1
link(onFind,10888653:doFindChild,[])
}
Add(WinExec,11401622,455,77)
{
FileName="powershell"
Mode=0
Action="runas"
Point(doConsoleExec)
Point(doConsoleInput)
Point(onConsoleTerminate)
Point(onConsoleResult)
Point(onConsoleError)
link(onConsoleError,15528725:doCharset,[])
}
Add(Charset,15528725,511,105)
{
link(onCharset,1789625:doWork3,[(550,111)(550,146)(338,146)])
}
Add(Memo,6436492,364,28)
{
Left=550
Top=160
Align=5
Font=[MS Sans Serif,12,0,0,1]
Strings=#42:Артикул;Название;Кол-во;Ед.изм.;Цена;Сумма|56:23544122;Carbon disc ?44,7/38,3x5,8mm;10;PC;16,92;169,20|56:23544122;Carbon disc ?44,7/38,3x5,8mm;10;PC;16,92;169,20|54:23544122;Carbon disc ?44,7/38,3x5,8mm;2;PC;16,92;33,84|64:21200159;Top part UNIFL3/4 for steel bot.part;25;PC;30,09;752,25|57:24400111;Hose f. pump compl. UNIWASH;153;PC;10,58;1618,74|58:13225;Piston complete for valve UNIWASH3;4;PC;27,09;108,36|60:12200105;Vacuumgauge glycerine ?100mm 3/8";5;PC;40,57;202,85|54:21200141;Thread bush UNIFLOW3 steel;130;PC;1,93;250,90|45:25100146;O-ring ?16,1x1,6mm;175;PC;0,36;63,00|57:21200127;Holder rocking lever, UNIFLOW3;170;PC;0,26;44,20|50:21200131;Rocking lever UNIFLOW3;150;PC;0,89;133,50|65:25200132;Valve button inside UNIFLOW3 steel FA;225;PC;0,72;162,00|61:21200129;Bar closing device UNIFLOW3 steel;225;PC;1,09;245,25|55:25200124;Valve flap outside UNIFLOW3;225;PC;1,56;351,00|60:14400212;Solenoid valve sgl. invensys 230vac;5;PC;8,50;42,50|62:14400213;Solenoid valve dobb. invensys 230vac;5;PC;14,13;70,65|48:21200131;Rocking lever UNIFLOW3;20;PC;0,89;17,80|63:25200132;Valve button inside UNIFLOW3 steel FA;20;PC;0,72;14,40|43:25100146;O-ring ?16,1x1,6mm;20;PC;0,36;7,20|55:21200127;Holder rocking lever, UNIFLOW3;20;PC;0,26;5,20|58:21200130;Bar closing device UNIFLOW3 steel;20;PC;0,34;6,80|58:25200119;Guard bracket UNIFLOW3 steel SBS;20;PC;3,38;67,60|55:13474;Valve flap exterior UNIFLOW3 SBS;20;PC;1,56;31,20|59:26400104;Terminal wheel for lock guide str;20;PC;1,12;22,40|67:25215022;Rubber liner UNIFL. 15022-?22 UNIFLEX FA;96;PC;2,39;229,44|55:14800695;Hose guide f. SAC115 complete;10;PC;9,17;91,70|36:14306;Filter for IDC;20;PC;0,40;8,00|51:25515435;Rubber hose ?27/16 mm - FA;15;M;5,24;78,60|63:13930;Double-action Quickstart II rem. L=740mm;1;PC;98,66;98,66|54:13100201;Spray gun for udder washer;20;PC;17,77;355,40|0:|
ScrollBars=3
}
Add(Charset,3603684,406,91)
{
Type=6
link(onCharset,11401622:doConsoleExec,[])
}
Add(FormatStr,6946989,357,91)
{
Mask="$Source = @'\r\n[DllImport("""User32.dll""")]\r\npublic static extern int SendMessageW(IntPtr hWnd, int uMsg, int wParam, string lParam);\r\n'@\r\n\r\n$User32 = Add-Type -MemberDefinition $Source -Name 'User32' -Namespace 'Win32' -PassThru\r\n\r\n$User32::SendMessageW(%1,12,0, """%2""")"
link(onFString,3603684:doCharset,[])
link(Str1,11027644:Value,[(363,82)(279,82)(279,131)(237,131)])
link(Str2,6436492:Text,[])
}
Add(Memory,11027644,231,91)
{
link(onData,9865460:doCase,[])
}
Add(Case,9865460,287,91)
{
Value=Integer(0)
DataOnTrue=String(Notepad++ не запущен)
link(onNextCase,6946989:doString,[])
link(onTrue,1789625:doWork2,[])
}
Add(Menu,1374694,63,133)
{
Menu=#17:Send to notepad++|
link(onSelectStr,12564252:doWork3,[(116,139)])
}
Add(HubEx,12564252,112,98)
{
link(onEvent,7289101:doFind,[])
}
Add(HubEx,1789625,334,98)
{
Angle=3
link(onEvent,6436492:doText,[(338,55)])
}

Проверено на
- Windows 10 (x64)
- Hiasm v4.05 build 186 (delphi)
- Notepad++ v8.4.9 (32-bit)
карма: 15

0
Редактировалось 2 раз(а), последний 2023-04-04 04:51:21