CeMaL Posted July 26, 2010 Share Posted July 26, 2010 Fro example I will write send("!c") for start winzip Classic selcetion but I can't see which key is underlined.I know it is C for winzip because I am learning it from autoit tutorials but how can I see it in the other programmes setup? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 26, 2010 Moderators Share Posted July 26, 2010 (edited) If you get the controls text, the "Underlined" character is preceded by an ampersand. Edit for a "simple" example:Global $h_control = ControlGetHandle("Window Name or Handle", "", "ClassNameNN or Control ID ...See help") Global $s_control_text = WinGetText($h_control) Global $s_altkey = StringRegExpReplace($s_control_text, "(.*?&)(.)(.*?\z)", "2") If @extended Then MsgBox(64, "Info", "Alt Key = " & $s_altkey) Else MsgBox(16, "Error", "No Alt Key") EndIf Edit 2: For the record, this is not how I would approach dealing with controls. I'd deal with the the Control* functions. Edited July 26, 2010 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 26, 2010 Moderators Share Posted July 26, 2010 CeMaL,If I understand you correctly, you want to know which keys are "accelerated" in various applications. "Accelerated" keys are the ones you can use when that letter is underlined on various contols.The only way to find out is to press the Alt key with the application active and see! here is a small example:#include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $hButton = GUICtrlCreateButton("&Exit", 10, 10, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $hButton Exit EndSwitch WEndIf you press the Alt key you can see that the "E" in "Exit" is underlined - so sending Alt-e will action that control.Does that help - or have I missed your point completely? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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