but i also expect, that its moving every time i call it.
WinMove, % titleClass,% x - 50 , % (y - 50) ; <=============================== problem
but its not. it moves in this code sends me message box but not moving.
Code: Select all
loop,9
toolTipGui(10, 10, "test")
toolTipGui(x, y, text, title := "", bgColor := "", fontSize := 0){
if(!title)
title := "title1902121943"
if(!bgColor)
bgColor := "Green"
if(!fontSize)
fontSize := 10
DetectHiddenWindows,Off
settitlematchmode,3
; ahk_class AutoHotkeyGUI ahk_exe AutoHotkey.exe
; UniqueID := WinExist(WinTitle , WinText, ExcludeTitle, ExcludeText)
titleClass := title " ahk_class AutoHotkeyGUI ahk_exe AutoHotkey.exe"
If( HGUI := WinExist( titleClass )){ ; eturns the Unique ID (HWND) (
;WinGetPos,x,y, Width, Height, A ; %title%
WinGetPos,x,y, Width, Height, % titleClass ; %title%
WinMove, % titleClass,% x - 50 , % (y - 50) ; <=============================== problem
; WinMove, % titleClass,% x , % y - 15
msgbox, % "was found: " titleClass " at x,y ? " x "," y
;WinMove, A,, 10, 10,
GuiControl, , % Gui1.HTXT, text ; update text
Gui1 := {HGUI: HGUI, HTXT: text} ; HTXT???????????????
return {HGUI: HGUI, HTXT: text}
}
; Gui, New, +AlwaysOnTop +ToolWindow -SysMenu -Caption +HwndHGUI
Gui, New, +ToolWindow -SysMenu -Caption +HwndHGUI
Gui, Color, %bgColor%
Gui, Font, cWhite s%fontSize% q1, Arial Narrow ;red ; changed s11 to s10
Gui, Add, Text, y0 hwndHTXT, %text%
; Return {HGUI: HGUI, HTXT: HTXT} ; Gui1 := toolTipGui()
Gui1 := {HGUI: HGUI, HTXT: HTXT}
Gui, % Gui1.HGUI . ":Show", NoActivate x%x% y%y% , %title%
return Gui1 ; older:
}
;\____ toolTipGui __ 190214201453 __ 14.02.2019 20:14:53 __/