Jump to content
Sign in to follow this  
samonlinesuper

Maximize Wireshark

Recommended Posts

Dear All,

I am new of AutoIT and I create a simple script and wants o Maximize the "Wireshark" windows; so I use Run"...........\wireshark.exe", "", @SW_MAXIMIZE)but it doesn't work.

Could anyone help and thank you.

Share this post


Link to post
Share on other sites

Run"...........\wireshark.exe", "", @SW_MAXIMIZE)

It depends on those "...........". It is different in x86 and x64 Systems and in which mode its running.

Just search for the executable like here:

Opt("ExpandEnvStrings", 1)
$wiresharkdir = ""
if FileExists("%ProgramFiles%\Wireshark\wireshark.exe") Then $wiresharkdir = "%ProgramFiles%\Wireshark"
if FileExists("%ProgramFiles(x86)%\Wireshark\wireshark.exe") Then $wiresharkdir = "%ProgramFiles(x86)%\Wireshark"
if FileExists("%ProgramW6432%\Wireshark\wireshark.exe") Then $wiresharkdir = "%ProgramW6432%\Wireshark"
; MsgBox(262144,"",@lf & $wiresharkdir & @lf,0)
Run($wiresharkdir & "\wireshark.exe",$wiresharkdir ,@SW_MAXIMIZE)
WinWaitActive("The Wireshark Net","",20)
beep()
Sleep(500)
WinSetState("[last]","", @SW_HIDE)
Sleep(500)
WinSetState("[last]","", @SW_RESTORE)
Sleep(500)
WinSetState("[last]","", @SW_MAXIMIZE)

App: Au3toCmd              UDF: _SingleScript()                             

Share this post


Link to post
Share on other sites

It didn't start maximized on my WinXP32bit from the start so I needed to put the WinWaitActive and WinsetState behind the Run function.


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...