Achilles Posted July 29, 2006 Share Posted July 29, 2006 Once the user of this program has clicked on button I want there to be a tool tip in a certain place in a window. The place is always over a label (or maybe button) and as soon as the button is pushed a tool tip will come up there. I looked at the tool tip thing it help but it doesn't have any parameters for setting the tool tip within a window... at least that I saw... Thanks, Piano_Man My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 29, 2006 Share Posted July 29, 2006 Once the user of this program has clicked on button I want there to be a tool tip in a certain place in a window. The place is always over a label (or maybe button) and as soon as the button is pushed a tool tip will come up there. I looked at the tool tip thing it help but it doesn't have any parameters for setting the tool tip within a window... at least that I saw...Thanks, Piano_ManMaybe you're not using Beta? Check out ToolTip() in the Beta helpfile. You can provide X/Y coordinates for the tool tip. If that's not what you meant, please clarify. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Achilles Posted July 29, 2006 Author Share Posted July 29, 2006 Maybe you're not using Beta? Check out ToolTip() in the Beta helpfile. You can provide X/Y coordinates for the tool tip. If that's not what you meant, please clarify. That's sort of what I mean. But what I want the tool tipt to appear over a GUI box I have, and if I move the Guibox moves I want the tool tip to still appear over the same button, not where the GUibox use to be. I think the X/Y coordinates are relative to the desktop screen not the window that's open right? Thanks, Piano_Man My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Vivvic Posted July 29, 2006 Share Posted July 29, 2006 (edited) Set the coord mode to windowed, not screen. EDIT: Copy & paste out of help file. Opt("CaretCoordMode", 1) ;1=absolute, 0=relative, 2=client Opt("ColorMode", 0) ;0=RRGGBB color, 1=BBGGRR color Opt("ExpandEnvStrings", 0) ;0=don't expand, 1=do expand Opt("ExpandVarStrings", 0) ;0=don't expand, 1=do expand Opt("FtpBinaryMode", 1) ;1=binary, 0=ASCII Opt("GUICloseOnESC", 1) ;1=ESC closes, 0=ESC won't close Opt("GUICoordMode", 1) ;1=absolute, 0=relative, 2=cell Opt("GUIDataSeparatorChar","|");"|" is the default Opt("GUIOnEventMode", 0) ;0=disabled, 1=OnEvent mode enabled Opt("GUIResizeMode", 0) ;0=no resizing, <1024 special resizing Opt("GUIEventOptions",0) ;0=default, 1=just notification, 2=GuiCtrlRead tab index Opt("MouseClickDelay", 10) ;10 milliseconds Opt("MouseClickDownDelay", 10) ;10 milliseconds Opt("MouseClickDragDelay", 250);250 milliseconds Opt("MouseCoordMode", 1) ;1=absolute, 0=relative, 2=client Opt("MustDeclareVars", 0) ;0=no, 1=require pre-declare Opt("OnExitFunc","OnAutoItExit");"OnAutoItExit" called Opt("PixelCoordMode", 1) ;1=absolute, 0=relative, 2=client Opt("RunErrorsFatal", 1) ;1=fatal, 0=silent set @error Opt("SendAttachMode", 0) ;0=don't attach, 1=do attach Opt("SendCapslockMode", 1) ;1=store and restore, 0=don't Opt("SendKeyDelay", 5) ;5 milliseconds Opt("SendKeyDownDelay", 1) ;1 millisecond Opt("TCPTimeout",100) ;100 milliseconds Opt("TrayAutoPause",1) ;0=no pause, 1=Pause Opt("TrayIconDebug", 0) ;0=no info, 1=debug line info Opt("TrayIconHide", 0) ;0=show, 1=hide tray icon Opt("TrayMenuMode",0) ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID not return Opt("TrayOnEventMode",0) ;0=disable, 1=enable Opt("WinDetectHiddenText", 0) ;0=don't detect, 1=do detect Opt("WinSearchChildren", 1) ;0=no, 1=search children also Opt("WinTextMatchMode", 1) ;1=complete, 2=quick Opt("WinTitleMatchMode", 1) ;1=start, 2=subStr, 3=exact, 4=advanced Opt("WinWaitDelay", 250) ;250 milliseconds Edited July 29, 2006 by Vivvic [quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote] Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 29, 2006 Share Posted July 29, 2006 That's sort of what I mean. But what I want the tool tipt to appear over a GUI box I have, and if I move the Guibox moves I want the tool tip to still appear over the same button, not where the GUibox use to be. I think the X/Y coordinates are relative to the desktop screen not the window that's open right? Thanks, Piano_ManI don't think tool tips are "anchored" to any destop item. The x/y coordinates of the particular window can be tracked and the tool tip position updated, though. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Achilles Posted July 29, 2006 Author Share Posted July 29, 2006 (edited) Set the coord mode to windowed, not screen. EDIT: Copy & paste out of help file. Opt("CaretCoordMode", 1) ;1=absolute, 0=relative, 2=client Opt("GUICoordMode", 1);1=absolute, 0=relative, 2=cell Opt("MouseCoordMode", 1) ;1=absolute, 0=relative, 2=client@ Vivvic I tried all three Choord modes that are listed here and none of them worked on 0,1 or 2... unless I did something wrong. I wrote a little script just to test them... #include <GUIConstants.au3> GuiCreate(400, 400) $button = GuiCtrlCreateButton("Hello", 150, 150, 100, 100) Guisetstate() While 1 $msg = GUiGetmsg() Select Case $msg = $button Tooltip("Hello, I hope this works", 200, 200) Opt("GUItCoordMode", 0) Case $msg = $Gui_Event_Close Exit EndSelect Wend Anyone have any ideas why it isn't working? Edit: @PsaltyDS Do you have any examples? I don't know how I would do that... thanks, Endedit Thanks Piano_Man Edited July 29, 2006 by Piano_Man My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Vivvic Posted July 30, 2006 Share Posted July 30, 2006 Opt("GUItCoordMode", 2) is for the window cord, and not sure if it matters but I always put it at the top, you have to get the windowed coords as well, in autoit window info go to options coord mode and you will be able to select window. [quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote] Link to comment Share on other sites More sharing options...
Achilles Posted July 30, 2006 Author Share Posted July 30, 2006 Opt("GUItCoordMode", 2) is for the window cord, and not sure if it matters but I always put it at the top, you have to get the windowed coords as well, in autoit window info go to options coord mode and you will be able to select window.All right I give up.. it's not working. If someone has an example that would be nice but anyways, it doesn't real matter. I'm going to create a help menu anyways and that will have the info in it that was going to go on the tooltip. However for future reference, is there a way you can keep a window from moving and still be able to use all the buttons?Piano_ManP.S. I've tried @SW_LOCK and @SW_DISABLE, but I don't know if there's some way you can only lock the window from moving... My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 30, 2006 Moderators Share Posted July 30, 2006 Why not just use GUICtrlSetTip()?#include <GUIConstants.au3> GuiCreate(400, 400) $button = GuiCtrlCreateButton("Hello", 150, 150, 100, 100) GUICtrlSetTip($button, 'It Does Work') Guisetstate() While 1 $msg = GUiGetmsg() Select Case $msg = $button Case $msg = $Gui_Event_Close Exit EndSelect Wend 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...
Achilles Posted July 30, 2006 Author Share Posted July 30, 2006 Why not just use GUICtrlSetTip()?#include <GUIConstants.au3> GuiCreate(400, 400) $button = GuiCtrlCreateButton("Hello", 150, 150, 100, 100) GUICtrlSetTip($button, 'It Does Work') Guisetstate() While 1 $msg = GUiGetmsg() Select Case $msg = $button Case $msg = $Gui_Event_Close Exit EndSelect Wend ............................................................. Didn't see that anywhere... Thanks! Piano_Man My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Vivvic Posted July 30, 2006 Share Posted July 30, 2006 XD didnt even think of that. [quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 30, 2006 Moderators Share Posted July 30, 2006 (edited) This works too if you just want it when the button is clicked:#include <GUIConstants.au3> GuiCreate(400, 400) $button = GuiCtrlCreateButton("Hello", 150, 150, 100, 100) Guisetstate() While 1 $msg = GUiGetmsg() Select Case $msg = $button $OptMCM = Opt('MOUSECOORDMODE', 1) $aMpos = MouseGetPos() Opt('MOUSECOORDMODE', $OptMCM) If IsArray($aMpos) Then ToolTip('THIS WORKS TOO', $aMpos[0] + 20, $aMpos[1] + 20) Case $msg = $Gui_Event_Close Exit EndSelect Wend Edited July 30, 2006 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...
PsaltyDS Posted July 30, 2006 Share Posted July 30, 2006 This works too if you just want it when the button is clicked:#include <GUIConstants.au3> GuiCreate(400, 400) $button = GuiCtrlCreateButton("Hello", 150, 150, 100, 100) Guisetstate() While 1 $msg = GUiGetmsg() Select Case $msg = $button $OptMCM = Opt('MOUSECOORDMODE', 1) $aMpos = MouseGetPos() Opt('MOUSECOORDMODE', $OptMCM) If IsArray($aMpos) Then ToolTip('THIS WORKS TOO', $aMpos[0] + 20, $aMpos[1] + 20) Case $msg = $Gui_Event_Close Exit EndSelect WendoÝ÷ Ûú®¢×Á«-)äx!zgØZ¾)ජmèZ0jj/x0whÁ©ÝÁ«"¨")àÙbëaÀ¥É-æî¶Ú'¶¶+ÚµïÝy§-özØ^¶%¶*ZÙ¨½ëa{§v®§wbèßÛ(«¢+Ø¥¹±Õ±ÐíU% ½¹ÍѹÑ̹ÔÌÐì)½ÁÐ ÅÕ½ÐíÕ¥=¹Ù¹Ñ5½ÅÕ½Ðì°Ä¤)U% ÉÑ ÅÕ½ÐíU$ÅÕ½Ðì°ÐÀÀ°ÐÀÀ¤)U%MÑ=¹Ù¹Ð ÀÌØíÕ¥}Ù¹Ñ} ±½Í°ÅÕ½Ðí}á¥ÐÅÕ½Ðì¤(ÀÌØíÕÑѽ¸ôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí!±±¼ÅÕ½Ðì°ÄÔÀ°ÄÔÀ°ÄÀÀ°ÄÀÀ¤)U% ÑɱMÑ=¹Ù¹Ð ÀÌØíÕÑѽ¸°ÅÕ½Ðí}QQ}Q½±ÅÕ½Ðì¤)U%MÑMÑÑ ¤()¥´ÀÌØíQQ}=¸ôÀ°ÀÌØí]¥¹1ÍÑA½ÍlÑtôl´Ä°´Ä°´Ä°´Åt)]¡¥±Ä(%%ÀÌØíQQ}=¸Q¡¸($$ÀÌØí]¥¹ ÕÉÉA½Ìô]¥¹ÑA½Ì ÅÕ½ÐíU$ÅÕ½Ðì¤($%%ÀÌØí]¥¹ ÕÉÉA½ÍlÁt±ÐìÐìÀÌØí]¥¹1ÍÑA½ÍlÁt=ÈÀÌØí]¥¹ ÕÉÉA½ÍlÅt±ÐìÐìÀÌØí]¥¹1ÍÑA½ÍlÅtQ¡¸($$$ÀÌØí]¥¹1ÍÑA½ÌôÀÌØí]¥¹ ÕÉÉA½Ì($$%Q½½±Q¥À ÌäíQ!%L]=I-LQ= Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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