Shekar Posted May 16, 2013 Share Posted May 16, 2013 Hi All I am new for this AutoIT , here with this autot it i need to click on text which is available on file MENU like I am using Wireshark tool in that file MENU i need click on "Export Specifed Packets" text please help me on this using Control click here i am unable to find out the Control ID, And next time the text might be change. Help would be appreciate Regards, Shekar Link to comment Share on other sites More sharing options...
PhoenixXL Posted May 16, 2013 Share Posted May 16, 2013 (edited) have you tried with WinMenuSelectItem ? Edited May 16, 2013 by PhoenixXL My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression. Link to comment Share on other sites More sharing options...
Shekar Posted May 16, 2013 Author Share Posted May 16, 2013 Thanks Phoenix, I tried with below code but it's not working.. DIM $s=WinActivate("Logout_login") Local $sFile = @ScriptDir & "SSLSession" WinFlash("Logout_login", "Logout_login",2,100) Send("!f") Sleep(4000) WinMenuSelectItem("Logout_loging", "Export Specifed Packets", "Export Specifed Packets") Sleep(2000) can u please sujjest me.. on this Thanks Shekar Link to comment Share on other sites More sharing options...
PhoenixXL Posted May 16, 2013 Share Posted May 16, 2013 (edited) Have a look here #include <GUIConstants.au3> ;for $GUI_EVENT_CLOSE GUICreate("Logout_loging") $iMenuID = GUICtrlCreateMenu("&File") $iMenuItem = GUICtrlCreateMenuItem("Export S&pecifed Packets", $iMenuID) GUISetState() AdlibRegister("SelectItem", 5000) ;select the menu item every 5 secs ;wait 5secs and the menu item would be selected. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $iMenuItem MsgBox(64, "Info", "Menu Item clicked") EndSwitch WEnd Func SelectItem() WinMenuSelectItem("Logout_loging", "", "&File", "Export S&pecifed Packets") ;the text field is not required if you don't have it. EndFunc ;==>SelectItem if there is a "_" under any alphabet prefix that alphabet with a &. Send("!f") Sleep(4000) WinMenuSelectItem("Logout_loging", "Export Specifed Packets", "Export Specifed Packets") Sleep(2000) can u please sujjest me.. on this There is no need to Send("!f") to focus the menu, u need to specify the name of the item in the 3rd parameter. U have to specify the sub-item name in the 4th parameter. Leave the second parameter if you don't know the text the GUI is having. These informations could be found out using the au3info tool that comes along Autoit WinMenuSelectItem("Logout_loging", "", "Export Specifed Packets", "Export Specifed Packets") The above would work if the item and the subitem name is Export Specifed Packets Edited May 16, 2013 by PhoenixXL My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now