barribar Posted May 1, 2008 Posted May 1, 2008 (edited) This script work fine whene the window is maximize, BUT didnt work when it is in tray icons expandcollapse popupIf NOT WinExists("Mobile Connect") Then; It s already running Run("C:\Program Files\Huawei technologies\Mobile Connect\Mobile Connect.exe") sleep (10000) EndIf while 1 $var = WinList() For $i = 1 to $var[0][0] Switch $var[$i][0] case "Mobile Connect" If WinExists("Mobile Connect","Network") AND WinExists("Mobile Connect","--") Then send("{F2}");Connect EndIf case "Prompt" If WinExists("Prompt") Then send("O");exit exit EndIf case "Error" If WinExists("Error","Une connexion à l'ordinateur") Then send("{ENTER}") EndIf case "Dial Connection" If WinExists("Dial Connection","Failed to connect") Then send("{ENTER}") EndIf EndSwitch Next WEnd Func IsVisible($handle) If BitAnd( WinGetState($handle), 2 ) Then Return 1 Else Return 0 EndIf EndFunc Any help PLZ thanx sorry for my bad language Edited May 1, 2008 by barribar
Drew Posted May 1, 2008 Posted May 1, 2008 (edited) I'm not sure , but you said this works fine when its maximized so I think I'm right. If your trying to run the program while the window "Mobile Connect","Network" is minimized , it won't work because commands like: send("{F2}") ;Connect and send("O") ;exit Send to the active window. You want those commands to be sent to the Mobile Connect. That's why it's not working when it's minimized. EDIT To fix this: Make use of commands like ControlSend HelpFile Edited May 1, 2008 by Drew
barribar Posted May 1, 2008 Author Posted May 1, 2008 I'm not sure , but you said this works fine when its maximized so I think I'm right. If your trying to run the program while the window "Mobile Connect","Network" is minimized , it won't work because commands like: send("{F2}") ;Connect and send("O") ;exit Send to the active window. You want those commands to be sent to the Mobile Connect. That's why it's not working when it's minimized. EDIT To fix this: Make use of commands like ControlSend HelpFile tank u Drew but i think the probleme is here : If WinExists("Mobile Connect","Network") AND WinExists("Mobile Connect","--") Then when this window is maximize i can show The title of window(Mobile Connect) and the texte "Network" and "--", if the window is minimize i only show the tiltle
Drew Posted May 1, 2008 Posted May 1, 2008 Well If it's working thats all that matters. Nicely done, sorry I wasn't of much help.
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