GSAK (Geocaching Swiss Army Knife)
Contents - Index

Macro Run/Manage Dialog (Macro=>Run/Manage)



The macro run/manage dialog is a "central repository" for all your macros. From here you can run and manage all your GSAK macros. You can sort on any column by clicking on the title bar of that column (click again to toggle the sorting sequence). Columns can be moved and re sized, as can the dialog itself. Search for a macro by entering text in the search box - any macro file name or description that contains this text will be displayed. The user data column if a custom column that you can enter any data you like to help better identify the macro. You can also use the standard methods to select sells and then do a Ctrl-C to copy the contents of the cells to the clipboard. The data copied to the clipboard is compatible with Microsoft Excel, so you could paste the data into an Excel spread sheet for further analysis. 

Macro buttons:

Run - Run the currently selected macro (you can also run a macro via a double mouse click on any entry)

Version - Use this button to check if you have the latest version of this macro or all macros. When you first click on this button you will get the following dialog:



Select OK to check only the current macro (the one highlighted in the grid) or select "All" to check every macro currently in the grid (searching can limit the macros shown in the grid). When GSAK has finished the version check you will be presented with this dialog

Note1: For macros you may want to skip over (user written that are not on the GSAK web site) this version check, you can you place the macro comment "# NoVersionCheck" (without the quotes) anywhere in the macro code. If this comment is found then the macro check is ignored. 
Note2: All macros are backup up before being updated. However, to keep the number of files down to a minimum, a zip file is created to contain all the macro backups. The file is called "MacroSave.zip" and will reside in your GSAK "Macros" folder (use "Tools=>Folder finder" to locate this folder). Individual macros that are backed up will have the same name as the original macro but the date and time (when the macro was updated) appended to the file name. That way you get to keep a full history of previous versions of the macro

Install - The easiest way to install a macro is by using the "file association" of the .gsk extension, see this topic for more information. However, there may be some macros that still have the .txt extension and this button will allow you to install these macros.

Uninstall - This button will allow you to remove an installed macro

Resync - Firstly, every *.gsk or *.txt file in your macro folder is interrogated for the "MacVersion =" or "MacDescription =" comment keywords (see note at end). If either these keywords are found then the macro install database is updated. That is, if the macro already exits in the database the description and version information is updated. If the macro does not exists in the database then an entry is created with this information. Secondly, every entry in your macro database is tested to see if the corresponding file exits in the macro folder. If this file is not found, the entry is deleted from the database.

There is also a right click menu with the following options:

Edit - Open this macro in your configured macro editor program 
Edit New Window - You will only see this option if GSAK is your default macro editor. It will open the macro in a new instance of the macro editor so that you can edit multiple macros at the same time.
Edit Forms - Edit any forms for this macro in the forms designer
Rename - Rename the current macro file
Reset count - Rest the counter for the number of times the macro has run back to zero
Run - Run this macro
Resync this macro - This option will update the grid with the latest information from the macros on your hard disk. Useful when you have macros that you write but are not published on the GSAK server and do not get updated by the usual install method. However, should not want macros on your hard disk added to the macro manger (only ones that exist updated), then hold down the CTRL key when you click on this button. 

Note: Macro authors should include the following header when adding macros to the GSAK macro library. They should always include the "MacFileName =" keyword, otherwise the incorrect file name may be added to the macro library when downloading the macro file via a web browser. That is, when you click on a web link your browser downloads the file to you temporary Internet files folder before passing it to "open with". The problem is that if a file by that name already exists in the temporary Internet files your browser automatically adds a number to the file name and now this is the file it downloads. So the actual file that GSAK gets is the file with the appended number regardless what the original file was called. This means that the file you download may not always have the same name as the original file. I guess it is the browsers way of "protecting" you from overwriting files with the same name. By using the "MacFileName =" keyword you make sure the file name that GSAK installs is always correct.
 

#***********************
# MacVersion = 1.1
# MacDescription = Hello world test macro
# MacAuthor = Clyde
# MacFileName = Hello.gsk

 

These keywords can be placed anywhere in the macro code, but must be macro comments (line begins with #)
Copyright 2004-2019 CWE Computer Services  
Privacy Policy Contact