topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday April 23, 2024, 9:42 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: DONE: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)  (Read 87005 times)

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #25 on: October 28, 2008, 04:33 AM »
Thanks everyone for their comments!  :)
I imagine that Axem could become very popular to package a set of separate AHK scripts together for distribution and for a more user friendly first user experience when using AHK.
-VideoInPicture (October 27, 2008, 11:21 PM)
Interesting idea, I have to think on that.

(1) I think that the icons of the AHK scripts should be shown to the left side of the Axem window to help with visual distinction.
-VideoInPicture (October 27, 2008, 11:21 PM)
Most scripts don't have icons set in their scripts but are added using the Ahk2exe utility that ships with AHK. You don't have to use resource editor, It's also possible to specify it using the following AHK code:

Menu, tray, Icon [, FileName, IconNumber, 1]:
Got to look at that, maybe some options for this without slowing down the scanning too much.

(2) Provide a way to change the icon of each AHK script, including the icon it shows for it's tray icon.
-VideoInPicture (October 27, 2008, 11:21 PM)
See ahk2exe in the autohotkey installation folder it's already possible, not related to Axem.

Scan each ahk file and look for a comment near the top of the file of the form:
; Synopsis: This line will be shown in the Axem list next to a file's name if found
(3) I have Axem running and I second the motion to show the comments near the top of an AHK file if available.
-VideoInPicture (October 27, 2008, 11:21 PM)
Looking into adding something to distinguish the items better based on content.

(4) Could we change the background color?
-VideoInPicture (October 27, 2008, 11:21 PM)
I'd suggest to change your windows theme colors instead, if I set a specific color or skin then it will look out of place on other people's machines, and adding the options would make the app too cluttered. But I can add in a line that checks for a custom include so you can maybe add this to your install using AHK ;)

(5) Place the "Rescan", "Change Folder", and "Hide" buttons at the top of the Axem window as a toolbar strip since these are higher level commands.
-VideoInPicture (October 27, 2008, 11:21 PM)
Yes the listing / presentation can be much improved it's very much a work in progress ;)
« Last Edit: October 28, 2008, 04:36 AM by justice »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,901
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #26 on: October 28, 2008, 04:41 AM »
xbeta's basic idea is not bad..
Axem already scans subfolders..
so maybe a nice way to display everything is with a checkbox treelist, where the tree is the directory structure.

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #27 on: October 28, 2008, 05:38 AM »
Nice! Good idea, good implementation.

Some brainstorming:

I have for some time used a "master AHK-script" on my own computer i.e. a single large script that handles almost all hotkeys. That script either (1) contains various other small scripts as functions or (2) controls other small standalone scripts through command line parameters. (I made it since I earlier on used a program called Girder which also had centralized control over various hotkeys and then subparts related to specific tasks so I wanted something similar)

So most of the time I only have this one master AHK-script running. Most of the standalone scripts are launched when needed and then closed afterwards. That makes the tray area less cluttered with green H icons :-)

This works great but is of course not generic enough to be useful for others.

AXEM has some similarities. A big difference is that AXEM doesn't control what hotkeys the different scripts use (if any). So now let me throw out this question: would such a hotkey configuration/control feature be possible and useful to include in AXEM somehow?
« Last Edit: October 28, 2008, 05:40 AM by Nod5 »

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #28 on: November 03, 2008, 08:31 AM »
Revision: 20
Date: 14:28:17, 03 November 2008
Message:
* ported over to listview, will allow much more layout flexibility.
* added context menu for edit / show folder.. options.
* Shows synopsis of file, the first line of the script if it starts with ; (comment) - i'll refine this further.
* Fix: Scrollwheel support
* Hide window when close button is pressed instead of closing program. (exit via tray menu or future file -> exit)
* no longer possible to unfocus open menu


I'd like to recommend everyone to test this version. I know when you resize the window it doesn't resize the listview yet, i'll be looking at that. Fixored in r21

« Last Edit: November 03, 2008, 09:01 AM by justice »

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,961
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #29 on: November 03, 2008, 08:53 AM »
Justice, is the download still from reply #3 ?
Tom

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #30 on: November 03, 2008, 08:56 AM »
Revision: 21
Date: 14:55:34, 03 November 2008
Message:
* changed download link to zip so support-files can be used
* readded third party code as externals
* fixed resizing issues

Yes download is still from reply 3. What do you think it needs before I should post it to the Lifehacker coders google group?

Am thinking it would be a good idea to add a Compile... and Package.. option as well. (package would zip all files except .ini.)
« Last Edit: November 03, 2008, 09:24 AM by justice »

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #31 on: November 04, 2008, 06:32 AM »
Revision: 29
Message:
* Added Publish Option to script context menu: create a publish.bat in the project's folder containing commands you want to run. For example: zip and upload to webspace. I'll use this myself to automate building new versions of axem.
* Added Compile & Publish option to both compile and publish the ahk script.
* No longer being asked to choose source folder when writing settings.
* Writing settings on exiting
* Listview performance improvement
* Added example publishing scripts that are used for Axem releases
* summaries are now cleared when no comment is found
* wait for compiling and publishing to finish before continueing
* Completed keyboard hotkeys
* If no new folder selected, Axem now correctly rescans current folder instead of defaulting to axem's folder



