What are favorites advanced settings?

Advanced Settings give more control on how favorites are launched.

  • Launch with this application: Normally, folders and FTP sites are opened with Windows Explorer (or your custom file manager), documents are open with their default application and links are accessed with your default browser. With the advanced setting Launch with this application, you can choose to launch your favorite with another application. See Placeholders, below.
 
 
  • Start in: This advanced setting available for Application favorites allows to set the default working directory for the application. Take note that not all applications will comply with this Windows setting. See Placeholders, below.
 
  • Auto-open sub folder: When you open a favorite folder, you can ask QAP to automatically open the most recently created sub folder in this favorite folder. QAP could also open the most anciently created, or the most recently/anciently modified or accessed sub folder. More info here: What are the advanced options for favorite folders?
 
  • Encode FTP URL: When you specify a user name and a password for a FTP favorite, these values are added to the URL and sent to the FTP server. When enabled, this options make sure login name and password are properly encoded. Some application (like Total Commander) may prefer the values to be sent without encoding. For these apps, uncheck the option.Take note that this encoding is not encrypting. It does not prevent the password from being saved in the settings file and sent on Internet in clear text. Be cautious if your password protects sensitive data!
 
  • Sound played when launching the application: Set the file name or the codes of the sound to play. The sound is played immediately after the favorite is launched or the group is executed. You can play a sound file, a system sound or your own custom sound sequence. See also: Can I play a sound when I launch a favorite?
 
Placeholders and User variables

You can use placeholders and user variables in Launch with this applicationParameters and Start In fields. These placeholders can be replaced with:

  • the location or part of the full path and file name of the favorite’s location;
  • the folder where the QAP menu was opened;
  • the file selected when the menu was opened;
  • the content of the Windows Clipboard;
  • user input;
  • parts of the current date or time.

For all the details, see:

Can I create custom user variables and use them in file paths or snippets?

Video demo

User variables can be of great help in various situations:

  • network drive users having to enter long (and often cryptic) paths to reach their content can shorten these paths using convenient variable names;
  • if you use a Shared menu of type Personal on two different computers sharing the same cloud drive (like Dropbox), user variables like {Dropbox} allow you to have fix favorites paths in your menu even if your cloud drive is at different locations on your two systems;
  • same thing for teams using shared menus and cloud drives; favorites in shared menus for folders or files on a cloud drive will work regardless the cloud drives location on each team member PCs;
  • if you plan to move your files to another location, you can use a variable to avoid having to edit all the favorites after you moved the files to the new location;
  • user variables can also be used in favorites name;
  • etc.

To manage your user variables, select the menu Options, User Variables. In this tab, enter your user variables, one by line. Each line must start with the variable name between curly brackets (e.g. {MyVariable}), followed by the equal sign = and the variable content (e.g. {MyVariable}=My Content).

The first time you launch QAP, it creates user variables for commonly used cloud drives found on the system: {Dropbox}, {OneDrive}, {GoogleDrive} and {iCloudDrive}.

 

You can add your own variables. For example, if one line contains {OurSharedFolder}=S:\ThisFolder, the placeholder {OurSharedFolder} will be replaced by S:\ThisFolder in a favorite paths (and other location properties) when launching it or in snippet’s content when pasting it.

If you have multiple user variables, you can use text separators to make your list easier to read. Any lines not starting with { is treated as a comment.

In the following example, the user variable {OneDrive} is inserted in the favorite folder {OneDrive}\Project. If the variable contains C:\Users\Standard\OneDrive as in the previous example, the Project folder will be opened in C:\Users\Standard\OneDrive\Projects.

Notes

  • Nesting user variables: User variables can be nested but remember that variables are resolved (or replaced) in the order they appear in the list. If {Var2} includes {Var1}, {Var2} must appear before {Var1} in the list of variables. 
  • Inserting a user variable “as-is” in a text snippet: precede the variable’s opening bracket with a backtick, eg.: `{Dropbox}.

See also:

How can I use placeholders in favorites location, parameters, snippet text, etc.?

Placeholders are special codes between curly brackets {...} inserted in your favorites properties that are replaced with text that can be different each time you open a favorite. It can be used to insert dynamic or interactive text in a text Snippet. It allows to adapt the location or parameter of a folder, document or application favorite to various situations like the active folder in Windows Explorer, the selected document or the active window. Some placeholders can also be used in favorites name.

Placeholders are presented in two groups:

Location placeholders

Interactive or dynamic placeholders

See also How can I debug placeholders and user variables?

Can I insert values in favorites path, parameters or snippets using LOCATION placeholders?

You can insert values from placeholders in Snippets content and in favorite’s Location, Parameters, Launch with and Start In fields (for all types of favorites supporting these options). When inserted in your favorites, placeholders can be replaced with locations or part of these locations (like folder, filename or drive) based on:

See also:
Can I insert values in favorites properties using dynamic or interactive placeholders?
Debugging placeholders and user variables.

Favorite’s location

In an Application favorite, you can re-use the favorite’s location (or part of it) in the Start In or the Parameters fields. For example {DIR} in the the Start In field will be replaced with the favorite’s location folder. The following examples are based on the favorite’s location C:\MyFolder\MyFile.exe:

  • {LOC} for full location (C:\MyFolder\MyFile.exe)
  • {NAME} for file name (MyFile.exe)
  • {DIR} for directory (C:\MyFolder)
  • {EXT} for extension (exe)
  • {NOEXT} for file name without extension (MyFile)
  • and {DRIVE} for drive letter. (C:)

In the following example, an Application favorite named My App with data file will be open with a parameter based on the application’s folder.

The Parameters field below includes the {DIR} placeholder with a file name Client.DAT. The second red box shows that the {DIR} placeholder will be expanded taking into account the applications’ location from the above screen capture.

Multiple parameters can be inserted in this field. Each parameter must be enclosed between quotes. Also, do not forget that, even if there is only one parameter, a parameter must be enclosed between quotes if it contains spaces.

Current folder in Windows Explorer

You can also use the placeholders {CUR_LOC}, {CUR_DIR}, etc. that will be replaced with the current location of your Explorer window (window under the mouse pointer or active Explorer window when you open the menu). Let’s say you have various folders with the same subfolders structure, for example:

C:\Client-1
C:\Client-1\Contract
C:\Client-1\Contract\Draft
C:\Client-1\Contract\Signed
C:\Client-2
C:\Client-2\Contract
C:\Client-2\Contract\Draft
C:\Client-2\Contract\Signed
etc.

You can create favorites of type Folder or Document that will be opened in a given subfolder under the current (or active) folder in Windows Explorer. For example, a favorite Folder named Current Client’s Signed Contract would open the Signed subfolder for Client-1 if you are in the C:\Client-1 folder, or for the second client if you are in C:\Client-2, etc.

Create a favorite folder with the Folder (path) {CUR_LOC}\Contract\Signed in the Basic Settings tab:

When you will launch this favorite, QAP will get the current folder (in Windows Explorer, Directory Opus or Total Commander) and will replace the placeholder {CUR_LOC} with the detected current folder’s location. To avoid “folder not found” errors, make sure you have a strictly constant subfolders structure and that you always use this favorite in the appropriate folder.

Current (or active) folder in Windows Explorer placeholder can be inserted in location for favorites of types Folder, Document and Application. You can also use these placeholder variations. The following examples are based on the current (or active) folder location C:\Parent\Child:

  • {CUR_LOC} for full location (C:\Parent\Child)
  • {CUR_NAME} for file name (Child)
  • {CUR_DIR} for directory (C:\Parent)
  • {CUR_EXT} for extension (empty)
  • {CUR_NOEXT} for file name without extension (Child)
  • and {CUR_DRIVE} for drive letter (C:)

In situations where QAP could not detect the current folder in Windows Explorer (for example, if the active window is not Explorer), QAP can use a fallback folder if specified like this: {CUR_...|fallback_value}. For example:

  • {CUR_LOC|c:\Parent\Fallback\}
  • {CUR_NAME|Fallback_Child}
  • {CUR_DRIVE|F:}

See also this page for more info about the Start In and Parameters settings: Can I pass the current folder as parameter to an application launched with QAP?.

Note-1: Remember that, in QAP, the relative path conventions .\ for current folder or ..\ for parent folder are processed relatively to QAP’s Settings Folder, not to the current directory in your Explorer window.

Note-2: The current location cannot be detected by QAP for some dynamic folders or libraries (like Music or Videos). For example,  the Desktop folder is a dynamic folder combining the content from the user’s Desktop (C:\Users\UserName\Desktop) and from the Common Desktop (C:\Users\Public\Desktop). In this case, QAP detects that the current folder is the Desktop but, because it can’t distinguish between these two dynamic sources, it will always use the C:\Users\UserName\Desktop as current location since it is the most frequently used folder.

Selected file or folder in Windows Explorer

Similar to using the context menu with Right-Click but with much more flexibility, you can use QAP to pass the location of the selected file (or part of it) to a given favorite application or script.

In the following example, when launching the application favorite MyApp, QAP will replace  the {SEL_NAME} placeholder in the Parameters zone with the file name of the item under the mouse pointer when you open the QAP menu with the Middle Mouse Button.  If you open the QAP menu with the keyboard shortcut (Windows + W), the placeholder will be replaced with the name of the selected file in the active file manager window.

Open the QAP menu by pressing the Middle Mouse Button while the mouse pointer is over the desired file and launch the favorite. In the following example, the favorite application is showing a dialog box with, as parameter, the name of the selected file quickaccesspopup-9_1_2.zip.

These placeholders work in Windows Explorer and Directory Opus. They are not available in Total Commander at this time.

Available placeholders for the selected file are (examples are based on a selected file C:\Parent\Child\Name.Ext):

  • {SEL_LOC} for full location (C:\Parent\Child\Name.Ext)
  • {SEL_NAME} for file name (Name.ext)
  • {SEL_DIR} for directory (C:\Parent\Child)
  • {SEL_EXT} for extension (Ext)
  • {SEL_NOEXT} for file name without extension (Name)
  • and {SEL_DRIVE} for drive letter (C:)

Quick Access Popup Settings file

For user of Quick Access Popup with portable installation, the {SETTINGS_…} placeholders are replaced with the location of the quickaccesspopup.ini file in its working directory. Using the relative path special characters .. (parent directory) and \ (root directory) can also give access to the QAP working directory. However, these placeholders allow to use parts of this path, for example {SETTINGS_DRIVE} to designate the drive where QAP is running.

  • {SETTINGS_LOC} for full location (C:\Parent\Child\Name.Ext)
  • {SETTINGS_NAME} for file name (Name.ext)
  • {SETTINGS_DIR} for directory (C:\Parent\Child)
  • {SETTINGS_EXT} for extension (Ext)
  • {SETTINGS_NOEXT} for file name without extension (Name)
  • and {SETTINGS_DRIVE} for drive letter (C:)

Active window

Thanks to the placeholder {ActiveWindow}, you can open Documents, Links and FTP favorites in the active window. Simply insert the placeholder {ActiveWindow} in the Launch with this application property of the favorite in the Advanced Settings tab. To be the “active window”, an application must be at the foreground and, generally, have the keyboard or mouse focus.

For example, if you have Notepad and Notepad++ text editors running at the same time on your system, if you select in your QAP menu a text file favorite with this option, it will be open the editor that is currently the “active window”. The same is true for Link favorites and if you have two different browsers (like Chrome and Firefox) running at the same time on your system.

To open the favorite with the active window, QAP is using the Windows Run command using the active application path with the favorite’s path as parameter. Most of the time, the application will open the document in a new tab or a new internal window. However, in some case (for example with Notepad), the document will be open in a new instance (a new window) of the same application.

At this time, for safety, before launching a favorite, QAP displays a confirmation prompt with the path of the active widow. An option could be added in the future to bypass this prompt. If you need it, please raise this issue on the QAP forum.

Can I insert values in favorites properties using DYNAMIC or INTERACTIVE placeholders?

You can insert values from placeholders in Snippets content and in favorite’s Location, Parameters, Launch with and Start In fields (for all types of favorites supporting these options). When inserted in your favorites, placeholders can be replaced with text based on:

See also:
How can I use placeholders in favorites location, parameters, snippet text, etc.?
Debugging placeholders and user variables
Placeholders in favorites name

Clipboard

You can use the Windows Clipboard to insert variable pieces of text in your snippets or in various paths in favorites dialog box. When you launch your favorite, QAP automatically replaces the placeholder “{Clipboard}” (without the quotes) with the current text in the Windows Clipboard.

For example, in the following Snippet example, the Clipboard’s content will be inserted in the second line between the arrows. If the Clipboard contains an image or binary data, nothing is inserted.

In this second example, the content of the clipboard is sent as parameter. The content of the Parameters zone is expanded in the preview zone named Current parameters with expanded placeholders at the bottom of the dialog box. It shows what would be the parameter sent to the application with the current Clipboard’s content.

The example above is a working example for browsers applications Chrome, Firefox and Internet Explorer. This parameter will automatically launch your browser to search for the text contained in your Windows Clipboard. Make sure you include the quotes correctly to include all word in the search. If you want to search for an exact expression, add surrounding quotes like this: "? \"{Clipboard}\"" (these browsers consider the backslash “\” as an escape character for quotes inside the parameter).

If you use the browser Microsoft Edge, simply enter in the Parameters zone {Clipboard} (no quotes) for a normal search or "{Clipboard}" (with quotes) to search for an expression.

Text selected

Starting with QAP v11.6.3, you can use the placeholder {SelectedText} that will be replaced with the text selected in the active window. This can also be selected contents in other formats than plain text, for example cells in a spreadsheet, as long as a text-only version of this content is copied to the Clipboard by the active application. This cannot be an image.

See the Clipboard section above for similar example of usage of the {SelectedText} placeholder.

Note: Some applications may not react as expected when QAP tries to copy the selected text. If the copy does not succeed, the placeholder is simply deleted.

User Input

Using the placeholder {Input:prompt} you can enter a different content at each launch of a snippet or favorite.

The prompt inside the parameter will be displayed as a prompt in the input box, In the example below, QAP will open the folder c:\clients\ABC123.

The content entered by the user can be re-used in the same favorite thanks to a temporary user variable named based on the prompt of the Input placeholder. For example, in a Snippet with a placeholder {Input:Enter Client ID}, a temporary user variable named {Enter client ID} would allow to paste the ID of the client again later in the same snippet.

Using the placeholder {Menu:prompt} you can select a different item from a menu each time you launch a snippet or a favorite. The basic syntax for this placeholder is: {Menu:text1|text2|text3}. In this example, the text from the menu label (text1, text2, etc.) will be inserted in your favorite.

If you have long or multiline menu items, each item can be preceded with a shorter label using the tilde (~) as separator. For example: {Menu:label1~long or multiline text|label2~another item|…}. For better readability in the Edit favorite dialog box, the labels can include line breaks and tabs that will not be displayed in the menu.

Finally, you can make the first menu item bold to look like a title by starting the menu with an empty item with only a label. For example: {Menu:Title~|item label 1~item content 1|…}, as in this example:

Artist: {Menu:
Artists ~|
LD     ~Leonardo DiCaprio|
TC     ~Tom Cruise|
AS     ~Arnold Schwarzenegger}.
 

Current date or time

The placeholder {Now:format} inserts in favorite’s location or in a snippet the date or time at the moment the favorite is launched. The date and/or time is inserted following the syntax described in the AHK FormatTime command, for example:

  • {Now:yyyy-MM-dd} -> 2022-03-13
  • {Now:dddd hh:mm} -> Sunday 14:06
  • {Now:MMMM d, yyyy h:mm tt} -> March 13, 2022 4:30 PM

In addition to the AHK format the format {Now:ld} allows to insert the last day of the current month. You can combine this with other {Now:...} placeholders to form a complete date, for example:

  • {Now:ld} -> 28, 29, 30 or 31 depending on the current month
  • {Now:MMMM} {Now:ld}, {Now:yyyy} -> February 28, 2022

These placeholders can be inserted in locations, for example:

C:\reports\{Now:yyyyMM} for the folder of the current month (as in C:\reports\202203)

or in Snippets, for example:

Report sent on {Now:MMMM d, yyyy} at {Now:hh:mm tt}

Add UTC at the end of the format string to insert Universal Coordinated Time, for example: Report sent at {Now:h:mm UTC} UTC

Date and time calculation

You can also insert future or past dates and time using calculation with the following syntax:

  • {Now[sign][value pairs]:[format]}
  • where [sign] is either + (plus) or - (minus);
  • [value pairs] is one or more pairs of:
    • a number (integer);
    • a time unit identified by one of the letters smhdMy (case sensitive) for seconds, minutes, hours, days, Months or years;
  • and [format] is the date or time format as described above.

For example (supposing we are March, 13, 2022 at 4h30 PM):

  • {Now+1d:yyyy-MM-dd} (tomorrow)-> 2022-03-14
  • {Now-1y6M:yyyy-MM-dd} (1.5 year ago) -> 2020-09-13
  • {Now+3h30m:h:mm tt} (in 3.5 hour from now) -> 8:00 PM (or else, depending on regional settings)
  • {Now-1M:yyyy-MM}-{Now-1M:ld} (last day of previous month) -> 2022-02-28
  • {Now-30d:yyyy-MM-dd} (30 days ago) -> 2022-02-11
  • {Now+1M10d:yyyy-MM-dd} (in 1 month and 10 days) -> 2022-04-23
  • {Now-7h35m:HH:mm} time 7 hours and 35 minutes ago, in 24-hour format -> 08:55

Random text or number

The {RandomText:...} and {RandomNumber:...} are replaced by a random piece of text or number (integer or floating number) each time you launch a snippet or favorite.

  • {RandomText:text1|text2|text3} is replaced with one of the three pieces of text (for example, {RandomText:Today|Tomorrow|One of these days})
  • {RandomNumber:x|y} is replaced with an integer number between integers x and y (for example, {RandomNumber:5|10})
  • {RandomNumber:x|y|n} is replaced with a floating point number between x and y with n decimals (for example, {RandomNumber:0.5|1.49|2}

GUID (Globally Unique ID)

The placeholder {GUID} placeholder is replaced with a different Globally Unique ID of 32 hex digits (128-bit) each time you use a favorite.

Placeholders in favorites name

Some placeholders can be inserted in favorites name. The most obvious usage is to insert a date in your menu. {NOW:…} will be replaced the date and time when the menu is built (or refreshed).

These placeholders can also be used if whenever someone finds a usage for this:

  • {LOC}, {NAME}, etc. the favorite’s own location
  • {SETTINGS_LOC}, {SETTINGS_NAME}, etc. the location of your Quick Access Popup settings file;
  • {Clipboard}: content of the Clipboard when the menu is built
  • {Input:prompt} and {Menu:prompt}: prompting user each time the menu is refreshed
  • {RandomText:…} and {RandomNumber:…}, {GUID}: different at each refresh.

The other placeholders {CUR_…}, {SEL_…} and {ActiveWindow} are not applicable in the case of favorites names and will be replaced by an empty string. In all cases, if the resulting name is not unique, the suffix “[!]” will be added to the duplicate.

On two PCs with a cloud drive (like Dropbox), can I save my QAP settings on this cloud drive?

No, this is not recommended. But there is a better solution.

If you save your settings file (quickaccesspopup.ini) on a cloud drive, you could face synchronisation issues. Let’s figure this scenario: 1) you edit your settings on system A but do not save them yet (leaving the Settings window open), 2) then edit your settings on the computer B and save them; 3) finally, back to computer A, you find the Settings window open and Save and Close it. Doing that, you overwrite the changes done on system B and, at best, your cloud drive will show two conflicting versions of your settings file. And there may be other scenarios like this one.

It is a better option to have your settings saved on a different folder for each PC and use a Shared menu of type Personal. Then, QAP will monitor changes on the two (or more) computers and will alert you if you have changes on one computer that are not saved on another system.

You can insert your shared menu at the top level of your QAP menu to access it easily. You can also assign a specific keyboard shortcut or mouse button to this menu. Finally, see how user variables and system variables can help you if your cloud drive and system folders are saved on different locations on your systems.

More info on shared menus here: Can a submenu be shared on different PCs or by different users?

Video – Users Variables (11 min.)

View, comment or LIKE this post on our YouTube channel

Presentations videos

Demo videos