pammi Posted May 14, 2012 Share Posted May 14, 2012 Hi Everyone, Is it possible to fetch the Control Type of the spin control button. In my scenario I need to double click on a listview item then the Spin control appears and I need to validate whether that control(Spin Control) is visible or not. I am not able to use Au3Info tool on the Spin control. The spin control button disappears as soon as I click my mouse outside the application. Please share if you have any ideas on this Link to comment Share on other sites More sharing options...
stormbreaker Posted May 14, 2012 Share Posted May 14, 2012 Something like this: expandcollapse popup#include <GUIConstants.au3> #include <WIndowsConstants.au3> #include <GuiListView.au3> ; Global constants for mousclick detection & ListView Events GUIRegisterMsg($WM_NOTIFY, "_WM_Notify_Events") GUICreate("listview items", 220, 250, 100, 200, -1) $listview = GUICtrlCreateListView("col1|col2|col3 ", 10, 10, 200, 150);,$LVS_SORTDESCENDING) GUICtrlSendMsg($listview, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_TRACKSELECT, $LVS_EX_TRACKSELECT) $item1 = GUICtrlCreateListViewItem("Data|Data|Data", $listview) $item2 = GUICtrlCreateListViewItem("Data|Data|Data", $listview) $item3 = GUICtrlCreateListViewItem("Data|Data|Data", $listview) $label = GUICtrlCreateInput("Single,double or right Click any row", 10, 210, 180, 20) GUISetState() Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE ;---------------------------------------------------------------------------------------------- Func _WM_Notify_Events($hWndGUI, $MsgID, $wParam, $lParam) ;---------------------------------------------------------------------------------------------- #forceref $hWndGUI, $MsgID, $wParam Local $tagNMHDR, $event, $hwndFrom, $code $tagNMHDR = DllStructCreate("int;int;int", $lParam);NMHDR (hwndFrom, idFrom, code) If @error Then Return $event = DllStructGetData($tagNMHDR, 3) If $wParam = $listview Then ;ConsoleWrite($Event&@crlf) If $event = $NM_DBLCLK Then $updown = GuiCtrlCreateUpDown($label) GUICtrlSetData($label, "Double Click detected") If $updown = 0 then msgbox(16, "", "No spin control created.") else msgbox(64, "", "Success.") EndIf EndIf EndIf $tagNMHDR = 0 $event = 0 $lParam = 0 EndFunc ;==>_WM_Notify_Events ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1 Link to comment Share on other sites More sharing options...
pammi Posted May 14, 2012 Author Share Posted May 14, 2012 @MKISH, I am not trying to create a spin control. I need to fetch the info on a existing application. Attached is the screenshot Link to comment Share on other sites More sharing options...
kaotkbliss Posted May 14, 2012 Share Posted May 14, 2012 Start the Autoit window info tool, click options and uncheck freeze. Start your application and hover the mouse over your spin control and the info tool should update with the control details under the mouse. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Andreik Posted May 14, 2012 Share Posted May 14, 2012 Looks like Updown control. Use GUICtrlCreateUpdown and see if is what you need. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
stormbreaker Posted May 15, 2012 Share Posted May 15, 2012 Use AutoIt window info tool as suggested by kaotkbliss. If you wish to get info of this control from your script, I suggest reading controlgettext from help-file. ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1 Link to comment Share on other sites More sharing options...
pammi Posted May 15, 2012 Author Share Posted May 15, 2012 thanks for the help kaotkbliss and MKISH. I unchecked the freexe option and was able to fetch the control info. 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