« Last Edit: November 04, 2008, 07:36 AM by justice »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,901
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #32 on: November 04, 2008, 07:26 AM »
When i run axem.ahk it exits immediately (is it closing itself i think!). if i run exe no such problem.

Suggestion: maybe put the helper .ahk scripts in a subdirectory?

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #33 on: November 04, 2008, 07:38 AM »
Try it now i just changed some code that might have caused it in the latest revision. If that fails, delete the settings file.
WRT subfolders, I'd like to know how people organise autohotkey projects.
do you have a seperate folder for the exe files, the releases etc? Would it be a good idea to look for compiled scripts and use that folder to compile the script to?

I can imagine the following scenarios:
1. compiled scripts + ahk scripts + zips are in project root, manually creating zip files for releases
2. ahks in rootfolder (.\), compiled scripts in subfolder (for example .\compiled)
3. source in subfolder and compiled scripts in a different subfolder (.\ahk; .\compiled). This would be hard to detect.
4. project doesn't have a structure yet.
« Last Edit: November 04, 2008, 07:46 AM by justice »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,901
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #34 on: November 04, 2008, 08:00 AM »
what i meant in my suggestion was that axem has some helper scripts and it might confuse people which one they are supposed to run, so i was thinking to put these axem helpers in a subdirectory like helpers/

justice do you need a justice.dcmembers.com web page where you can host your ahk scripts?  seems like it would be a good idea.

still doing the behavior -- it asks for settings directory and then exits.  in fact now its not saving settings at all.
(maybe you should avoid putting axem.ahk in the list)

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #35 on: November 04, 2008, 08:43 AM »
Both issues should now be fixed.  Sorry about the problems, :( settings are now saved immediately after changing.

Revision: 31
Date: 14:43:02, 04 November 2008
Message:
* Axem is no longer in the list of scripts
* Settings are now saved after script folder is selected
* SMARTcompile: now recognises location of existing compiled scripts and compiles into that location
* SMARTpublish: now recognises location of publishing scripts and runs these
* Releases now include folder structure, feel free to delete existing ahk files before unpacking.

I posted it to the lifehacker coders google group.

« Last Edit: November 05, 2008, 03:05 AM by justice »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,901
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #36 on: November 05, 2008, 06:19 AM »
Great post and great website Justice  :Thmbsup: :Thmbsup: :Thmbsup:

Now add a link to the page to your signature :)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,901
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #37 on: November 05, 2008, 06:22 AM »
Really looking nice, starts up and saves settings well  :Thmbsup:
You should probably exclude the publish and includes subdirectories from display too (if the user selects the axem folder inside their scan subdirectory).

A help/readme would be nice too :)
(am i getting greedy?)

And lastly.. how about a .dcupdate file and a button in the program to check for updates?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,901
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #38 on: November 09, 2008, 12:13 AM »
i had another cool feature idea: a way to mark and unmark an ahk script as one to be run on windows startup.

mahesh2k

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,426
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #39 on: November 09, 2008, 03:22 AM »
keep ahk scripts all together with a tree style notes manager.

Great  :up:

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,961
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #40 on: November 10, 2008, 06:30 AM »
I only got around to trying this today

The exe works well here so far
The AHK file doesnt though - when I select a script to run, it runs the script above it on the list and there's loads of error messages - I just went to the exe then - if you need more details I'll try it again

WinXP home SP2
Tom

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,961
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #41 on: November 10, 2008, 07:11 AM »
eh ..
I have the same problem with AXEM.exe as I had with JustToToIt -
the universal restore hotkey (Ctrl+R) clashes with another program I'm using.

(I've actually figured out now how to change shortcuts in AHK scripts (rocket science - for me!) but that the script itself isnt working properly for me ...)
Tom

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #42 on: November 10, 2008, 08:18 AM »
yeah i'm working on that but i have some system issues so need to reinstall  I expect an update this week that solves both the hotkey and the selection issues

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,961
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #43 on: November 11, 2008, 04:25 AM »
It has also made Ctrl+O a universal hotkey here :tellme: ;D

didnt notice till now cause I usually launch files from a file manager
will reboot later and see if it's still a problem after

EDIT/ I've left it running and ticked suspend hotkeys
Tom
« Last Edit: November 11, 2008, 04:28 AM by tomos »

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #44 on: November 12, 2008, 07:33 AM »
Long awaited update ;)

Revision: 41
Date: 13:31:17, 12 November 2008
Message:
* Rescan hotkey changed to F5
* Fixed hotkeys so they only work if Axem is focused window
* Fixed selection issue when axem is installed inside the source folder
* invoking context menu no longer adds divider at the bottom of the menu
* Performance optimizations


