AutoHotkey Community

It is currently May 25th, 2012, 6:38 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: AHK Pie menus
PostPosted: January 12th, 2005, 6:04 am 
Offline

Joined: December 14th, 2004, 11:34 pm
Posts: 45
Location: Minneapolis, MN
Like I don't have enough to do... I was thinking of hacking out some pie menus in AHK. Basically, when you click with a hotkey, it will pull up a menu where you clicked. Instead of being a list, the options will be in circle. An option could either start a program or expand to another menu. I'm wondering if someone already has some kind of menu app put to together so I don't have to start from scratch.

Tom


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 12th, 2005, 7:06 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Radial menus are still too conceptual for there to be an app, at least from a quick Google (hopefully Wonder BoBo can help us out here), the only thing I know of is the Firefox plugin. I'm really interested in this project though; would you mind a co-coder? If you'd like to work together on this, post whatever code (or concept) you have already. If not, that's cool, but beware: my curiousity might overload and I might start tinkering! :P


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 12th, 2005, 10:39 am 
Maybe a quik check of that source can help :wink:

Quote:
Frequently asked questions

Is the extension open source?
Yes. The RadialContext menu is available under a BSD license. If you installed it, you already have the sources on your hard disk.

[radialthinking]


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 16th, 2005, 5:20 pm 
Hiya! A radial menu is exactly what i'm looking for as well. I'm mainly looking to replace the important menus in photoshop and illustrator so i can run them full screen and just toggle a key to select what i need without having to remember every single hotkey. It'd also be nice to be able to have the start menu catagorically organized like that too. Maya also has a nice marking menu....like a pie nemu, but you drag and relase this arrow pointer. Object dock also has this circular memu and that expands and rotates (http://www.stardock.com/products/objectdock/).
Here's some pie menu links YOU WANT!! :p

here's an activex plugin with source code & interesting links:
http://catalog.com/hopkins/piemenus/index.html

do a find for "marking menu" ..you'll see it's actually pretty funny:
http://slashdot.org/article.pl?sid=00/0 ... de=thread/

http://www.art.net/~hopkins/Don/piemenus/index.html

yeah this is obvious, but it worked for me :roll:
http://www.google.com/search?num=100&hl ... tnG=Search

I'm really pretty new to coding mostly. I'm more of an artist then a programmer atm. But if you need some help I'm here.

Oh , btw incase anybody has trouble finding the source it'd be in
c:\documents and settings\[user]\application data\mozilla\firefox\extensions ....and then find the folder with radialcontext.jar. The main pie menu code is in content\radialcontext\rcmMenu.js. The code actually doesn't look all that bad (as in me being able to understand it.) Reminds me a lot of actionscript..err.....javascript...ah i'll shut up now.

Anyway, keep up the good work. :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2005, 1:07 am 
Offline

Joined: January 30th, 2005, 11:18 pm
Posts: 133
Location: Darmstadt, Germany
Hi!

I also thought of radial menus the last days. But I would really love to see a rm made in AHK since all other products I found in the web are either not working Windows-wide or are too limited in configuration.

Based on the Google search Looq provided, I found this page which shows concepts quite fine:
http://doc.trolltech.com/qq/qq11-piemenu.html

Maybe we can build something similar by utilizing SplashImage and transparent GIF images?
I´m very new to AHK programming but have experience in programming at all, so I hope being able to add some lines and thoughts to an AHK community project.

Regards,
Rob


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2005, 1:43 am 
Guess, it would help to have something like an "image map" functionality in AHK ... :idea: :?: :wink:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2005, 3:34 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Seeing as the goal is configurability (any other goal would be nonsensical for a general-purpose menu app), I think gif's with SplashImage would be extremely hard to implement. It brings the depth of configuration to, like, the position on the screen and the fade-in rate. Whoop-dee-do.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2005, 5:40 am 
Offline

Joined: December 14th, 2004, 11:34 pm
Posts: 45
Location: Minneapolis, MN
I played with this a little bit, but didn't get very far. Things have been too busy. What I envisioned wouldn't be that "flashy" due to AHK's limitations. Basically, it would go something like this:

Establish the options to display
-probably just text to keep things simple at first
-8 or less options per menu
-clicking on one of the text items could run arbitrary code, or invoke another menu
Add text to the gui
-get in general position with sin/cos functions, dividing the cicle up by the number of options
-use a static radius for the time being
-position based upper left for now
Reposition Text
-go through each text item and center it to it's upper left coodinate (once the text is added to the gui, it has coodinates and size to center on)
Make the window with no title bar and sides
-invoke with hotkey and place at current cursor

things to think about:
-making the code modular enough to support arbitrary number of options in the menu
-finding a way to define the menu in a simple way to customize, yet easy to write the code around
-dealing with multiple menus in the same script

