Sign in to follow this  
Followers 0
DeathRow

FOUND A BUG in Autoit command !!

20 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Please post complete example, and your AutoIt version


Best regards,Emiel Wieldraaijer

Share this post


Link to post
Share on other sites

This is on a Win7 x86 bit

Im going to try it on a x64 it ....

Share this post


Link to post
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.

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

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

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

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Did you ever consider getting the handle of the window first and referencing that instead of the window's title?

Does WinSetState command supports handles?

Share this post


Link to post
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.

1 person likes this

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

Share this post


Link to post
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.

2 people like this

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

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
1 person likes this

Share this post


Link to post
Share on other sites

Why do people still think they can win? Do they not pay attention to the threads where I state we block tens of thousands of addresses? Do they not notice how hollow all the threats we receive end up ringing? Oh well.

4 people like this

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0

  • Similar Content

    • Shirdish_chakravarthi
      By Shirdish_chakravarthi
      Hello Friends i am new to autoit and i am stuck in middle of automation of flashing tool..
      my requirement is i have a window and i have to get the value present in that window (below is the picture)

      in the above window i need to get the value of the highlighted field.the value of this filed keeps on changing...ii need to get the current value present in the field..below are the details of the window and field..

       
      CAN it be done?
       
      thanks

    • Shirdish_chakravarthi
      By Shirdish_chakravarthi
      Hello Guys i am working on automating a flashing tool..When flashing is started if there is any error in connection it pops's up a error window...(as shown below)

       whenever this popup appears i need a msgbox to appear saying "error occured" how can i do this?
      Thanks

    • BlazerV60
      By BlazerV60
      Hello all,
      I've written the code below which launches chrome in incognito mode and then proceeds to go to the autoit website.
      From my understanding, the Run() command is also supposed to output the PID number related to the application that got launched from the Run command.
      However when I run the below lines, it outputs a PID number that is different from the newly launched chrome browser's PID number, does anyone know why and possibly explain how I could retrieve the accurate PID number associated with the newly launched browser?
      Global $iPid = Run(@ComSpec & ' /c start chrome.exe https://www.autoitscript.com/forum/ -incognito' ,"", "") msgbox(0,"",$iPid) Thank you,
      Brian
    • BlazerV60
      By BlazerV60
      Hello all,
      I've been trying to figure out how to launch Google Chrome in the background (hidden) but it doesn't seem possible. I've tried the following methods:
      ShellExecute("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "", "", "", @SW_HIDE) Also I've tried:
      ShellExecute(@ComSpec, "/c start chrome.exe","","",@SW_HIDE) Lastly I tried:
      RunWait('"'&@ProgramFilesDir&'\Google\Chrome\Application\chrome.exe" --silent-launch',@ScriptDir)  
      But all of them launch my chrome browser without hiding it. Does anyone know a workaround for this or if AutoIT just can't Chrome? 
      Bonus points if you know how to make it launch chrome hidden and make it go to https://www.autoitscript.com
       
      Thank you,
      Brian