Todo:
* Adding check for updates, and registring of dcupdate file (if you have dcupdate installed it should already work with the provided dcupdate file)
* if <scriptname>.ico is found, show icon in the list
« Last Edit: November 12, 2008, 07:36 AM by justice »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,901
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #45 on: November 12, 2008, 07:38 AM »
NICE!!!

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,901
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #46 on: November 12, 2008, 07:41 AM »
keep in mind that if you call dcupdate from axem and pass it the axem directory it will also check for updates for any other .dcupdate files it finds for other scripts as long as they are in a subdirectory of that directory.  that's a good thing, it means you have update checking for all scripts that support it*.

*only exception would be if your scripts are in a different directory than axem; i guess in this case the ideal solution would be:
1) have me add a feature to dcuhelper.exe and dcupdater to let you pass multiple directories -- might be best solution
2) have 2 options in axem for checking for updates, 1) check for axem updates, and 2) check for script updates

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #47 on: November 12, 2008, 08:10 AM »
That would be very cool, option 2 appeals a lot since I'd like to have the user explicitly ask for updates. Although If a developer keeps older versions of their script we don't want them to start updating themselves to the latest, that would be disastrous haha.

btw It wouldn't be hard to write a small app that would collect all .dcupdate files on a disk and register all of them then do a single update, that might be a useful addition to the arsenal.
« Last Edit: November 12, 2008, 08:15 AM by justice »

anjan_oleti

  • Participant
  • Joined in 2007
  • *
  • Posts: 54
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #48 on: January 12, 2009, 08:55 PM »
i had another cool feature idea: a way to mark and unmark an ahk script as one to be run on windows startup.
This would be very useful... I hope it will be implemented :)
Anjan Oleti
« Last Edit: January 13, 2009, 09:53 AM by anjan_oleti »

Ryan_S

  • Participant
  • Joined in 2009
  • *
  • Posts: 6
    • View Profile
    • Donate to Member
Re: AHK Coding Snack Idea: Deluxe AHK Script Manager (AXEM)
« Reply #49 on: January 17, 2009, 10:08 AM »
I wrote some code for starting scripts when Axem launches. It will save the checked scripts to the .ini file, when Axem is reloaded it will read the .ini file and restart all of the scripts that were running before.

I didn't have much time to test it so let me know what you think  :D
I'd like to add functionality to close the running subroutines when you exit Axem, didn't have time to get to this this morning.


Add "GoSub, RunStartup" after "GoSub, ShowWindow"

Add the RunStartup subroutine...
Code: AutoIt [Select]
  1. RunStartup:
  2.         ;--- StartupScripts ---
  3.         ;--- loops through the array and starts scripts if they are found ---
  4.         Loop %StartupScriptsCount% {
  5.                 scriptText = % StartupScripts%A_Index%
  6.                 ; --- search through list to find matches ---
  7.                 Loop % LV_GetCount() {
  8.                         LV_GetText(RetrievedText, A_Index)
  9.                         If InStr(RetrievedText, scriptText) {
  10.                                 LV_Modify(A_Index, "Check")  ; Check each row whose first field contains the filter-text.
  11.                         }
  12.                 }
  13.         }

Add the following code to the "READINI" subroutine...   
Code: AutoIt [Select]
  1. ;--- StartupScripts ---
  2.         StartupScriptsCount = 0
  3.         ;loop through ini and read in scripts
  4.         Loop {
  5.                 StartupScriptsCount += 1
  6.                 IniRead, StartupScripts%StartupScriptsCount%, %IniFile%, Startup, %A_Index%, -1
  7.                 If StartupScripts%StartupScriptsCount% = -1
  8.                         break
  9.         }

And add the following code to the "WRITEINI" subroutine...   
Code: AutoIt [Select]
  1. ;--- StartupScripts ---
  2.         IniDelete, %IniFile%, Startup   ;clear section to rewrite
  3.         ;--- create array with script text of all checked scripts ---
  4.         StartupScriptsCount = 0
  5.         Loop {
  6.                 RowNumber := LV_GetNext(RowNumber, "Checked")  ; Resume the search at the row after that found by the previous iteration.
  7.                 if not RowNumber  ; The above returned zero, so there are no more selected rows.
  8.                         break
  9.                 LV_GetText(Text, RowNumber)
  10.                 StartupScriptsCount += 1
  11.                 StartupScripts%StartupScriptsCount% = %Text%
  12.         }
  13.         ;--- loop through scripts and write list to ini file ---
  14.         Loop %StartupScriptsCount% {
  15.                 scriptText = % StartupScripts%A_Index%
  16.                 IniWrite, %scriptText%, %IniFile%, Startup, %A_Index%          
  17.         }
« Last Edit: January 17, 2009, 10:10 AM by Ryan_S »