Sign in to follow this  
Followers 0
Roostaamir

What's wrong with this code?

8 posts in this topic

Hi again

I am totally new to autoit,so sorry about asking stupid questions

The thing I am trying to do is to close an internet explorer window

So the code should be like this:

WinClose ( " Internet Explorer " )

But it won't work,and internet explorer won't close

What's the problem?

Share this post


Link to post
Share on other sites



See WinTitleMatchMode in AutoitSetOption.

The title is not "Internet Explorer" I guess, that is only a part of the title.


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Maybe It wont Be the title(or maybe the starting) of your Internet Explorer

You can try it out with CLASS or You can use Process Close / Kill

Example

If WinExists('[CLASS:IEFrame]') Then ;to find the Class Use Autoit v3 Window Tool
WinClose('[CLASS:IEFrame]','')
Local $x=ProcessClose('iexplore.exe');If Unable to close the Window then Close the Process
If $x=0 Then WinKill('[CLASS:IEFrame]','');If Unable to close iexplore.exe then Kill the Window
EndIf

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites

Thumbs Up If it Helps u out


My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites

Thanks for the code

Now I have another question

What exactly is the title of a window?

Isn't it the one that is shown in the tasks section of the taskmanager?

For example if I navigate to my router in IE I will see this in the taskmanager:

Dsl router - Windows Internet Explorer

Isn't this the title?(I tried this one too,but it didn't work)

Share this post


Link to post
Share on other sites

Dsl router - Windows Internet Explorer

Isn't this the title?(I tried this one too,but it didn't work)

Yes. Setting WinTitleMatchMode (as suggested earlier) to 2 will match just the phrase 'Internet Explorer' in that whole title string, and that will probably resolve this issue.

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

I got it now

Thanks for the help guys

Share this post


Link to post
Share on other sites

Your Welcome

Any Query More Help is Always Appreciated.........

Regards

Phoenix XL


My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0