I would like to create toolbar button or hotkey that will enable me to quickly toggle between two different font sizes. One for normal desktop browsing and one for when I'm a few feet away lying in bed. I'm aware you can use ctrl+scroll wheel to change font size. But would prefer a button or hotkey that would make it possible to quickly switch between two fonts sizes every time. I was able to to create a button and use this setkey "9000", "Millisize", "Font"; #190; I found someone else using it to reset it default font size. Don't know much about writing scripts and which commands I need to use. If someone could write a basic script that would enable switching between two different font sizes. I'm sure I would be able to figure out what numbers to change that would work best for my setup.
Any help would be greatly appreciated
Script to toggle between two font sizes, for viewing from a distance.
-
- Site Admin
- Posts: 60530
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Script to toggle between two font sizes, for viewing from a distance.
1) As you see in Configuration | Colors and Styles | Fonts, XYplorer distinguishes various font sizes. Which do you want to toggle?
2) Check out the "Touchscreen Mode" toolbar button (also menu View | Views | Touchscreen Mode), it might already do what you want.
2) Check out the "Touchscreen Mode" toolbar button (also menu View | Views | Touchscreen Mode), it might already do what you want.
FAQ | XY News RSS | XY Twitter
Re: Script to toggle between two font sizes, for viewing from a distance.
1. The first one, Main Contents
2. The Touch Screen button works pretty well. The only down side is it re sizes the columns when you use it. Which sort of irritates my mild OCD. Would the prefer the Name column to stay larger to read long file names better. But till I find a better option it will do the job. It's almost perfect if it wasn't for the column resizing.
For others who are interested in trying the Touch screen button. I see when you right click on the button. You can choose to use Extra Large buttons and Scale toolbar. Which helps when viewing from further away.
Thank you for the suggestion and help
I'm sure there would be way to write a simple script to toggle between two different font sizes. I'm just not sure what commands I need to play around with.
2. The Touch Screen button works pretty well. The only down side is it re sizes the columns when you use it. Which sort of irritates my mild OCD. Would the prefer the Name column to stay larger to read long file names better. But till I find a better option it will do the job. It's almost perfect if it wasn't for the column resizing.
For others who are interested in trying the Touch screen button. I see when you right click on the button. You can choose to use Extra Large buttons and Scale toolbar. Which helps when viewing from further away.
Thank you for the suggestion and help
I'm sure there would be way to write a simple script to toggle between two different font sizes. I'm just not sure what commands I need to play around with.
Re: Script to toggle between two font sizes, for viewing from a distance.
One of my scripts helped you out? Please donate via Paypal
Re: Script to toggle between two font sizes, for viewing from a distance.
Wow thank you very much that works perfectly.
I found a script that works great. I just changed the $minSize and $maxSize ; and then created a User button in the Toolbar and added a custom Icon
Here is what worked for me
[/quote]
You guys rock![applause :appl:](./images/smilies/applause.gif)
I found a script that works great. I just changed the $minSize and $maxSize ; and then created a User button in the Toolbar and added a custom Icon
Here is what worked for me
Code: Select all
"Toggle Font Size"
$minSize = 15;
$maxSize = 30;
// Determine the current font size.
Button('zoomin', 1);
Button('zoomout', 1);
$sizeRegex = '^.*?(\d*[.,]?\d+).*$';
$size = RegexReplace(Get('Status', 2), $sizeRegex, '$1');
if ($size > $minSize) {
// Zoom out until the current size is smaller.
while ($size > $minSize) {
Button('zoomout', 1);
$size = RegexReplace(Get('Status', 2), $sizeRegex, '$1');
}
} else {
// Zoom in until the current size is bigger.
while ($size < $maxSize) {
Button('zoomin', 1);
$size = RegexReplace(Get('Status', 2), $sizeRegex, '$1');
}
}
You guys rock
![applause :appl:](./images/smilies/applause.gif)