topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Thursday March 28, 2024, 1:38 pm
  • 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

Author Topic: NANY 2019: AHK Script Center  (Read 16143 times)

mat2016

  • Member
  • Joined in 2016
  • **
  • default avatar
  • Posts: 36
    • View Profile
    • Donate to Member
NANY 2019: AHK Script Center
« on: December 25, 2018, 05:04 PM »
Having created about three dozen apps over the last couple of years and finding too many false positive antivirus warnings this year, I decided to only post scripts in text format. Compiling AuotHotkey scripts produces an inconsistent and wide variety of responses from VirusTotal and similar testing sites.

In order to manage scripts and still allow neophytes to run them, I am creating an AHK Script Center. The program will allows users to:

  • Run any script with a double-click
  • Stop any running script with a double-click
  • Edit scripts in the default folder tree
  • Edit the AHK Script Center script if desired
  • Check local script versions with online versions (left up to each developer to code this)
  • Check mark one or more scripts so they will be auto started with the Script Center
  • Stop all running scripts via a button or upon exiting the Script Center
  • Set Font size and/or a Color Scheme for Script Center
  • Add/remove Script Center to Windows startup

A demo of AHK Script Center and some screenshots are on this Blog page:

AHK Script Center

AHK Script Center  [Press ESC to Hide].pngNANY 2019: AHK Script Center
AHK Script Center - run a script.pngNANY 2019: AHK Script Center
AHK Script Center - right-click scripts.pngNANY 2019: AHK Script Center
« Last Edit: December 25, 2018, 07:03 PM by mat2016 »

chashnniel

  • Member
  • Joined in 2018
  • **
  • default avatar
  • Posts: 127
    • View Profile
    • Donate to Member
Re: NANY 2019: AHK Script Center
« Reply #1 on: December 29, 2018, 12:56 AM »
nice job!!! :Thmbsup: :Thmbsup:
looking forward to the full version...

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: NANY 2019: AHK Script Center
« Reply #2 on: December 29, 2018, 02:06 AM »
I am confused as to why you call it the same name as the already well known AutoHotkey.exe ? I find this weird, even dodgy.

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: NANY 2019: AHK Script Center
« Reply #3 on: December 29, 2018, 09:28 AM »
I am confused as to why you call it the same name as the already well known AutoHotkey.exe ? I find this weird, even dodgy.


Confusing?

From what I see it is more like software that allows you to keep your favorite set of AHK scripts and runs them when needed. All of that in a GUI that is more usable than the one provided with the default AutoHotKey software.

It isn't a replacement, it is more like an supplement and likely some will qualify software like this an improvement that uses AutoHotKey as a base. Nothing wrong with that (in my mind at least). I am also looking forward to it.

mat2016

  • Member
  • Joined in 2016
  • **
  • default avatar
  • Posts: 36
    • View Profile
    • Donate to Member
Re: NANY 2019: AHK Script Center
« Reply #4 on: December 29, 2018, 03:43 PM »
The name can be anything one desires. I just chose AHK Script Center as it is a management tool for AHK scripts.

The two purposes for the program being: 1) avoiding antivirus false positives as the managed scripts are not compiled (or compressed with MPress / UPX), only AutoHotkey.exe and Notepad2.exe are present, and 2) allowing users to create a folder tree containing their favorite scripts and easily be able to distribute it to others if they choose to.

I have added a version column to the Listview which is pulled from the first comment line that is required in each script. This is just how I will allow the program to check online for version updates. It checks the local version number against a text file with the same name on my blog site. Users will be free to change that to suit their needs.

;Sample 1st line comment - This script does XYZ [include] | 1.11

The [include] tell the Script Center to display this script in the list of Available Scripts.
This allows users to only show finished scripts and ignore test scripts, secondary include files, etc.
Programmers can temporarily ignore any script by adding the word ignore in the first line.

The | 1.11 allows the program to split line 1 on the vertical bar and grab 1.11 as the script's version number.
If anyone has ideas on better ways to do this, they are most welcome.

I also changed the right-click option from a menu to a GUI. I found that right-clicking then accidentally right-clicking again in the bottom Listview would freeze the program. I never could figure out why. So, I switched to a small GUI instead.

I have updated the blog page for version 1.06.

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,641
    • View Profile
    • Donate to Member
Re: NANY 2019: AHK Script Center
« Reply #5 on: December 29, 2018, 09:16 PM »
I am confused as to why you call it the same name as the already well known AutoHotkey.exe ? I find this weird, even dodgy.


Confusing?

It sounds like Curt has confused the included AutHotkey.exe executable as being the compiled script executable when it's just an included copy of the AutoHotkey interpreter which is being used to run the script, (AHK Script Center.ahk).

Which the shortcut properties show:
Code: Text [Select]
  1. "C:\Users\?????\Desktop\Mega Test\AutoHotkey.exe" "AHK Script Center.ahk"

It's still too bad the nongs at Microsoft can't let you use relative addressing in shortcuts, would have been so useful since about .... Windows 1.0.

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: NANY 2019: AHK Script Center
« Reply #6 on: December 30, 2018, 06:18 AM »
Sorry for my misunderstanding!  :-[

AutoHotkey.exe from autohotkey.com/download/ is 3.3 MB, so I (wrongly) concluded that Mikeys-Mega-Script-Pack's AutoHotkey.exe 875 KB was something different from AutoHotkey.exe...


Mikeys-Mega-Script-Pack.pngNANY 2019: AHK Script Center


mat2016

  • Member
  • Joined in 2016
  • **
  • default avatar
  • Posts: 36
    • View Profile
    • Donate to Member
Re: NANY 2019: AHK Script Center
« Reply #7 on: December 30, 2018, 09:19 AM »
For my purposes, I will create a Setup.exe for the Mega Pack that creates a proper shortcut to run AutoHotkey.exe and AHK Script Center.ahk in whatever folder the user specifies. I have just left that static shortcut in there for now that can easily be updated.

Maestr0

  • Participant
  • Joined in 2010
  • *
  • Posts: 30
    • View Profile
    • Donate to Member
Re: NANY 2019: AHK Script Center
« Reply #8 on: December 30, 2018, 09:22 AM »
For my purposes, I will create a Setup.exe for the Mega Pack that creates a proper shortcut to run AutoHotkey.exe and AHK Script Center.ahk in whatever folder the user specifies. I have just left that static shortcut in there for now that can easily be updated.

You could have the installer to check the registry if there is a link to the .ahk file and only download if it hasn't been registered yet.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: NANY 2019: AHK Script Center
« Reply #9 on: December 30, 2018, 02:24 PM »
For my purposes, I will create a Setup.exe for the Mega Pack that creates a proper shortcut to run AutoHotkey.exe and AHK Script Center.ahk in whatever folder the user specifies. I have just left that static shortcut in there for now that can easily be updated.

You could have the installer to check the registry if there is a link to the .ahk file and only download if it hasn't been registered yet.

Or it would be simpler to just ask for the location of AHK.  Several other programs have set precedence for something like that, and it wouldn't require an installer.

mat2016

  • Member
  • Joined in 2016
  • **
  • default avatar
  • Posts: 36
    • View Profile
    • Donate to Member
Re: NANY 2019: AHK Script Center
« Reply #10 on: December 30, 2018, 02:46 PM »
Correct, an installed AHK can be detected or selected. But, on my blog, I have been distributing compiled AutoHotkey scripts and updating them to users via Zip files. A few of the Zip files contain a Setup.exe installer since that cut down on antivirus false positives. So, for my version of AHK Script Center, I am assuming the end users are not script writers. For this reason, I have included the AutoHotkey interpreter and for those who do wish to dabble with scripting, the NotePad2 program. Neither of these executables require actual installation.

For regulars to DonationCoder, the program can be updated to take advantage of script capable users. I am finishing a mechanism for users to check and optionally update individual scripts. After that, I will post my "mega pack" and will be done for a while. This script allows me to change my mindset away from the distribution and maintenance of separate EXE programs and just periodically update individual script files, which will be easier. It's not like I was making any money anyways, LOL.  :)

mat2016

  • Member
  • Joined in 2016
  • **
  • default avatar
  • Posts: 36
    • View Profile
    • Donate to Member
Re: NANY 2019: AHK Script Center
« Reply #11 on: December 30, 2018, 08:16 PM »
I believe I'm through with the essentials for AHK Script Center as the management application for my script library.

I have uploaded version 1.08. The VersionCheck and UpdateScript subroutines will have to be customized to your liking or removed if not necessary. If AutoHotkey is already installed on your system then the Exe can be removed since you can double-click the script to run it. And you can edit global variable Editor to point to SciTE or whatever script editor you use (line 57). There are some lines commented out as they were used for debugging purposes.

The larger Mikeys Mega Script Pack download uses Inno installer and creates a desktop shortcut for running AHK Script Center. It defaults to creating a Mikeys Mega Script Pack folder on your desktop as well but it is user selectable.

I hope this method of script management is useful for many of you. Happy early New Year's.

mat2016

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: NANY 2019: AHK Script Center
« Reply #12 on: January 06, 2019, 01:22 PM »
 :-*

Thanks to ToDoList i am making a work list to remember all the languages for scripting.
AHK, AutoIt, Batch, Java, C, etc.
An AHK Script Center is sure a organization tool for me. And for my poor memory.
 :P

Thanks a lot mat2016 !!!!!!!!! :tellme:

Note : Only two scripts detected running !!!!! Oh my God !

AsusPortatil - 06_01_2019 , 19_28_04.pngNANY 2019: AHK Script Center

 ;D

The pack seems an interesting marketing measure to try your software. Wonderful !!!!!!
 :P

AsusPortatil - 06_01_2019 , 19_34_15.pngNANY 2019: AHK Script Center

Why the detected scripts at the starting are not added to the ahk centre as available scripts ?

STOP Running Scripts close all the scripts, even the starting ones. And now I can reopen from the application.
I can only reopen those of your library .
How can I add any ahk script to the ahk centre ?

Best Regards

« Last Edit: January 06, 2019, 01:46 PM by Contro »

mat2016

  • Member
  • Joined in 2016
  • **
  • default avatar
  • Posts: 36
    • View Profile
    • Donate to Member
Re: NANY 2019: AHK Script Center
« Reply #13 on: January 06, 2019, 04:53 PM »
Contro,

The script can be easily modified to include other folders that contain AutoHotkey scripts files, but, the version on my blog only looks inside the folder the AHK Script Center is running in plus any subfolders. So, it will show other scripts that are running (with any version of AutoHotkey) as it looks at the full command lines of running process and filters on .AHK filenames. That's why you see your two script in Running Scripts list. If you have compiled scripts running, they aren't detected.

If you make a folder for those under the Mega Pak and move them under there, then they will show as Available IF you include the following in the first line as an example.

;this script does the following stuff [include] | version 0.4

By using the first line of each script in this way, you can include only those AHK files you regularly launch.

Conversely, you can copy the AHK Script Center.ahk file into an existing folder tree you have that contains AHK files. To use the right click Edit and double-click to run features, it's best to include AutoHotkey.exe and NotePad2.exe in the same folder as Script Center.

mat2016

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: NANY 2019: AHK Script Center
« Reply #14 on: January 07, 2019, 07:35 AM »
It sounds inconfortable. I can't move my scripts. Are controlled precisely in their position and are linked to my documentation database.
I can only put shortcuts.
I think you may adapt your script to support any convenience. And the AHK Script center scan all my disks and add all the scripts. At least with the extension ahk. Because I assume is difficult to detect when an exe is compiled with AHK.
All we have ahk scripts from the past located in our disks. It's not time to change this. I think you may adapt your script.
Best Regards
 :-*