Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;############## 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement