 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
joebodo
Joined: 28 Apr 2008 Posts: 46
|
Posted: Thu May 29, 2008 3:12 am Post subject: |
|
|
Download the latest version to support the following.
Register a callback for the tray menu items in the initialization function
| Code: | CommandRegister("SweptAway MenuItem", "sweptAway_MenuItem")
|
Add the menu items
| Code: | ; create a SweptAway submenu
COMMAND("Menu Add", "/menu:SweptAway /item:Preferences /menuCommand:SweptAway MenuItem /option:Preferences")
COMMAND("Menu Add", "/menu:SweptAway /item:Help /menuCommand:SweptAway MenuItem /option:Help")
....
; add the submenu to the tray
COMMAND("Menu Add", "/menu:Tray /item:Swept Away /submenu:SweptAway")
|
; create the callback function
| Code: | sweptAway_MenuItem(A_Command, A_Args) {
option := getValue(A_Args, "option")
if (option = "Preferences") {
gosub,PREFS
...
|
|
|
| Back to top |
|
 |
TotalBalance
Joined: 22 Jan 2007 Posts: 175 Location: CO, USA
|
Posted: Sat Jun 28, 2008 10:20 pm Post subject: |
|
|
joebodo,
A really awesome program/script. I really hope you keep updating with new features and support. When appropriate, I also hope you release the code, I'm sure I"d learn a lot.
Couple questions:
* Do you plan to put together a help file?
* I'm having a little trouble figuring out how best way to setup hotkeys to call other AHK scripts I've written - what do you recommend as a best practice.
* Is there a way to search on folders. I realize I could create shortcuts for my most used folders, but that would take some time to setup. Any suggestions?
Thanks again for a great effort.
P.S. You may want to consider uploading Redstone to AutoHotKey.net _________________ Lars |
|
| Back to top |
|
 |
joebodo
Joined: 28 Apr 2008 Posts: 46
|
Posted: Mon Jun 30, 2008 7:33 pm Post subject: |
|
|
I uploaded the code. You can find the link on the initial post. The code is the most recent version of the application and contains primarily changes to the plugin management.
* Do you plan to put together a help file?
My ultimate plan was to make this so easy to use that a help file would not be needed. Unfortunately, some of the UI elements and location of some functionality is not intuitive. What I would like is to have is some help text show up within the UI (maybe add a ? button somewhere).
* I'm having a little trouble figuring out how best way to setup hotkeys to call other AHK scripts I've written - what do you recommend as a best practice.
The hotkey functionality was originally written to only support internal functions. I also saw how this would be useful to assign hotkeys to any application. I plan to work on this in the future.
* Is there a way to search on folders. I realize I could create shortcuts for my most used folders, but that would take some time to setup. Any suggestions?
If you have a few folder locations that you would like added to search results, just navigate to the path within Redstone (enter something like c:\Program Files), then right click on the subfolder and click Add to List->History. If you would like to index only folder names (as opposed to file and folder names), let me know and I can add this option.
Joe |
|
| Back to top |
|
 |
melvster
Joined: 21 Nov 2006 Posts: 14
|
Posted: Thu Jul 03, 2008 5:11 pm Post subject: |
|
|
Really nice script.
Slight issue importing skype contacts from config.ini
1) The recent user is not in the reg on some versions of skype (Im running on win2k), but on latest xp it is fine
2) Importing a username with a . is escaped to .2E in config.ini so the import cant handle .
Otherwise keep up the great work! |
|
| Back to top |
|
 |
JoeSchmoe
Joined: 17 Feb 2008 Posts: 47
|
Posted: Tue Jul 08, 2008 11:43 pm Post subject: |
|
|
Hi, Joe,
Thanks for a very impressive script, and especially thanks for posting the source. I was just looking at ndroid earlier today, and while it looks like a terrific product, I really want a program that will let me tinker with the source.
Speaking of the source, I downloaded it and was pretty much floored by the number of files. Now that you've taken the plunge and uploaded the source, any chance of you providing us with a little background on the overall architecture or other tips that might help us read it? I couldn't even figure out where to start...  |
|
| Back to top |
|
 |
TotalBalance
Joined: 22 Jan 2007 Posts: 175 Location: CO, USA
|
Posted: Wed Jul 09, 2008 2:29 am Post subject: |
|
|
| joebodo wrote: |
* Do you plan to put together a help file?
My ultimate plan was to make this so easy to use that a help file would not be needed. Unfortunately, some of the UI elements and location of some functionality is not intuitive. What I would like is to have is some help text show up within the UI (maybe add a ? button somewhere). |
Sounds good.
| joebodo wrote: | * I'm having a little trouble figuring out how best way to setup hotkeys to call other AHK scripts I've written - what do you recommend as a best practice.
The hotkey functionality was originally written to only support internal functions. I also saw how this would be useful to assign hotkeys to any application. I plan to work on this in the future. |
That great. Sooner the better
| joebodo wrote: | * Is there a way to search on folders. I realize I could create shortcuts for my most used folders, but that would take some time to setup. Any suggestions?
If you have a few folder locations that you would like added to search results, just navigate to the path within Redstone (enter something like c:\Program Files), then right click on the subfolder and click Add to List->History. If you would like to index only folder names (as opposed to file and folder names), let me know and I can add this option. |
Thanks for the tip. I'm fine with indexing both file and folder names.
Joe _________________ Lars |
|
| Back to top |
|
 |
Red Hat Boy
Joined: 10 Apr 2008 Posts: 113
|
Posted: Wed Jul 09, 2008 6:59 am Post subject: |
|
|
Nice program. Really.
I'm getting a funny error: when I open your script from Xplorer2 it works fine, but when I try to launch it from another script...I get | Quote: | | #Include file "CR_Util.ahk" cannot be opened. |
CR_Util.ahk is there, in the same directory as RedStone.ahk...any thoughts?
I wanted to do away with the windows start menu and put a redstone link there. Here's what I did:
(I'm using XP with a classic theme, so it may not look right with the luna theme.)
| Code: | Menu, MySubMenu, Add, My Start Button
Menu, tray, add, Options, :MySubMenu
StoneY := A_ScreenHeight - 30
Control, Disable, , Button1, ahk_class Shell_TrayWnd
Control, Hide, , Button1, ahk_class Shell_TrayWnd
SplashImage, 2:C:\freeware\system utils\AutoHotkey\Apps\Redstone\res\Redstone.bmp, B H30 W56 X0 Y%StoneY%
StartButtonShown = 0
; ...
My Start Button:
if StartButtonShown = 1
{
Control, Hide, , Button1, ahk_class Shell_TrayWnd
Control, Disable, , Button1, ahk_class Shell_TrayWnd
SplashImage, 2:C:\freeware\system utils\AutoHotkey\Apps\Redstone\res\Redstone.bmp, B H30 W56 X0 Y%StoneY%
StartButtonShown = 0
}
else
{
Control, Show, , Button1, ahk_class Shell_TrayWnd
Control, Enable, , Button1, ahk_class Shell_TrayWnd
SplashImage, 2:Off
StartButtonShown = 1
}
return
/*
note: where you see "My Start Button", these are not spaces between the words. AHK doesn't like that
for some reason. Instead, I used " ", the invisible character, entered by holding down the
Alt key and hitting 0 1 6 0 on the Numpad.
*/
~$lbutton::
MouseGetPos, X, Y
if (X <= 56 && Y >= %StoneY%)
Run C:\freeware\system utils\AutoHotkey\Apps\Redstone\RedStone.ahk
}
return |
There's the icon:
WIP...
The two issues...
First, there's the one I mentioned above. Second, even if I specify AlwaysOnTop, the splash image will fall below the taskbar, turning a very funny color (probably wouldn't be able to see it at all if the taskbar wasn't transparent). I'll figure it out eventually; I know I've faced this exact same problem before...
Thanks for the awesome launcher.  _________________ I slit the sheet, the sheet I slit,
and on the slitted sheet I sit. ;~} |
|
| Back to top |
|
 |
Red Hat Dude Guest
|
Posted: Thu Jul 10, 2008 1:24 am Post subject: |
|
|
Don't know why it can't be launched from another script (I haven't taken the time to look over your code yet) but I have a solution: create a shortcut to RedStone.ahk...
| Code: | | Run C:\freeware\system utils\AutoHotkey\Apps\Redstone\RS.lnk |
That works fine.  |
|
| Back to top |
|
 |
joebodo
Joined: 28 Apr 2008 Posts: 46
|
Posted: Thu Jul 10, 2008 1:38 am Post subject: |
|
|
You may want to try setting the working directory to the Redstone's location.
You can pass the working directory to the run command. Example:
Run, %command%, %dir%, UseErrorLevel |
|
| Back to top |
|
 |
joebodo
Joined: 28 Apr 2008 Posts: 46
|
|
| Back to top |
|
 |
JoeSchmoe
Joined: 17 Feb 2008 Posts: 47
|
Posted: Fri Jul 11, 2008 2:00 am Post subject: Small Bug |
|
|
Hi, Joe,
thank you for the documentation. It was very helpful. I still don't feel like I fully understand the program, but that definitely helped with the code.
I just found what might be a very minor bug, and thought that I would tell you about it. When I choose the "System" plugin, I get an alert. The title is, "Windows - No Disk" and the text is "Exception Processing Message c0000013 ..." When I hit cancel, it shows me the regular display, but many of the items show up twice, and many of the ones that show up don't have icons.
By the way, this only happens when I run Redstone.ahk from the source rather than using the compiled version. With the compiled version, there isn't as much of a problem (I say, "as much of a problem" because some of the items show up with Window's generic "executable" icon).
Also, is there a way to set a hotkey so that you open Redstone to a specific filter? For example, there are a number of files that I use extremely frequently. I would like to put them in my favorites filter. Suppose I could open Redstone to my favorite's filter by pressing !{spacebar}. I just press that, then the first one or two letters of the file's name, then enter, and the file pops up immediately. That sounds terrific, but it hinges on being able to get to the favorites filter very rapidly.
Thanks again for an amazing program. |
|
| Back to top |
|
 |
joebodo
Joined: 28 Apr 2008 Posts: 46
|
Posted: Fri Jul 11, 2008 6:33 am Post subject: |
|
|
Thanks for the feedback. Here's how to address showing the favorites via a hotkey:
I changed CRL_Filter.ahk as follows:
| Code: | filter_Initialize() {
CommandRegister("Filter Show", "filter_Show", "/name:List Filters")
CommandRegister("Filter Apply", "filter_Apply")
// Added the following line
CommandRegister("Filter ShowFavorites", "filter_ShowFavorites")
NotifyRegister("UI BuildMenu", "filter_OnBuildMenu")
NotifyRegister("UI Create", "filter_OnUiCreate")
}
// Added the following method
filter_ShowFavorites(A_Command, A_Args) {
COMMAND("Filter Apply", "/name:Favorites")
COMMAND("UI Show")
} |
I then added a hotkey using the UI as follows:
Command: Filter ShowFavorites
Hotkey: !^f
OnlyWhenActive: Inactive
After you add the hotkey, you have to restart RedStone.
If you want, you can change the OnlyWhenActive to both (allowing you to use the hotkey when the UI is active or inactive. but, you should add a check to see if the UI is visible to determine whether to call the UI Show command).
In the future, I would like the macros to accept parameters and allow multiple commands. This would eliminate the need for writing code to do the above.
The system plugin definitely needs some work. I have bad results on systems where security does not allow access to the registry. |
|
| Back to top |
|
 |
joebodo
Joined: 28 Apr 2008 Posts: 46
|
Posted: Sat Jul 12, 2008 3:16 am Post subject: |
|
|
I modified the UI Show command to determine if the window is already visible. Here's the updated source for the method:
| Code: | ui_Show(A_Command, A_Args) {
uiShowControl := STATE_GET("UI showControl")
hwnd := STATE_GET("Redstone WID")
WinGet, style, Style, ahk_id %hwnd%
isVisible := 0
if (style & 0x10000000) ; WS_VISIBLE
isVisible := 1
if (uiShowControl <> 1)
{
CoordMode, Mouse, Screen
MouseGetPos, xpos, ypos
CoordMode, Mouse, Relative
width := STATE_GET("UI Width")
height := STATE_GET("UI Height")
ww := width+8
wh := height+8
gosub GetMonitorAt
xpos -= ww/2
ypos -= wh/2
if (xpos < monLeft)
xpos := monLeft
if (ypos < monTop)
ypos := monTop
if xpos+ww > monRight
xpos := monRight - ww
if ypos + wh > monBottom
ypos := monBottom - wh
if (isVisible = 1)
Gui, Show, , RedStone
else
Gui, Show, h%height% w%width% x%xpos% y%ypos%, RedStone
}
NOTIFY("UI Show")
Return
GetMonitorAt:
m = 1
SysGet, ms, MonitorCount
; Iterate through all monitors.
Loop, %ms%
{ ; Check if the window is on this monitor.
SysGet, Mon, Monitor, %A_Index%
if (xpos >= MonLeft && xpos <= MonRight && ypos >= MonTop && ypos <= MonBottom)
{
m := ms
break
}
}
Return
} |
|
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1209 Location: USA
|
Posted: Sat Jul 12, 2008 6:02 am Post subject: |
|
|
You can alse use
| Code: | | DllCall("IsWindowVisible"...) |
_________________
 |
|
| Back to top |
|
 |
JoeSchmoe
Joined: 17 Feb 2008 Posts: 47
|
Posted: Tue Jul 15, 2008 3:20 am Post subject: |
|
|
Hi, Joe, thanks a lot for those ideas. They are working quite well, and I have Redstone running on every computer I work on (I have an autoplay AHK script on my USB flash drive, and I use Redstone to launch my portable applications, etc.)
I have to say, I'm very surprised that there isn't more buzz about this particular script. Many people seem interested in launchers, and this one seems very full featured and configurable. Further, it is built on a very clever and easily extensible architecture and is open-source. I've thought a good amount about why there isn't more activity on the forum thread, and I can think of two issues:
1.) It was closed-source at first, and people stopped reading the thread, so they don't know that it's now open source. I don't know if there is much that can be done about this.
2.) It's a huge, sprawling program (by AHK standards; and not to say that there aren't much bigger programs), and people don't know how to use/extend/modify it well. I know that for me, while the design looks intuitive in retrospect, I didn't know many of the design conventions at first (such as, for example, the very heavy reliance on context sensitive right-click menus), and that made it rather frustrating as I was trying to learn the program.
3.) I haven't been using it for terribly long, but the progam seems like it could use a little refinement. As I mentioned in an earlier post, the system plugin is buggy when I use it. Also, sometimes it takes a couple of clicks before the context-sensitive menu pops up. Finally, for a little while, even when the "Toggle on top" box was completely empty, (no up or down wedge) the window insisted on staying on top of other windows. (For the record, I never use the compiled version; I just run Redstone.ahk.)
Anyway, I know you hate documentation, but I think that this is too good of a program to have die out, so I thought I would offer to help with it. If you'd like, I could write up a short tutorial on using the program and post it in the forum. I'm extremely busy, so it might take me a week or two (or even more) to do it, but, if you are interested in fixing bugs and refining the program some more, I'd love to feed you bug reports as I find them. Ideally, we could smooth out the code a little more before posting the tutorial so that if new people try it out, they will won't be turned off by any rough edges.
JS |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|