Convert target to different format, then save file

I have a simple script that gets the path (target) of the front Finder window. The result is something like:

folder “Default Folder” of folder “Logic” of folder “Music” of folder “polyvox” of folder “Users” of startup disk of application “Finder”

I want to be able to convert that target result (file path) to a format that features “slashes”, e.g.

/Volumes/Macintosh HD/Users/polyvox/Music/Logic/Default Folder

(Interesting, the above two examples don’t quite match up; I wonder why?)

The “slashes” format is one I believe I can use in a SAVE FILE AS window using SHIFT-COMMAND-G (which apparently is supposed to work in any application’s SAVE FILE or SAVE FILE AS window).

My ultimate purpose is to be able to create a new target folder within a given default folder one level up, all while in the process of saving a file. In other words, I have a “default” folder which I am constantly populating with new sub-folders (giving each a new name). Into each new sub-folder I am saving a new file which I have just created.

So the sequence of events in the macro will go like this: with a hot-key trigger I choose to save a file. The SAVE FILE window appears but with the wrong destination folder chosen. Using SHIFT-COMMAND-G (or some equivalent?) I direct the destination to a specific default folder:

/Volumes/Macintosh HD/Users/polyvox/Music/Logic/Default Folder

Once this is established, I create a new folder within that default folder. This then becomes the destination folder for the SAVE:

/Volumes/Macintosh HD/Users/polyvox/Music/Logic/Default Folder/New Folder

Aaaannnnd SAVE. Bingo. End of macro.

I would even be happy, though, if the macro would be triggered once I have already navigated to the SAVE FILE window.

I suppose this subject really involves two separate goals: converting a target format and then directing a save to the correct destination. But these two goals are related, wouldn’t you say?

Many thanks for any help in this endeavor.

Model: Mac Pro
AppleScript: 2.7
Browser: Safari 13.1.1
Operating System: macOS 10.14

This is a starting point:

set defaultFolder to POSIX path of (path to music folder) & "Logic/Default Folder/"
set newFolderName to text returned of (display dialog "Enter folder name" buttons {"Cancel", "OK"} default answer "" default button "OK")
set newFolderPath to defaultFolder & newFolderName
do shell script "/bin/mkdir -p " & quoted form of newFolderPath

It asks for a folder name and creates a new folder in “Logic/Default Folder/” of the folder “Music” in the current user’s home folder if it doesn’t exist.

The variable newFolderPath contains the (full) POSIX path of the folder.

And this is a GUI scripting snippet to simulate the ⇧⌘G keystroke in a standard Save window, to change the path and to enter the file name in the text field

set fileName to "file1.ext"

tell application "System Events"
	tell process "...." -- replace the .... with the process name
		tell window "Save"
			keystroke "g" using {command down, shift down}
			repeat until exists sheet 1
				delay 0.2
			end repeat
			tell sheet 1
				set value of combo box 1 to newFolderPath
				click button "Go"
			end tell
			
			set value of text field 1 to fileName
			delay 0.2
			click button "Save"
		end tell
	end tell
end tell