kunkel321 > 2021-04-25 15:24
Jean Lalonde > 2021-04-25 15:55
kunkel321 > 2021-04-25 17:27
Jean Lalonde > 2021-04-26 17:11
kunkel321 > 2021-04-27 11:17
Jean Lalonde > 2021-04-28 12:28
kunkel321 > 2021-04-28 19:23
Jean Lalonde > 2021-04-28 20:37
kunkel321 > 2021-04-29 08:12
Run, "C:\PortableApps\quickaccesspopup\QAPmessenger.exe" AddFile clipboard
Run, "C:\PortableApps\quickaccesspopup\QAPmessenger.exe" AddFile "C:\Folder\actualfile.txt"
Jean Lalonde > 2021-04-29 08:22
kunkel321 > 2021-04-29 11:49
#NoEnv ; For security
#SingleInstance force ; It it gets restarted, kill and usurp the old process in RAM.
#Persistent ; Keep on keeping on.
SetTitleMatchMode, 2
#IfWinActive, XYplorer
+!a::
Send, ^c ;ctrl+c (copy selected to clipboard)
Sleep, 100
RegExMatch(Clipboard, ".:\\.+\\", vPath)
if (!vPath) ; This means the regex didn't find the pattern.
{
MsgBox no path on clipboard. Stopping.
Return
}
RegExMatch(Clipboard, "\w+\.[A-z0-9]+$", vExt)
if (!vExt) ; This means that the above check passed, but there is not file at end of path.
{
vAdd := "AddFolder"
}
Else
{
vAdd := "AddFile"
}
;MsgBox % "vPath is:`t`t" vPath "`nvExt is:`t`t" vExt "`nvAdd is:`t`t" vAdd "`n`nClipboard is:`t" clipboard
;Run, "C:\PortableApps\quickaccesspopup\QAPmessenger.exe" %vAdd%Xpress "%Clipboard%" ; Xpress skips all dialogs.
Run, "C:\PortableApps\quickaccesspopup\QAPmessenger.exe" %vAdd% "%Clipboard%"
Return
#IfWinActive
Jean Lalonde > 2021-04-29 13:11
kunkel321 > 2021-04-29 13:48
(2021-04-29 13:11)Jean Lalonde Wrote: And enclose it with double-quotes if it can contain spaces:
"%clipboard%"
Horst > 2021-04-30 08:04
(2021-04-29 13:48)kunkel321 Wrote:To make this script more useful for others(2021-04-29 13:11)Jean Lalonde Wrote: And enclose it with double-quotes if it can contain spaces:
"%clipboard%"
Ha ha! I ran into this exact problem (with a space in the filename breaking it). I came to post about the problem, but you had already posted the solution -- Excellent. :- }
I will update the above script.
kunkel321 > 2021-04-30 09:47
kunkel321 > 2021-04-30 11:38
SetTitleMatchMode, 2 ; This line goes in the autoexecute header of the script.
#IfWinActive, XYplorer
!F1:: ; Trigger is Alt+F1
;#### Next two lines are options for script #########
QAPpath := "C:\PortableApps\quickaccesspopup" ; no slash at end of path
ShowDialogs := 1 ; 1 shows QAP dialogs, 0 skips them.
;#####################################################
selected := getSelected() ; calls function that is at the bottom
RegExMatch(selected, ".:\\.+\\", vPath)
if (!vPath) ; This means the regex didn't find the pattern.
{
MsgBox no path found. Stopping script.
Return
}
if ShowDialogs = 1
Switch := "AddFile" ; If it's a folder, QAP will use Folder settings.
else
Switch := "AddFileXpress" ; Skips dialogs and works tranparently.
if (!QAPpath) ; If no path is entered, use this default.
QAPpath := "C:\Program Files\Quick Access Popup"
Run, "%QAPpath%\QAPmessenger.exe" %Switch% "%selected%"
Return
; function from Masonjar on ahk forum
getSelected(){
cO:=clipboardAll
clipboard:=
send ^c
clipWait
selected:=clipboard
clipboard:=cO
return selected
}
#IfWinActive
kunkel321 > 2022-12-14 17:11
;############## SAVE FAVE FOLDER XY > QAP ###############
#IfWinActive, XYplorer
!F1:: ; Trigger is Alt+F1
;MsgBox yes, you pressed the hotkey.
;--- Next two lines are options for script ----
QAPpath := "C:\Program Files\Quick Access Popup" ;no slash\ at end of path
ShowDialogs := 1 ;1 shows QAP dialogs, 0 skips them.
PlaceBefore := "z" ;In QAP > Add Folder > Menu Options > Add before this... list, go to this item. Blank means don't use this feature.
;----------------------------------------------
selected := getSelected() ; calls function that is at the bottom
RegExMatch(selected, ".:\\.+\\", vPath)
if (!vPath) ; This means the regex didn't find the pattern.
{
MsgBox no path found. Stopping script.
Return
}
if ShowDialogs = 1
Switch := "AddFile" ; If it's a folder, QAP will use Folder settings.
else
Switch := "AddFileXpress" ; Skips dialogs and works tranparently.
if (!QAPpath) ; If no path is entered, use this default.
QAPpath := "C:\Program Files\Quick Access Popup"
Run, "%QAPpath%\QAPmessenger.exe" %Switch% "%selected%"
ifequal, ShowDialogs, 1
{
; MsgBox, showDialogs = |%showDialogs%| `n`n PlaceBefore = |%placeBefore%|
IfNotEqual, PlaceBefore,
{
WinWaitActive, Add Favorite
Send, {Tab 8}
Send, {Right}
Send, {Tab 4}
Send, %PlaceBefore%
Send, !a
}
}
Return
; function from Masonjar on ahk forum
getSelected(){
cO:=clipboardAll
clipboard:=
send !c
clipWait
selected:=clipboard
clipboard:=cO
return selected
}
#IfWinActive
kunkel321 > 2022-12-24 12:32
;############## SAVE FAVE FOLDER XY > QAP ###############
#IfWinActive, XYplorer
!F1:: ; Trigger is Alt+F1
;MsgBox yes, you pressed the hotkey.
;--- Next two lines are options for script ----
QAPpath := "C:\Program Files\Quick Access Popup" ; no slash/ at end of path
ShowDialogs := 1 ; 1 shows QAP dialogs, 0 skips them.
PlaceBefore := "z-bottom-of-folders" ; In QAP > Add Folder > Menu Options > Add before this... list, go to this item. Blank means don't use this feature.
;----------------------------------------------
selected := getSelected() ; calls function that is at the bottom
RegExMatch(selected, ".:\\.+\\", vPath)
if (!vPath) ; This means the regex didn't find the pattern.
{
MsgBox no path found. Stopping script.
Return
}
if ShowDialogs = 1
Switch := "AddFile" ; If it's a folder, QAP will use Folder settings.
else
Switch := "AddFileXpress" ; Skips dialogs and works tranparently.
if (!QAPpath) ; If no path is entered, use this default.
QAPpath := "C:\Program Files\Quick Access Popup"
Run, "%QAPpath%\QAPmessenger.exe" %Switch% "%selected%"
If (ShowDialogs = 1) AND (PlaceBefore != "")
{
WinWaitActive, Add Favorite
Control, TabRight,, SysTabControl321, ahk_class JeanLalonde.ca
sleep, 100
Control, ChooseString, %PlaceBefore%, ComboBox2, A
Send, !a
}
Return
; function from Masonjar on ahk forum
getSelected(){
cO:=clipboardAll
clipboard:=
send !c
clipWait
selected:=clipboard
clipboard:=cO
return selected
}
#IfWinActive