AlainB Posted October 6, 2011 Posted October 6, 2011 Hi, How could I keep the PopUp of the "SplashTextOn" within the Form created. There will be many instances of the script running at the same time and each one could be located anywhere on the screen. Or is there another way of getting the same effect? Thanks! Alain #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("SplashText test", 288, 284,-1,-1, -1,$WS_EX_TOPMOST) $Button1 = GUICtrlCreateButton("Test", 92, 8, 57,21) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 SplashTextOn ( "", "Splash Text On!",200,40,-1,-1,1,"",10,500) sleep(2000) SplashOff() EndSwitch WEnd
AlainB Posted October 7, 2011 Author Posted October 7, 2011 (edited) My problem is solved. "WinGetPos" was the key. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("SplashText test", 288, 284,-1,-1, -1,$WS_EX_TOPMOST) $Button1 = GUICtrlCreateButton("Test", 92, 8, 57,21) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $Pos = WinGetPos("[active]") SplashTextOn ( "", "Splash Text On!",200,40,$Pos[0]+44,$Pos[1]+132,1,"",10,500) sleep(2000) SplashOff() EndSwitch WEnd Edited October 7, 2011 by AlainB
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now