How to chang the SplashText's text Topic is solved
How to chang the SplashText's text
I want the SplashText stay on and showing the changing contents of clipboard.
Re: How to chang the SplashText's text
Code: Select all
SplashTextOn, , , % Clipboard
SetTimer, RefreshSplash, 500 ; 500 is arbirary, choose the delay you prefer
return
RefreshSplash:
SplashTextOn, , , % Clipboard
return
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
Re: How to chang the SplashText's text
Here's another approach:
Code: Select all
#Persistent
OnClipboardChange("SplashClipboard")
SplashClipboard()
{
SplashTextOn,,, % Clipboard
}
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: How to chang the SplashText's text
Thanks, I want to use ControlSetText, but I don't know how to use it.
Re: How to chang the SplashText's text Topic is solved
example with GUI
Code: Select all
#Warn
setworkingdir,%a_scriptdir%
Gui,1: -DPIScale
SS_REALSIZECONTROL := 0x40
Gui,1:Color,Black,Black
Gui, Font,s12 cYellow ,Lucida Console
Gui,add,edit,x10 y10 w1100 h590 vED1 -vscroll -border -E0x200,
Gui,add,text,x0 y0 w0 vT1 ,
GuiControl, Focus,T1
Gui, Show,x10 y10 w1150 h600,TEST
E0x200 = WS_EX_CLIENTEDGE
RETURN
Guiclose:
exitapp
OnClipboardChange:
If (A_EventInfo=1)
ControlSetText,edit1,%clipboard%, ahk_class AutoHotkeyGUI
return
Re: How to chang the SplashText's text
Perhaps you want something like this. In this case you need to use WinSetTitle, not ControlSetText.
Code: Select all
#Persistent
OnClipboardChange("SplashClipboard")
SplashClipboard()
{
static hWnd := 0
if !hWnd
{
SplashTextOn,,, % Clipboard
vScriptPID := DllCall("kernel32\GetCurrentProcessId", "UInt")
WinGet, hWnd, ID, % "ahk_class AutoHotkey2 ahk_pid " vScriptPID
}
WinSetTitle, % "ahk_id " hWnd,, % Clipboard
}
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: How to chang the SplashText's text
Thanks, how to let the gui stay on top.garry wrote: ↑09 Apr 2019, 01:55example with GUICode: Select all
#Warn setworkingdir,%a_scriptdir% Gui,1: -DPIScale SS_REALSIZECONTROL := 0x40 Gui,1:Color,Black,Black Gui, Font,s12 cYellow ,Lucida Console Gui,add,edit,x10 y10 w1100 h590 vED1 -vscroll -border -E0x200, Gui,add,text,x0 y0 w0 vT1 , GuiControl, Focus,T1 Gui, Show,x10 y10 w1150 h600,TEST E0x200 = WS_EX_CLIENTEDGE RETURN Guiclose: exitapp OnClipboardChange: If (A_EventInfo=1) ControlSetText,edit1,%clipboard%, ahk_class AutoHotkeyGUI return
Re: How to chang the SplashText's text
You're right, I want a small window at corner and stay on top to show the progress.jeeswg wrote: ↑09 Apr 2019, 03:23Perhaps you want something like this. In this case you need to use WinSetTitle, not ControlSetText.Code: Select all
#Persistent OnClipboardChange("SplashClipboard") SplashClipboard() { static hWnd := 0 if !hWnd { SplashTextOn,,, % Clipboard vScriptPID := DllCall("kernel32\GetCurrentProcessId", "UInt") WinGet, hWnd, ID, % "ahk_class AutoHotkey2 ahk_pid " vScriptPID } WinSetTitle, % "ahk_id " hWnd,, % Clipboard }
Re: How to chang the SplashText's text
addedThanks, how to let the gui stay on top.
GUI alwaysontop, if minimized show GUI when clipboard has changed , quit script with ESC ( or GuiClose)
Code: Select all
#Warn
setworkingdir,%a_scriptdir%
Gui,1: +AlwaysOnTop
Gui,1: -DPIScale
SS_REALSIZECONTROL := 0x40
Gui,1:Color,Black,Black
Gui, Font,s12 cYellow ,Lucida Console
Gui,add,edit,x10 y10 w1100 h590 vED1 -vscroll -border -E0x200,
Gui,add,text,x0 y0 w0 vT1 ,
GuiControl, Focus,T1
Gui, Show,x10 y10 w1150 h600,TEST
E0x200 = WS_EX_CLIENTEDGE
RETURN
esc::exitapp
Guiclose:
exitapp
OnClipboardChange:
If (A_EventInfo=1)
{
Gui, Show,
ControlSetText,edit1,%clipboard%, ahk_class AutoHotkeyGUI
}
return
Re: How to chang the SplashText's text
Thank you very much!garry wrote: ↑10 Apr 2019, 03:31addedThanks, how to let the gui stay on top.
GUI alwaysontop, if minimized show GUI when clipboard has changed , quit script with ESC ( or GuiClose)Code: Select all
#Warn setworkingdir,%a_scriptdir% Gui,1: +AlwaysOnTop Gui,1: -DPIScale SS_REALSIZECONTROL := 0x40 Gui,1:Color,Black,Black Gui, Font,s12 cYellow ,Lucida Console Gui,add,edit,x10 y10 w1100 h590 vED1 -vscroll -border -E0x200, Gui,add,text,x0 y0 w0 vT1 , GuiControl, Focus,T1 Gui, Show,x10 y10 w1150 h600,TEST E0x200 = WS_EX_CLIENTEDGE RETURN esc::exitapp Guiclose: exitapp OnClipboardChange: If (A_EventInfo=1) { Gui, Show, ControlSetText,edit1,%clipboard%, ahk_class AutoHotkeyGUI } return
Who is online
Users browsing this forum: Bing [Bot] and 139 guests