Jump to content
Sign in to follow this  
samonlinesuper

Maximize Wireshark

Recommended Posts

samonlinesuper

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
Exit

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)

My UDFs, Abbrevs and Snippets
If you like my post, just click the like button :) 

Share this post


Link to post
Share on other sites
hannes08

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
samonlinesuper

Dears,

Thank you, it works and really appreciated.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.