Gar nicht so einfach...
Erstmal Danke für eure Hilfe, hab mir die Seiten mit den ganzen Lib's mal gespeichert.
Aber es will noch nicht so ganz.
Das Script startet, aber sobald man was übersetzen will kommt erneut ein Fehler.
Code: Select all
#NoEnv
#SingleInstance, force
SetBatchLines,-1
s:="Hello World"
MsgBox % s:=translate_google(s,"de")
translate_google(str,tl:="",sl:="",proxy:=""){
ComObjError(false)
http := ComObjCreate("WinHttp.WinHttpRequest.5.1")
proxy?http.SetProxy(2,proxy):"",tl?"":tl:="en"
http.open("POST","https://translate.google.com/translate_a/single?client=t&sl=" (sl?sl:"auto") "&tl=" tl "&hl=" tl "&dt=at&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&dt=t&ie=UTF-8&oe=UTF-8&otf=1&ssel=3&tsel=3&pc=1&kc=2&tk=" translate_tl(str),1)
http.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8")
http.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0")
http.send("q=" Uri_Encode(str))
http.WaitForResponse(-1)
if IsObject(Result:=so(http.responsetext,0)) && IsObject(Result.1) && Result.1.Length()
for i,n in Result.1
text.= n.1 " "
Return text
}
so(s,n:=""){
static JSON,JSONS,d,y:="`"",j:="`" `t",m:={"\b":Chr(08),"\\":"\","\t":"`t","\n":"`n","\f":Chr(12),"\r":"`r"},gu:="āЁξ"
if (Type(s)="Object")
{
for i,n in s
str.= (Type(i)="Object"?so(i,1):i+0=""?(gu i gu):i) ":" (Type(n)="Object"?so(n,1): n+0=""?(gu n gu):n) ","
if !n
{
StringReplace, str, %str%,/,\/
for c,z in m
IF InStr(str,z)
StringReplace, str, %str%,% z,% c
StringReplace, str, %str%,% y,% "\" y
StringReplace, str, %str%,% gu,% y
}
Return "{" RTrim(str,",") "}"
}
if (Type(s)="string")
{
f:=[],i:=1
if n
b:=StrLen(s)
else
{
if !(s:=Trim(s)) or !regexmatch(s, "[\[\{]")
Return s
if JSON:=(n=0) ; so(s,0) JSON
{
for c,z in m
if InStr(s,c)
StringReplace,s,% s,% c,% z
StringReplace, s, %s%,\/,/
if e:=InStr(s,"\u")
for e,n in StrSplit(SubStr(s, e+2), "\u")
IF n and !f[b:=SubStr(n, 1, 4)]
{
IF d := Abs("0x" b)
StringReplace,s,% s,% "\u" b,% Chr(d)
f[b]:=1
}
}
f:=[],b:=StrLen(s),n:=SubStr(s,i,1),d:=0,JSONS:=JSON?"\":"``"
}
if (n="{")
loop
{
if ((r?r[0]:"") = "}") or !i or !( i:=RegExMatch(s,"\S",n,i+1) ) or ((n:=n[0]) = "}")
Return d:=i,f
if InStr("[{",n)
(k:=so(SubStr(s,i),n),i+=d,i:=RegExMatch(s,"\S",t,InStr(s,":",,i)+1),(InStr("[{",t:=i?t[0]:"")
? (f[SO_JSON(K,JSON) ""]:=so(SubStr(s,i),t),i:=RegExMatch(s,",|\}",r,i+d))
: ( ((t=y) ? (p:=InStr(s,y,,i+1),p:=RegExMatch(s,",|\}",r,p),z:=Trim(SubStr(s,i+1,p-i-2)))
: (p:=RegExMatch(s,",|\}",r,i),z:=Trim(SubStr(s,i,p-i)),z:=z+0=""?SO_Try(z):z+0))
,f[SO_JSON(K,JSON) ""]:=SO_JSON(K,JSON),i:=p)) )
else
(x:=InStr(s,":",,(n=y)?InStr(s,y,,i,2):i))
? (k:= ((n=y)?SubStr(s,i+1,x-i-2):SubStr(s,i,x-i))
,k:=(n=y ? Trim(k) : n="(" ? SO_Try(Trim(k,"() `t")):Trim(k)),i:=RegExMatch(s,"\S",t,x+1)
,InStr("[{",t:=i?t[0]:"")
? (f[SO_JSON(K,JSON) ""]:=so(SubStr(s,i),t),i:=RegExMatch(s,",|\}",r,i+d))
: ( ((t=y) ? (p:=so_InStr(s,i,JSONS),p:=RegExMatch(s,",|\}",r,p),z:=Trim(SubStr(s,i+1,p-i-2)))
: (p:=RegExMatch(s,",|\}",r,i),z:=Trim(SubStr(s,i,p-i)),z:=z+0=""?SO_Try(z):z+0))
,f[SO_JSON(K,JSON) ""]:=SO_JSON(Z,JSON),i:=p))
: i:=0
}
if (n = "[")
loop
{
if ((r?r[0]:"") = "]") or !i or !( i:=RegExMatch(s,"\S",n,i+1) ) or ((n:=n[0]) = "]")
Return d:=i,f
(InStr("[{",n)
? (f.Push(so(SubStr(s,i),n)),i:=RegExMatch(s,",|\]",r,i+d))
: ( (n=y) ? (p:=so_InStr(s,i,JSONS),p:=RegExMatch(s,",|\]",r,p),z:=Trim(SubStr(s,i+1,p-i-2)))
: (p:=RegExMatch(s,",|\]",r,i),z:=Trim(SubStr(s,i,p-i)),z:=z+0=""?SO_Try(z):z+0),i:=p
,f.Push(SO_JSON(Z,JSON))))
}
}
}
SO_JSON(s,JSON){
static J:="\`"",P:="`""
Return JSON AND InStr(s,J)?StrReplace(S,J,P):S
}
SO_InStr(s,i,JSONS){
while (p:=InStr(s,"""",,i+1)) and (SubStr(s,p-1,1)=JSONS)
i:=p
Return p
}
SO_Try(f){
global
Try
Return (%f%)
}
Uri_Encode(str){
n := StrPutVar(str, UTF8, "UTF-8"),f:={"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"61":1,"62":1,"63":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"2d":1,"2e":1,"4a":1,"4b":1,"4c":1,"4d":1,"4e":1,"4f":1,"5a":1,"5f":1,"6a":1,"6b":1,"6c":1,"6d":1,"6e":1,"6f":1,"7a":1,"7e":1}
loop, strlen(hex:=BintoHex(&UTF8,n))/2-1
Res .= f[r:=substr(hex, A_index*2-1,2)]?Chr("0x" r):"`%" r
return Res
}
translate_tl(string){
a := b :=datediff(time?time:A_NowUTC,"19700101","hours")
n:= StrPutVar(string,utf8,"UTF-8")
loop, strlen(hex:=BintoHex(&UTF8, n))/2-1
a := translate_rl(a + ("0x" substr(hex, A_index*2-1,2)), "+-a^+6")
a := Mod((0 > (a := translate_rl(a, "+-3^+b+-f"))) ? (a := (a & 2147483647) + 2147483648) : a,10 ** 6)
return a "." (a ^ b)
}
translate_rl(a, b){
c := 0
while c < StrLen(b) - 2
{
d := SubStr(b, c+3, 1),d := (d >= "a") ? Ord(d) - 87 : d+0
,d := (SubStr(b, c+2, 1) == "+") ? a >> d : a << d
,a := (SubStr(b, c+1, 1) == "+") ? (a + d & 4294967295) : a ^ d
,c += 3
}
return ToInt(a)
}
ToInt(num){
static buf,init:=VarSetCapacity(buf,4)
NumPut(num+0,&buf,"Int")
return num:=NumGet(&buf,"Int")
}
Type(Value)
{
local m, f, e
if IsObject(Value)
{
static nMatchObj := NumGet(&(m, RegExMatch("", "O)", m)))
static nBoundFunc := NumGet(&(f := Func("Func").Bind()))
static nFileObj := NumGet(&(f := FileOpen("*", "w")))
static nEnumObj := NumGet(&(e := ObjNewEnum({})))
return ObjGetCapacity(Value) != "" ? "Object"
: IsFunc(Value) ? "Func"
: ComObjType(Value) != "" ? "ComObject"
: NumGet(&Value) == nBoundFunc ? "BoundFunc"
: NumGet(&Value) == nMatchObj ? "RegExMatchObject"
: NumGet(&Value) == nFileObj ? "FileObject"
: NumGet(&Value) == nEnumObj ? "Object::Enumerator"
: "Property"
}
else if (ObjGetCapacity([Value]) != "")
return "String"
else
return InStr(Value, ".") ? "Float" : "Integer"
}
StrPutVar(Str, ByRef Var, Enc = "")
{
Len := StrPut(Str, Enc) * (Enc = "UTF-16" || Enc = "CP1200" ? 2 : 1)
VarSetCapacity(Var, Len, 0)
Return, StrPut(Str, &Var, Enc)
}
DateDiff(DateTime1, DateTime2, TimeUnits)
{
EnvSub DateTime1, %DateTime2%, %TimeUnits%
return DateTime1
}
Kann man ein Script auch per Variable an die AutoHotkey.dll zum ausführen übergeben?
Hab es nun mit AHK v2 per DLL aufruf versucht. Habe mein Script angepasst und fehlende Funktionen hinzugefügt. Aber wenn ich das Script nun nutzen will kommt es zu einem Fehler der wohl aus der
Funktion kommt.
Code: Select all
;============================================================================
; Translate text using Google Translator & Bing Translator in a GUI.
;
;============================================================================
#Persistent
#SingleInstance ignore
OnMessage(0x201, "WM_LBUTTONDOWN") ; Necessary for Guis without caption.
CoordMode, Mouse, Screen
TransMode:=1
;============================================================================
;============================================================================
; To = die Sprache zu der im Grunde immer übersetzt werden soll.
; Anti = die Sprache zu der Übersetzt wird wenn Deutsch erkannt wird.
;============================================================================
^t::
TransText:=""
TextToT:=GetTextFromClipboard()
If WinExist(h_GetText)
{
GuiControl, GetText:,NewText,%TextToT%
GoSub NewTranslate
Return
}
To:="de"
Anti:="en"
GoSub StartTranslate
Return
;----------------------------------------------------------------------------
; Funktion um Inhalte zu kopieren.
;----------------------------------------------------------------------------
GetTextFromClipboard()
{
ClipSaved := ClipboardAll
Clipboard := ""
SendInput, ^c
ClipWait, 0.5
If ErrorLevel
{
Clipboard := ClipSaved
ClipSaved := ""
Return
}
v := Clipboard
Clipboard := ClipSaved
ClipSaved := ""
Return v
}
;----------------------------------------------------------------------------
; Wurde kein Inhalt kopiert wird nur die GUI aufgerufen.
;----------------------------------------------------------------------------
StartTranslate:
TranslateTo:=To
if (TextToT="")
{
GoSub GetText
return
}
else
GoSub translate
Return
;----------------------------------------------------------------------------
; Startet die Übersetzung
;----------------------------------------------------------------------------
translate:
;if (TransMode=0)
;TransText:=mTranslate(TextToT, To, Anti)
;else
TransText:=translate_google(TextToT, To, Anti)
StrReplace, TransText, TransText, \n, `n`r,,1
if (GuiOn=1)
GuiControl, GetText:,NewTransText,%TransText%
else
{
WithText:=1
Gosub GetText
}
Return
translate_google(str,tl:="",sl:="",proxy:=""){
ComObjError(false)
http := ComObjCreate("WinHttp.WinHttpRequest.5.1")
proxy?http.SetProxy(2,proxy):"",tl?"":tl:="en"
http.open("POST","https://translate.google.com/translate_a/single?client=t&sl=" (sl?sl:"auto") "&tl=" tl "&hl=" tl "&dt=at&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&dt=t&ie=UTF-8&oe=UTF-8&otf=1&ssel=3&tsel=3&pc=1&kc=2&tk=" translate_tl(str),1)
http.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8")
http.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0")
http.send("q=" Uri_Encode(str))
http.WaitForResponse(-1)
if IsObject(Result:=so(http.responsetext,0)) && IsObject(Result.1) && Result.1.Length()
for i,n in Result.1
text.= n.1 " "
Return text
}
;----------------------------------------------------------------------------
; Gui zum anzeigen von übersetzen Text oder zur Eingabe von neuem Text.
;----------------------------------------------------------------------------
GetText:
MouseGetPos, TextX, TextY
Gui, GetText:Color, AAAAAA
Gui, GetText:+LastFound +AlwaysOnTop -Caption +ToolWindow +Border +HWNDh_GetText
Gui, GetText:Font, s10
Gui, GetText:Add, Text, x0 y3 w350 h17 +Center, Text der Übersetzt werden soll:
Gui, GetText:Add, Edit, x0 y20 w350 h60 cBlue vNewText +border gNewTranslate,%TextToT%
Gui, GetText:Add, Text, x0 y83 w150 h17 +Center +ReadOnly, Übersetzung:
Gui, GetText:Add, Radio, x155 y83 w80 h17 vTransModeChange1 gTransModeChange, Bing
Gui, GetText:Add, Radio, x240 y83 w80 h17 vTransModeChange2 gTransModeChange, Google
if (TransMode=0)
GuiControl, GetText:, TransModeChange1, 1
else
GuiControl, GetText:, TransModeChange2, 1
Gui, GetText:Add, Edit, x0 y100 w350 h60 cGreen +border vNewTransText,%TransText%
Gui, GetText:Add, Text, x0 y163 w350 h17 vLine1, ESC = Schließen - Klicke ins Graue zum verschieben.
Gui, GetText:Font
Gui, GetText:Font, s8
Gui, GetText:Add, Text, x313 y163 w35 h16 +Border cWhite +Center gWithTextGuiClose, close
if (WithText=1)
GuiControl, GetText:Focus, Line1
else
GuiControl, GetText:Focus, NewText
Gui, GetText:Show, h180 w350 x%TextX% y%TextY%
Hotkey, Escape, WithTextGuiClose, on
Return
;----------------------------------------------------------------------------
; Ändern des Übersetzers von Google auf Bing oder umgekehrt.
;----------------------------------------------------------------------------
TransModeChange:
GuiControlGet, TransModeChange1
if (TransModeChange1=1)
TransMode:=0
else
TransMode:=1
GoSub NewTranslate
Return
;----------------------------------------------------------------------------
; Bei der Eingabe von neuem Text wird direkt neu Übersetzt.
;----------------------------------------------------------------------------
NewTranslate:
GuiControl, GetText:,NewTransText,
GuiControlGet, NewText, GetText:, NewText
if (NewText="")
GuiControl, GetText:,NewTransText,
GuiOn:=1
TextToT:=NewText
TransText:=""
GoSub translate
Return
;----------------------------------------------------------------------------
; Schließt die GUI und leert die Var's.
;----------------------------------------------------------------------------
WithTextGuiClose:
GuiOn:=0
WithText:=0
TransText:=""
Gui, GetText:Destroy
Hotkey, Escape, WithTextGuiClose, off
Return
;----------------------------------------------------------------------------
;============================================================================
; Funktionen für Google
;============================================================================
so(s,n:=""){
static JSON,JSONS,d,y:="`"",j:="`" `t",m:={"\b":Chr(08),"\\":"\","\t":"`t","\n":"`n","\f":Chr(12),"\r":"`r"},gu:="āЁξ"
if (Type(s)="Object")
{
for i,n in s
str.= (Type(i)="Object"?so(i,1):i+0=""?(gu i gu):i) ":" (Type(n)="Object"?so(n,1): n+0=""?(gu n gu):n) ","
if !n
{
StrReplace, str, %str%,/,\/
for c,z in m
IF InStr(str,z)
StrReplace, str, %str%,% z,% c
StrReplace, str, %str%,% y,% "\" y
StrReplace, str, %str%,% gu,% y
}
Return "{" RTrim(str,",") "}"
}
if (Type(s)="string")
{
f:=[],i:=1
if n
b:=StrLen(s)
else
{
if !(s:=Trim(s)) or !regexmatch(s, "[\[\{]")
Return s
if JSON:=(n=0) ; so(s,0) JSON
{
for c,z in m
if InStr(s,c)
StrReplace,s,% s,% c,% z
StrReplace, s, %s%,\/,/
if e:=InStr(s,"\u")
for e,n in StrSplit(SubStr(s, e+2), "\u")
IF n and !f[b:=SubStr(n, 1, 4)]
{
IF d := Abs("0x" b)
StrReplace,s,% s,% "\u" b,% Chr(d)
f[b]:=1
}
}
f:=[],b:=StrLen(s),n:=SubStr(s,i,1),d:=0,JSONS:=JSON?"\":"``"
}
if (n="{")
loop
{
if ((r?r[0]:"") = "}") or !i or !( i:=RegExMatch(s,"\S",n,i+1) ) or ((n:=n[0]) = "}")
Return d:=i,f
if InStr("[{",n)
(k:=so(SubStr(s,i),n),i+=d,i:=RegExMatch(s,"\S",t,InStr(s,":",,i)+1),(InStr("[{",t:=i?t[0]:"")
? (f[SO_JSON(K,JSON) ""]:=so(SubStr(s,i),t),i:=RegExMatch(s,",|\}",r,i+d))
: ( ((t=y) ? (p:=InStr(s,y,,i+1),p:=RegExMatch(s,",|\}",r,p),z:=Trim(SubStr(s,i+1,p-i-2)))
: (p:=RegExMatch(s,",|\}",r,i),z:=Trim(SubStr(s,i,p-i)),z:=z+0=""?SO_Try(z):z+0))
,f[SO_JSON(K,JSON) ""]:=SO_JSON(K,JSON),i:=p)) )
else
(x:=InStr(s,":",,(n=y)?InStr(s,y,,i,2):i))
? (k:= ((n=y)?SubStr(s,i+1,x-i-2):SubStr(s,i,x-i))
,k:=(n=y ? Trim(k) : n="(" ? SO_Try(Trim(k,"() `t")):Trim(k)),i:=RegExMatch(s,"\S",t,x+1)
,InStr("[{",t:=i?t[0]:"")
? (f[SO_JSON(K,JSON) ""]:=so(SubStr(s,i),t),i:=RegExMatch(s,",|\}",r,i+d))
: ( ((t=y) ? (p:=so_InStr(s,i,JSONS),p:=RegExMatch(s,",|\}",r,p),z:=Trim(SubStr(s,i+1,p-i-2)))
: (p:=RegExMatch(s,",|\}",r,i),z:=Trim(SubStr(s,i,p-i)),z:=z+0=""?SO_Try(z):z+0))
,f[SO_JSON(K,JSON) ""]:=SO_JSON(Z,JSON),i:=p))
: i:=0
}
if (n = "[")
loop
{
if ((r?r[0]:"") = "]") or !i or !( i:=RegExMatch(s,"\S",n,i+1) ) or ((n:=n[0]) = "]")
Return d:=i,f
(InStr("[{",n)
? (f.Push(so(SubStr(s,i),n)),i:=RegExMatch(s,",|\]",r,i+d))
: ( (n=y) ? (p:=so_InStr(s,i,JSONS),p:=RegExMatch(s,",|\]",r,p),z:=Trim(SubStr(s,i+1,p-i-2)))
: (p:=RegExMatch(s,",|\]",r,i),z:=Trim(SubStr(s,i,p-i)),z:=z+0=""?SO_Try(z):z+0),i:=p
,f.Push(SO_JSON(Z,JSON))))
}
}
}
SO_JSON(s,JSON){
static J:="\`"",P:="`""
Return JSON AND InStr(s,J)?StrReplace(S,J,P):S
}
SO_InStr(s,i,JSONS){
while (p:=InStr(s,"`"",,i+1)) and (SubStr(s,p-1,1)=JSONS)
i:=p
Return p
}
SO_Try(f){
global
Try
Return (%f%)
}
Uri_Encode(str){
n := StrPutVar(str, UTF8, "UTF-8"),f:={"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"61":1,"62":1,"63":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"2d":1,"2e":1,"4a":1,"4b":1,"4c":1,"4d":1,"4e":1,"4f":1,"5a":1,"5f":1,"6a":1,"6b":1,"6c":1,"6d":1,"6e":1,"6f":1,"7a":1,"7e":1}
loop, strlen(hex:=BintoHex(&UTF8,n))/2-1
Res .= f[r:=substr(hex, A_index*2-1,2)]?Chr("0x" r):"`%" r
return Res
}
translate_tl(string){
a := b :=datediff(time?time:A_NowUTC,"19700101","hours")
n:= StrPutVar(string,utf8,"UTF-8")
loop, strlen(hex:=BintoHex(&UTF8, n))/2-1
a := translate_rl(a + ("0x" substr(hex, A_index*2-1,2)), "+-a^+6")
a := Mod((0 > (a := translate_rl(a, "+-3^+b+-f"))) ? (a := (a & 2147483647) + 2147483648) : a,10 ** 6)
return a "." (a ^ b)
}
translate_rl(a, b){
c := 0
while c < StrLen(b) - 2
{
d := SubStr(b, c+3, 1),d := (d >= "a") ? Ord(d) - 87 : d+0
,d := (SubStr(b, c+2, 1) == "+") ? a >> d : a << d
,a := (SubStr(b, c+1, 1) == "+") ? (a + d & 4294967295) : a ^ d
,c += 3
}
return ToInt(a)
}
ToInt(ByRef num,buf:=0){
return num:=NumGet(getvar(buf:=num+0),"Int")
}
StrPutVar(Str, ByRef Var, Enc := "")
{
Len := StrPut(Str, Enc) * (Enc = "UTF-16" || Enc = "CP1200" ? 2 : 1)
VarSetCapacity(Var, Len, 0)
Return, StrPut(Str, &Var, Enc)
}
BinToHex(addr,len) { ; Thanks Laszo
static b2h
if !b2h
b2h:=McodeH(A_PtrSize=8?"4C8BC94585C0744F458BD00F1F440000440FB6024983C10248FFC241C0E8044180E80A410FB6C0C0E805442AC04180C041458841FE0FB64AFF80E10F80E90A0FB6C1C0E8052AC880C14149FFCA418849FF75BD458811C3C60100C3":"558BEC578B7D1085FF74398B4D08568B750C8A06C0E8042C0A8AD0C0EA052AC2044188018A06240F2C0A8AD0C0EA052AC204418841014683C1024F75D55EC601005F5DC38B4508C600005F5DC3","i==ttui")
VarSetCapacity(hex,2 * len + 1),b2h[&hex,addr,len]
Return StrGet(&hex,"CP0")
}
MCodeH(h,def,p*){
static f,DynaCalls
If !f
f:={},DynaCalls:={}
If DynaCalls.HasKey(h)
return DynaCalls[h]
f.Insert(h),f.SetCapacity(f.MaxIndex(),len:=StrLen(h)//2)
DllCall("VirtualProtect","PTR",addr:=f.GetAddress(f.MaxIndex()),"Uint",len,"UInt",64,"Uint*",0)
Loop % len
NumPut("0x" SubStr(h,2*A_Index-1,2),addr+0,A_Index-1,"Char")
if p.MaxIndex()
Return DynaCalls[h]:=DynaCall(addr,def,p*)
else Return DynaCalls[h]:=DynaCall(addr,def)
}
;============================================================================
WM_LBUTTONDOWN()
{
if (A_Gui="GetText")
{
If (A_GuiControl = "") ; Klick auf den Hintergrund der GUI
PostMessage, 0xA1, 2, 0 ; sehr sehr alter Trick von SKAN: 0xA1 = WM_NCLBUTTONDOWN
}
}
Return