Jump to content

Recommended Posts

Well ,sometimes if you try to pen firefox hidden or minimized,doesn't work ,and when it works,you can't show it again on the monitor ;)

ShellExecute( "C:\Program Files\Mozilla Firefox\firefox.exe","Google - Mozilla Firefox","","open",@SW_HIDE)
Sleep(2000)
WinSetState( "Google - Mozilla Firefox","",@SW_SHOW)
Edited by DeathRow
Link to comment
Share on other sites

Lets talk about the reason... why would you try to HIDE the window at first, and the next thing you want to do is to SHOW it... ?

beats me.

Whats your problem ? ? I don't understand why you deviate from the subject, its just an example to see that its a bug and doesn't work!

Next time don't put stupid comments

Edited by DeathRow
Link to comment
Share on other sites

I copied and pasted your code into my editor. You then edited your post to show it corrected. I then made my post with the code corrected. You just happen to correct it in your post the same way I did. You then try to say you didn't make an error. Nice try.

Link to comment
Share on other sites

When closing a subject please don't everwrite your original post and/or the original topic title.

All threads and posts serve as a reference for future users. If parts of the thread are missing it becomes useless.

If you want to close a thread prepend "[Closed]" to the topic title.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I copied and pasted your code into my editor. You then edited your post to show it corrected. I then made my post with the code corrected. You just happen to correct it in your post the same way I did. You then try to say you didn't make an error. Nice try.

I saw my fault before you posted it and I quickly edit it and then I saw that you posted it too.

Ok so the code works well but not al all with firefox :

ShellExecute( "C:Program FilesMozilla Firefoxfirefox.exe","www.google.com","","open",@SW_HIDE)
Sleep(2000)
WinSetState( "Google - Mozilla Firefox","",@SW_SHOW)
Edited by DeathRow
Link to comment
Share on other sites

it works fine

opt("wintitlematchmode" , 2)

ShellExecute( "C:Program FilesMozilla Firefoxfirefox.exe","www.google.com","","open",@SW_HIDE)
Sleep(2000)
WinSetState( "Google - Mozilla Firefox","",@SW_SHOW)

edit: also works fine without the matchmode

Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

DeathRow,

By using

WinSetState( "Google - Mozilla Firefox","",@SW_SHOW)

you assert that FireFox will have this content in the window title, which implies that Firefox will have accessed the Internet successfully and loaded the default page (which you also assume to be Google). One or more of these assertions can easily be proven wrong at times for some reason.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Then ,open manually firefox and maximize it then close it and run this code:

ShellExecute( "C:Program FilesMozilla Firefoxfirefox.exe","www.google.com","","open",@SW_HIDE)

Then tell me if the window hided or not

Edited by DeathRow
Link to comment
Share on other sites

Does WinSetState command supports handles?

From the help file:

Window Handles / HWNDs

The variant datatype in AutoIt natively supports window handles (HWNDs). A window handle is a special value that windows assigns to a window each time it is created. When you have a handle you may use it in place of the title parameter in any of the function calls that use the title/text convention. The advantage of using window handles is that if you have multiple copies of an application open - which have the same title/text - you can uniquely identify them when using handles. When you use a window handle for the title parameter then the text parameter is completely ignored.

Various functions such as WinGetHandle, WinList and GUICreate return these handles. It is important to note that a window handle is not classed as a number or string - it is its own special type.

Note: Window handles will work no matter what WinTitleMatchMode is currently in use.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Stop being an argumentative bitch and work with the people trying to help you or I will remove your ability to receive support on this forum. Your attitude and behavior are not acceptable for somebody requesting help from volunteers.

Wow, you are really coureageous o.o ...because you are the admin and you can ban, and all the skids are licking you in the ass, no ? But what was if you wasn't ?? Let me tell you: you are my personal bitch ! Best escort ever!! Hmm... and I really love how you fools are asking "why are you doing this,why you want to do that..."( because you are afraid of...I know it...) and then I lie your asses up with all the bullshits and you trust them ...hahahaha

"...the people trying to help you..." well..you are very helpful too, my lovely escort, and all your script skids :]] Don't know shit about C++ ....

And my last wish : click on this little doggy and press Ctrl + A ;)

....................../´¯/)

....................,/¯../

.................../..../

............./´¯/'...'/´¯¯`·¸

........../'/.../..../......./¨¯

........('(...´...´.... ¯~/'...')

..........................'...../

..........''............. _.·´

..........................(

..............................

Edited by DeathRow
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...