Vegar Posted June 24, 2009 Share Posted June 24, 2009 Hello.. is there any way to call a func when a windowtilte change?? this is what i've tried: if not $title=WinGetTitle ("winTitle -") then $title = WinGetTitle ("Spotify -") $location = StringMid ($title, 10) ToolTip ($location) endif sleep(100) wend witch did not work... Link to comment Share on other sites More sharing options...
MDCT Posted June 24, 2009 Share Posted June 24, 2009 You mean like this? Run("notepad.exe") WinWait("") $handle = WinGetHandle("") $Title1=WinGetTitle($handle) While 1 Sleep(50) if WinGetTitle($handle) <> $Title1 Then TitleChanged() EndIf Sleep(50) WEnd Func TitleChanged() Tooltip("Title has been changed",0,0) Sleep(4000) Tooltip("") $Title1=WinGetTitle($handle) EndFunc To try it, simply save the opened notepad as something, and the script will show a tooltip. Hope this helps. Link to comment Share on other sites More sharing options...
Vegar Posted June 24, 2009 Author Share Posted June 24, 2009 Thnx .. got it to work Link to comment Share on other sites More sharing options...
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