Jump to content



Photo

FOUND A BUG in Autoit command !!


  • This topic is locked This topic is locked
19 replies to this topic

#1 DeathRow

DeathRow

    Wayfarer

  • Banned (NOT IN USE)
  • 69 posts

Posted 20 April 2012 - 10:04 AM

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, 20 April 2012 - 01:16 PM.








#2 notsure

notsure

    Polymath

  • Active Members
  • PipPipPipPip
  • 205 posts

Posted 20 April 2012 - 10:47 AM

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.

#3 DeathRow

DeathRow

    Wayfarer

  • Banned (NOT IN USE)
  • 69 posts

Posted 20 April 2012 - 11:39 AM

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, 20 April 2012 - 11:39 AM.


#4 Emiel Wieldraaijer

Emiel Wieldraaijer

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 651 posts

Posted 20 April 2012 - 11:46 AM

Please post complete example, and your AutoIt version
Best regards,Emiel WieldraaijerPosted Image

#5 YogiBear

YogiBear

    deFinitely not yoUr average bear!

  • MVPs
  • 9,873 posts

Posted 20 April 2012 - 11:53 AM

second that. Also, can you duplicate your experience on a different PC? In many cases the issue is with the specific PC, not AutoIt.

#6 DeathRow

DeathRow

    Wayfarer

  • Banned (NOT IN USE)
  • 69 posts

Posted 20 April 2012 - 11:54 AM

This is on a Win7 x86 bit

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

#7 YogiBear

YogiBear

    deFinitely not yoUr average bear!

  • MVPs
  • 9,873 posts

Posted 20 April 2012 - 11:58 AM

Works fine for me:
ShellExecute( "C:Windowsregedit.exe","","","open",@SW_HIDE) Sleep(2000) WinSetState( "Registry Editor","",@SW_SHOW)

Your problem was you had WinSetState configured wrong. There is no bug.

#8 YogiBear

YogiBear

    deFinitely not yoUr average bear!

  • MVPs
  • 9,873 posts

Posted 20 April 2012 - 12:23 PM

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.

#9 water

water

    ?

  • MVPs
  • 10,696 posts

Posted 20 April 2012 - 12:33 PM

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.

UDFs:

Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts

WordEX (2012-12-29 - Version 1.3 released) - Download

ExcelEX (2013-05-11 - Alpha 4 released) - Download


#10 YogiBear

YogiBear

    deFinitely not yoUr average bear!

  • MVPs
  • 9,873 posts

Posted 20 April 2012 - 12:35 PM

your original code I copied:
ShellExecute( "C:Windowsregedit.exe","","","open",@SW_HIDE)
Sleep(2000)
WinSetState( "C:Windowsregedit.exe","",@SW_SHOW)

#11 DeathRow

DeathRow

    Wayfarer

  • Banned (NOT IN USE)
  • 69 posts

Posted 20 April 2012 - 01:14 PM

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, 20 April 2012 - 01:14 PM.


#12 boththose

boththose

    that means two things

  • Active Members
  • PipPipPipPipPipPip
  • 890 posts

Posted 20 April 2012 - 01:57 PM

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, 20 April 2012 - 01:59 PM.

Spoiler

#13 jchd

jchd

    Whatever your capacity, resistance is futile.

  • MVPs
  • 3,256 posts

Posted 20 April 2012 - 02:24 PM

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.
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQL tutorial (covers generic SQL, but most of it apply to SQLite as well)An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious workPCRE v8.32 regexp pattern documentation. AutoIt uses a slightly older version so that more advanced features are not all available.RegExp tutorial: enough to get started

#14 DeathRow

DeathRow

    Wayfarer

  • Banned (NOT IN USE)
  • 69 posts

Posted 20 April 2012 - 02:42 PM

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, 20 April 2012 - 02:43 PM.


#15 YogiBear

YogiBear

    deFinitely not yoUr average bear!

  • MVPs
  • 9,873 posts

Posted 20 April 2012 - 02:55 PM

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

#16 DeathRow

DeathRow

    Wayfarer

  • Banned (NOT IN USE)
  • 69 posts

Posted 20 April 2012 - 02:59 PM

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?

#17 BrewManNH

BrewManNH

    באָבקעס מיט קודוצ׳ה

  • MVPs
  • 6,877 posts

Posted 20 April 2012 - 03:02 PM

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.


  • DeathRow likes this

How to ask questions the smart way!

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 editorGUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.

GUIToolTip UDF Demo - Demo script to show how to use the GUIToolTip UDF to create and use customized tooltips.

Posted Image


#18 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 20 April 2012 - 04:46 PM

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.
  • BigDod and jchd like this

#19 DeathRow

DeathRow

    Wayfarer

  • Banned (NOT IN USE)
  • 69 posts

Posted 20 April 2012 - 05:30 PM

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, 20 April 2012 - 05:31 PM.

  • CaptainClucks likes this

#20 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 20 April 2012 - 05:47 PM

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.
  • Bowmore, BigDod, twitchyliquid64 and 1 other like this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users