AutoHotkey - Zip called as a part of a path
<p><strong>1.</strong> I am in a certain folder called "2" where are different kind of files and the path looks like this: </p>

<blockquote>
  <p>"C:\Users\Me\Desktop\Named_Folder\1\2"</p>
</blockquote>

<p>I want to put all those files in there in a Zip and how should the script look like so at the end the Zip would be called "Named_Folder", the same as the folder in the path ? Need to mention that the "Named_Folder" will have different name each time. So how to name the zip as two directories above.</p>

<p><strong>2.</strong> Till now I have just found the script to put all those files in a zip:</p>

<pre><code>    #IfWinActive ahk_class CabinetWClass 
    Send ^a                 ; Select All
    Send, {AppsKey}         ; Press the "context menu" key
    Sleep 100
    Send n              ; Select "Send to" with the "n" key
    Sleep 100
    Send {Right}            ; Open "Sent to" with the "right arrow" key
    Sleep 100
    Send {Down}             ; Select "Compressed (zipped) folder" with the "arrow down" key
    Sleep 100
    Send {Enter}            ; Execute "Compressed (zipped) folder" with the "Enter" key
    return
</code></pre>

<p>And how the script should look like to combine the <strong>1.</strong> and the <strong>2.</strong> step ? With one letter shortcut.</p>

<p>So at the end the result should look like this:</p>

<p><a href="http://i.stack.imgur.com/pwgCE.jpg" rel="nofollow">Example</a></p>

<p><strong>3.</strong> And then I would like to combine below two scripts (F2 F3 or even F1 if it changes anything) with one letter shortcut (4 first lines are from default AHK file):</p>

<pre><code>#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


#If WinActive("ahk_class CabinetWClass") ; explorer

F1::
for window in ComObjCreate("Shell.Application").Windows
try Fullpath := % window.Document.Folder.Self.Path
; IfExist, %Fullpath%\1\
    Run, %Fullpath%\2
return

F2::
for window in ComObjCreate("Shell.Application").Windows
try Fullpath := % window.Document.Folder.Self.Path
; IfExist, %Fullpath%\1\2\
    Run, %Fullpath%\1\2
return

#If


#IfWinActive ahk_class CabinetWClass

F3::
for window in ComObjCreate("Shell.Application").Windows
try Fullpath := % window.Document.Folder.Self.Path
if (SubStr(Fullpath, -3) = "\1\2")
{
StringReplace, Fullpath, Fullpath, :,
StringTrimRight, Fullpath, Fullpath, 4
StringSplit, folder_array, Fullpath, \,
MsgBox, % folder_array%folder_array0%
    Send ^a                 ; Select All
    Send, {AppsKey}         ; Press the "context menu" key
    Sleep 100
    Send n              ; Select "Send to" with the "n" key
    Sleep 100
    Send {Right}            ; Open "Sent to" with the "right arrow" key
    Sleep 100
    Send {Down}             ; Select "Compressed (zipped) folder" with the "arrow down" key
    Sleep 100
    Send {Enter}            ; Execute "Compressed (zipped) folder" with the     "Enter" key
        Sleep 2000      ; wait 2 seconds
        SendInput, % folder_array%folder_array0%
}
return

#IfWinActive
</code></pre>

<p><strong>4.</strong> And then extract the zip (right click-->context menu-->Extract to "folder with the same name as zip"</p>

<p><a href="http://i.stack.imgur.com/ficc7.jpg" rel="nofollow">Context menu entry example</a></p>

<p>So it creates a folder named "NAMED_FOLDER" with all the extracted content.
I know that when I select the zip and press mouse right-button (to open context menu) and press letter "e" it works.</p>

<p><strong>5.</strong> Then move this Zip and This new Extracted Folder to Desktop in a Folder "FINAL"</p>

<p>And at the end to do all those 5 steps with one letter shortcut. That would do some voodoo magic for me which I really need for the workflow.</p>