Andreik Posted December 16, 2009 Share Posted December 16, 2009 How can I create a button like this one from yahoo that open a list of images and a click on one of this images to do an action? When the words fail... music speaks. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted December 16, 2009 Share Posted December 16, 2009 Live (MSN) Messenger does it by creating an extra gui at start, and then displaying it when necessary. I checked it with Au3Info and the handle only changes when you restart the app. I would assume that Yahoo does something similar, but I don't have it installed so you will have to check that yourself. Here's what Au3Info gives me: >>>> Window <<<< Title: Class: DUIPopupMenu Position: 283, 658 Size: 355, 322 Style: 0x96000000 ExStyle: 0x00000088 Handle: 0x002006E2 >>>> Control <<<< Class: DirectUIHWND Instance: 1 ClassnameNN: DirectUIHWND1 Advanced (Class): [CLASS:DirectUIHWND; INSTANCE:1] ID: Text: Position: 0, 0 Size: 355, 322 ControlClick Coords: 135, 237 Style: 0x56000000 ExStyle: 0x00010000 Handle: 0x003807EE >>>> Mouse <<<< Position: 418, 895 Cursor ID: 2 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<< .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Andreik Posted December 17, 2009 Author Share Posted December 17, 2009 (edited) There control seems to not be a standard control that exists in AutoIt. I try to figure out how can I create a similar control (maybe a list view?). >>>> Window <<<< Title: Class: #32768 Position: 377, 197 Size: 308, 174 Style: 0x94800000 ExStyle: 0x00000189 Handle: 0x002C01BC >>>> Control <<<< Class: Instance: ClassnameNN: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: 0x000102B2 >>>> Mouse <<<< Position: 381, 304 Cursor ID: 2 Color: 0x8886D2 >>>> StatusBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<< I wrote this script that create an button in every IM windows toolbar and if I press this button then send a text. Now I want to change little, I don't want to send a text, I want to list some extra emoticons and when I click one of them to send there emoticons. #include <GuiToolBar.au3> HotKeySet("{ESC}","Quit") AutoItSetOption("WinTitleMatchMode",2) While True If WinExists("[CLASS:YSearchMenuWndClass]") Then $CTRL = ControlGetHandle("[CLASS:YSearchMenuWndClass]","","ToolbarWindow324") $COUNT = _GUICtrlToolbar_ButtonCount($CTRL) If $COUNT < 7 Then _GUICtrlToolbar_AddButton($CTRL,7,-2) EndIf If _GUICtrlToolbar_IsButtonPressed($CTRL,7) Then ControlSend("[CLASS:YSearchMenuWndClass]","","YIMInputWindow1","My button was pressed" & @CRLF) ControlSetText("[CLASS:YSearchMenuWndClass]","","YIMInputWindow1","") EndIf EndIf Sleep(10) WEnd Func Quit() Exit EndFunc Edited December 17, 2009 by Andreik When the words fail... music speaks. 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