Alias Interpretation

The alias /utilities maps to e:\utilities, and 3 buttons are defined as follows:

Button1 (Explicit CD)

cd e:\utilities\autohotkey
AutoHotkey autohotkey.ahk

Button2 (CD via alias)

cd /utilities\autohotkey
AutoHotkey autohotkey.ahk

Button3 (Explicit via alias)

/utilities\autohotkey\AutoHotkey /utilities\autohotkey\autohotkey.ahk

In XP..

Button1 works
Button2 generates a "The publisher could not be verified" security warning, then works
Button3 works

In Windows7..

Button1 generates a "The publisher could not be verified" security warning, then works
Button2 "windows cannot find 'AutoHotkey'"
Button3 generates a security warning then "The script file XXX\autohotkey.ahk does not exist" where XXX is the path of the currently active tab.

I would expect all 3 XP buttons to work identically. Windows7 is not (yet) supported, but these findings may be of interest to the developers.

Regards, AB

If you are using an MS-DOS Batch function, you cannot use aliases in this form:

/aliasname

instead use aliases in this form:

{alias|aliasname}

[quote="kenalcock"]If you are using an MS-DOS Batch function, you cannot use aliases in this form:

/aliasname

instead use aliases in this form:

{alias|aliasname}[/quote]

Thanks. I had missed that requirement.

Regards, AB

It seems there is a difference in the way folder aliases are handled in XP and Windows 7.

utilities is defined in Preferences as a folder alias thus.. /homeroot\Utilities

Both of the appended buttons work in XP.
In Windows 7 the second button works but the first button fails with a message to the effect that..

Note the double slash between C: and Utilities

Button2 behaviour suggests that {alias|homeroot} is consistently interpreted as C: in both XP and W7.

Button1 behaviour suggests that /homeroot is interpreted as [b]C:[/b] in W7 (utilities is therefore constructed as C:\Utilities) and as C: in XP (utilities is constructed as C:\Utilities) or else /homeroot is interpreted as [b]C:[/b] in both but XP treats \ as if it were [b][/b] whereas W7 is more picky.

Regards, AB

Button1

<?xml version="1.0"?>
<button backcol="none" display="both" textcol="none">
	<label>AutoHotkey1</label>
	<tip>AutoHotkey1</tip>
	<icon1>#AB:ahk</icon1>
	<function type="normal">
		<instruction>@nodeselect</instruction>
		<instruction>cd {alias|utilities}\autohotkey</instruction>
		<instruction>AutoHotkey autohotkey.ahk</instruction>
	</function>
</button>

Button2

<?xml version="1.0"?>
<button backcol="none" display="both" textcol="none">
	<label>AutoHotkey2</label>
	<tip>AutoHotkey2</tip>
	<icon1>#AB:ahk</icon1>
	<function type="normal">
		<instruction>@nodeselect</instruction>
		<instruction>cd {alias|homeroot}\utilities\autohotkey</instruction>
		<instruction>AutoHotkey autohotkey.ahk</instruction>
	</function>
</button>

I'm surprised it matters since most of the time you can use "\" instead of "" in paths without it causing problems.

I tried it on my Windows 7 machine and a command like this works fine:

cd {alias|homeroot}\Users\Leo notepad.exe test.txt
That opens Notepad, editing C:\Users\Leo\test.txt

The difference appears to be that when you define SomeFolder as a folder alias in Preferences using /homeroot as a base, the result is C:\SomeFolder with a double slash whereas when you use the {alias|homeroot}\SomeFolder construct in a button the result is C:\Somefolder with a single slash.

It's not a big issue since the {alias|homeroot}\SomeFolder construct does what I want, but it's certainly an anomaly which I'll report.

Regards, AB