I've looked at the websites listed in previous posts - specifically http://www.piemenus.com/ . The ActiveX pie menus are great and definitly what I envisioned, but they are limited to the browser. Looking at the XML and code may help to "port" it to AHK since they have done most of the work already. Using that code as a framework might be the way to go. If someone wants to get the ball rolling and write something, go for it. Just post here with your progress and what you've got going so we can all provide input and code as needed.

I second the image map idea... that was my first thought. Chris? Any input?

Tom


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2005, 9:01 am 
Quote:
The ActiveX pie menus are great and definitly what I envisioned, but they are limited to the browser
Interesting. But, what about HTA ? Well, you need the browser components as the runtime environment. But the HyperTextApplication isn't depending on an open browser window, correct ?

My main concern would be how to link AHK to such a "Frontend" ?
Using files, environment vars, the clipboard, ... ?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2005, 9:40 am 
AFAIK that ImageMap concept is also available within CHM-Manuals eg. to create "Hotspots" on a given screenshot which are linked to a specific section of the manual ... maybe that can be adopted ?

Braindump :wink:
Code:
GUI, Area1, vMyVar, X1Y1, X2Y2, X3Y3[, Coord4, Coord5, ...]


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2005, 1:42 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
3tones wrote:
I second the image map idea... that was my first thought.
BoBo wrote:
GUI, Area1, vMyVar, X1Y1, X2Y2, X3Y3[, Coord4, Coord5, ...]

You could simulate image map behavior. Here is an example (you'll have to substitute an image of your own for in the first line):
Code:
Gui, add, picture, gPicClick, CD Eject with fading icon.bmp
Gui, show
return

PicClick:
MouseGetPos, GuiX, GuiY, GuiWin, GuiCtrl
; Convert coordinates to those relative to the picture itself:
ControlGetPos, CtrlX, CtrlY,,, %GuiCtrl%, ahk_id %GuiWin%.
ClickX := GuiX - CtrlX
ClickY := GuiY - CtrlY
MsgBox You clicked the picture at its internal coordinates %ClickX%,%ClickY%
return

GuiClose:
ExitApp
If the above seems inadequate or overly complicated, I can add built-in image maps to the to-do list as a relatively low priority.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 1:57 am 
Offline

Joined: January 30th, 2005, 11:18 pm
Posts: 133
Location: Darmstadt, Germany
I tried to get around that by adding different pictures at the appropriate positions and make their border color transparent.
Unfortunately, if a picture lies above another, its transparent portion makes also the underlying picture transparent where it should not be. I am not sure if this is a bug or I am doing something wrong. This is the relevant portion:

Code:
Gui, Color, FF00FF
DetectHiddenWindows on
WinWait, %A_ScriptName%
WinSet, TransColor, FF00FF
Gui, Add, Picture, x25 y0, %imgPath%\ring_01_north.gif
Gui, Add, Picture, x25 y70, %imgPath%\ring_01_south.gif
Gui, Add, Picture, x0 y25, %imgPath%\ring_01_west.gif
Gui, Add, Picture, x70 y25, %imgPath%\ring_01_east.gif
Gui, Show


If you want I can link to a small screenshot of this.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 1:09 pm 
My testing result.

GUI background set transparent
Non Hotspot area of the image set to be transparent as well.

As you can see the "overlapping" (transparent) area of image "blue" covers the non-transparent part of image red. Based on the standard behaviour a mouse click done on this area will act on the level below the GUI instead as expected on the level of image "red".

Its easy to identify.
If Notepad is behind the GUI, the mouse cursor if set at the transparent area which covers the red Hotspot, will remain as IBaem and won't change to become an Arrow.

Code:
__ Image Blue
  __ Image Red
    __ GUI
      __ Desktop


Image

Image: .gif
Hotspot: red
NonHotspor: silver
Scale: 25x25 p

Thoughts ?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 1:41 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
RobOtter wrote:
if a picture lies above another, its transparent portion makes also the underlying picture transparent where it should not be. I am not sure if this is a bug or I am doing something wrong.
Everything looks okay in that example, and I don't see a way to fix this in the code. So this is probably normal behavior.

BoBo, although you explained the behavior well, I'm at a loss for anything to say about it. Hopefully others will be of more help.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 2:21 pm 
Offline

Joined: January 30th, 2005, 11:18 pm
Posts: 133
Location: Darmstadt, Germany
I haven´t had a look at the AHK source code, but it seems to me like you first stack images one over the other and compute transparency in the end for the resulting over-all picture. This leads to the effect that while stacking, the transparent color is NOT treated as "not there" and will of course overwrite the underlying pixels.
IMHO you would have to compute transparency for the color of each picture at the time when it is added so that it does not overwrite pixels.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: bbwht and 15 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