ScriptServiceApp NoTrayIcon SetBatchLines -1 MsgBox Thread Hello from

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
ScriptServiceApp=
(
#NoTrayIcon
SetBatchLines, -1
MsgBox, 0, Thread, Hello from Thread.``nРусские буквы не работают
CoordMode, ToolTip, Screen
xpos := 200
Loop 31
{
ToolTip, Test 1, xpos, 300
If (xpos != 1450)
xpos += 125
else
xpos := 200
Sleep 100
}
)
DynaRun(ScriptServiceApp)
MsgBox End
Return
DynaRun(TempScript, pipename="")
{
static _:="uint",@:="Ptr"
If pipename =
name := "AHK" A_TickCount
Else
name := pipename
__PIPE_GA_ := DllCall("CreateNamedPipe","str","\\.\pipe\" name,_,2,_,0,_,255,_,0,_,0,@,0,@,0)
__PIPE_ := DllCall("CreateNamedPipe","str","\\.\pipe\" name,_,2,_,0,_,255,_,0,_,0,@,0,@,0)
if (__PIPE_=-1 or __PIPE_GA_=-1)
Return 0
Run, %A_AhkPath% "\\.\pipe\%name%",,UseErrorLevel HIDE, PID
If ErrorLevel
MsgBox, 262144, ERROR,% "Could not open file:`n" __AHK_EXE_ """\\.\pipe\" name """"
DllCall("ConnectNamedPipe",@,__PIPE_GA_,@,0)
DllCall("CloseHandle",@,__PIPE_GA_)
DllCall("ConnectNamedPipe",@,__PIPE_,@,0)
script := (A_IsUnicode ? chr(0xfeff) : (chr(239) . chr(187) . chr(191))) TempScript
if !DllCall("WriteFile",@,__PIPE_,"str",script,_,(StrLen(script)+1)*(A_IsUnicode ? 2 : 1),_ "*",0,@,0)
Return A_LastError,DllCall("CloseHandle",@,__PIPE_)
DllCall("CloseHandle",@,__PIPE_)
Return PID
}