AutoHotkey Community

It is currently May 27th, 2012, 10:28 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: June 19th, 2004, 10:26 am 
Offline

Joined: April 7th, 2004, 2:43 pm
Posts: 62
Rajat,
how do we get your script to show the mouse menu position so that the mouse menu is by default positioned above menuitem1 (instead of the tooltip being at the lowerright of the mouse)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2004, 6:06 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
Payam,

I'd updated the script to make the menu appear at exactly the mouse cursor's top point (where other context menus appear) but didn't make a post to notify it (sorry!)

this part took care of that
Code:
   MouseGetPos, mX, mY
   ToolTip, %Menu%, %mX%, %mY%
   WinActivate, %MenuTitle%


now if you want to adjust its position even more (like the 1st item under cursor initially)

then use this

Code:
   MouseGetPos, mX, mY
   mY -= 20
   mX -= 10
   ToolTip, %Menu%, %mX%, %mY%
   WinActivate, %MenuTitle%

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2004, 6:12 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
also, i've just updated the script for 2 improvements:

1. the left mouse button is not always a hotkey, its so only when the menu is shown. though this doesn't affect behaviour but i think its more optimal.

2. the menuitems can have spaces, and the title doesn't need to be of 3 lines.

just do this to use spaces:

if u want the menuitem to be 'Microwoft Word' then put it so but make the section name 'MicrowoftWord'

(ie. remove spaces from the menuitem name for its correlating section)

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 21st, 2004, 10:49 am 
Offline

Joined: April 7th, 2004, 2:43 pm
Posts: 62
great improvements, thanks!


Report this post
Top
 Profile  
Reply with quote  
PostPosted: June 21st, 2004, 2:15 pm 
This program is outstanding.
It is easy to modify to bring up my most common emails, web page, etc, but the previous message putting Microsoft Word, makes one think of even more tremendous use of this program.
Perhaps it could also be modified so not only does a list of the same, or global item always come up, but an application specific one, only when that application is active would also come up, or be attached. Kind of like a macro buttons for those applications that do not have that feature.
I would like to work on this, but do not have that much experience. What a way to learn, but has anybody done that, or any ideas?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 21st, 2004, 5:06 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
Thanx for the idea. It intrigued me so i went ahead and improved the menu.

Now the menu can have two types of entries. First, normal global entries. Second, dynamic entries based on active application.

Also, now the menu has items sorted out.

Get the script & details in main post.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 21st, 2004, 5:07 pm 
Offline

Joined: April 5th, 2004, 7:24 pm
Posts: 98
Location: Connecticut USA
i've done that using a crude method (no indexing).

i added a timer that runs the following.

Code:
ifwinactive, MicroPlanet Gravity               ;AHK popup floater
{
   if  whichmenu <> 3
   {
      SoundPlay, f:\awav\.boing.wav
      gosub gravmenupop
      detectHiddenWindows, Off
      return
   }
}






here is the modifed popup.
Code:
gravmenupop:          
#MaxThreadsPerHotkey 1                  ;;_____________________popup  menu
;;;;SoundPlay, f:\awav\.shorter.wav
whichmenu = 3
Menu = %MenuTitle%
Loop
{
    IfEqual, gMenuItem%a_index%,, Break          ;if index seq broken, end
       ;sleep 10
       ;msgbox, 0, , gMenuItem%a_index%, .9
    MenuItems ++                ;how many menulines for leftclick
    StringTrimLeft, MenuText, gMenuItem%a_index%, 0
    Menu = %Menu%`n%MenuText%
}
mousemove, 750, 85
ToolTip, %Menu%
   ;WinActivate, %MenuTitle%
WinActivate, ahk_class tooltips_class32
sleep 50
MouseGetPos, xpos, ypos

xpos += 20
ypos += 60 ; 100
mousemove, %xpos%, %ypos%, 1
Return



here is the modified Lbutton

Code:
~LButton::           ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;;ahk_class tooltips_class32
#MaxThreadsPerHotkey 1
;SoundPlay, f:\awav\.shorter.wav
FileAppend,  Lbutton clicked 1 %A_Hour% %A_Min% %A_Sec% %MenuTitle%`n, c:\popuptrace.txt
                        ;WinActivate, ahk_class tooltips_class32   

if whichmenu = 2, gosub popupmenu2
if whichmenu = 3
   {
   gosub gravmenu
   return
   }

IfWinNotActive, ahk_class tooltips_class32             ;;%MenuTitle%
    {
    ;msgbox, 0, , menutitle not active, .6
   FileAppend,  popup winnotactive 2 %A_Hour% %A_Min% %A_Sec% %MenuTitle%`n, c:\popuptrace.txt
    ToolTip
       Return
    }

CoordMode, Mouse, Relative
MouseGetPos, mX, mY


ToolTip                  ;toggles tooltip off
;send, {F16}                  ;msg to apps dialog.hk

mY -= 3         ;space after which first line starts
mY /= 18        ;space taken by each line
         ;/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IfLess, mY, 1, Return
IfGreater, mY, %MenuItems%, Return
StringTrimLeft, TargetSection, MenuItem%mY%, 0
sleep 50
;WinWaitActive, ahk_class tooltips_class32
FileAppend,  popup activeee 2 %A_Hour% %A_Min% %A_Sec%  %mY% %TargetSection% %MenuTitle%`n, c:\popuptrace.txt
Gosub, %TargetSection%
mY = 0
   ; mousemove, 400, 180
Return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 21st, 2004, 5:40 pm 
What a second, havn't had a coffee yet!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 10th, 2005, 7:33 pm 
Offline

Joined: June 26th, 2005, 9:43 pm
Posts: 40
Location: Portugal
the script wasn't doing nothing .. I had to edit "UMDelay = 20" to "UMDelay = 0" ..
And now it works good ^^

_________________
Belial


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 15th, 2005, 1:07 pm 
Offline

Joined: June 11th, 2005, 9:34 am
Posts: 264
Location: England ish
cry*
dunow why but it doesnt work on myne either..
do i have to adjust any thing b4 runnin it?

_________________
::
I Have Spoken
::


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 15th, 2005, 4:10 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
this script is kind of outdated. i developed it to make a cmd menu when there was no menu cmd in ahk.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 16th, 2005, 1:25 am 
Rajat wrote:
this script is kind of outdated. i developed it to make a cmd menu when there was no menu cmd in ahk.


I'm having a hard time figuring out this menu command. Can somebody post up some code that will do, basically, what Rajat's script did? I'll be happy even if it's super simple. I just don't even know where to start...

THanks...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 16th, 2005, 9:04 am 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
It shows a tool tip with the options. Then when the user clicks on the tool tip he gets the position of the click and calculates the item clicked, then he performs the appropiate action.

Does this help?

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Sweet
PostPosted: November 18th, 2005, 5:35 am 
Offline

Joined: October 3rd, 2005, 10:56 pm
Posts: 4
Location: Detroit
Very creative!!

Nice idea, excellent execution. I should make a gui for "non-technical" employees that work for me so they can all customize the hotkey and the menu; I'll post if/when i do.

Much props for this it can save much time if someone has to access certain files multiple times a day, thus saving big bucks in the corporate world. Thank you so much for sharing this. You might even want to look into developing this into an application and selling it as a "shortcut timesaver" to corporate america. I think you've really got something going here.

Big Respect!!

_________________
~Cheers~
~Respect~


DubZ


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 20 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group