Tell AppleScript a path for 'tell' command

Hi,

My Applescript looks like this and works well:

tell application "Keyboard Maestro Engine"
	set Chesspgn to getvariable "Chess Pgn"
	set pgnfilename to getvariable "pgnfilename"
end tell
tell application "Keyboard Maestro Engine"
	say Chesspgn using "Kate" saving to (((path to desktop) as string) & pgnfilename)
	--speaking rate 140 
end tell

But for the life of me I can't make it write to
"/Users/myusername/Dropbox/ChessPGNs"

Any tips would be appreciated. I have read numerous webpages on the topic but still can't do it!

Most of my attempts (including POSIX paths and alias') result in this type of error msg:
Keyboard Maestro Engine got an error: Can’t make "/Users/username/Dropbox/ChessPGNs" into type constant.

I got the answer for another forum, but thought I should post it here in case someone had a similar question. It was a matter of formatting, and also that the file was being created and didn't already exist, so the wiki material mostly focuses on files that exists. Anyway, this works for me:

tell application "Keyboard Maestro Engine"
	set Chesspgn to getvariable "Chess Pgn"
	set pgnfilename to getvariable "pgnfilename"
end tell

	set filePath to "Macintosh HD:Users:username:Dropbox:ChessPGNs:" & pgnfilename
	say Chesspgn using "Kate" saving to filePath

:slight_smile: