What is folder pathname for Numbers in iCloud? - iphone

I need to copy Numbers cell $A$1 to clipboard by iPhone shortcut . This is to generate timestamp which is to systematically rename Photos or automate tag Notes to enhance searchability .
One reason to custom rename photo:
As-Is, when the total count of photos exceed 9999, Apple start the next photo with 0001 again making two photos with same four digit but suffixed by quotation marks and a number representing the next available number for that 4 digit. This arrangement can be confusing when ideally the larger number is more recent instead of say, there are two distinct photos named as IMG_0960 IMG_0960(2)
There is a shortcut to rename photo but I do not have skill to modify it for dynamic tagging such as timestamp .
Shortcut to rename photo by Alancito
[custom rename a photo by Alancito ]
2Following folder pathname isn't for iPhone environment (
Applescript provided by https://discussions.apple.com/thread/254085956?login=true&page=1
tell application "Numbers"
open "/Users/yourusername/Desktop/xyz.numbers"
tell document 1
tell table 1 of sheet 1
set theVal to value of cell "A1"
set the clipboard to theVal
end tell
end tell
close document 1
end tell

Related

How to insert a link to a folder

I can insert links to specified documents within folders, I want to be able to insert a link that takes the user to the folder to open up any document within.
I've tried something to the effect of this, but get an error ///server/share/etc
///server/share/etc
It wont take the file address that I am inputting in the 'insert link' option.
So you can link to a folder, it should be in this format:
file:///"Drive":%5C"folder"%5C"folder"%20"folder"%5C"folder"%20"folder"/
Items in "" are to be filled in. the %5C is to separate folder names, and the drive from the first folder. %20 is used in place of spaces between words of a folder. like New%20Folder.

How to remove the file extension using a snippet variable. List of snippet variables

I use vscode.
I want to use costum snippets, but {TM_FILENAME} has an extension name.
How can I delete the extension from {TM_FILENAME}?
like this:`
In file MyModule.js:
Transform: ${TM_FILENAME/(\w+)\.js/\1/g}
Output:
MyModule
You can use TM_FILENAME_BASE to get only the filename:
${TM_FILENAME_BASE}
Actually, since the question was posed a few new built-in variables have been added,
including TM_FILENAME_BASE. See snippet variables documentation. So there is no need to do a transform just to get the filename without the extension.
Here is the current list of snippet variables:
TM_SELECTED_TEXT The currently selected text or the empty string
TM_CURRENT_LINE The contents of the current line
TM_CURRENT_WORD The contents of the word under cursor or the empty string
TM_LINE_INDEX The zero-index based line number
TM_LINE_NUMBER The one-index based line number
TM_FILENAME The filename of the current document
TM_FILENAME_BASE The filename of the current document without its extensions
TM_DIRECTORY The directory of the current document
TM_FILEPATH The full file path of the current document
CLIPBOARD The contents of your clipboard
WORKSPACE_NAME The name of the opened workspace or folder
CURRENT_YEAR The current year
CURRENT_YEAR_SHORT The current year's last two digits
CURRENT_MONTH The month as two digits (example '02')
CURRENT_MONTH_NAME The full name of the month (example 'July')
CURRENT_MONTH_NAME_SHORT The short name of the month (example 'Jul')
CURRENT_DATE The day of the month
CURRENT_DAY_NAME The name of day (example 'Monday')
CURRENT_DAY_NAME_SHORT The short name of the day (example 'Mon')
CURRENT_HOUR The current hour in 24-hour clock format
CURRENT_MINUTE The current minute
CURRENT_SECOND The current second
CURRENT_SECONDS_UNIX The number of seconds since the Unix epoch
For inserting line or block comments, honoring the current language:
BLOCK_COMMENT_START Example output: in PHP /* or in HTML <!--
BLOCK_COMMENT_END Example output: in PHP */ or in HTML -->
LINE_COMMENT Example output: in PHP // or in HTML <!-- -->
vscode v1.66 will add two new variables:
CURSOR_INDEX 0-based
CURSOR_NUMBER 1-based
The above two work with multiple cursors so that each cursor position (same as a selection) will have an incremented integer inserted.
For an example of this, see https://stackoverflow.com/a/69946559/836330
It looks like v1.40 will add:
WORKSPACE_FOLDER Path of workspace directory
RANDOM Insert 6 random digits
RANDOM_HEX Insert 6 random hex digits
See https://github.com/microsoft/vscode/pull/82529 and https://github.com/microsoft/vscode/pull/79764
v1.53 will add the relative path from the root folder to the current file:
RELATIVE_FILEPATH
UUID
See https://github.com/microsoft/vscode/pull/114208 and https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_53.md#new-snippet-variables
You can't do this at the moment but there's a feature request on the vscode GitHub page for what you want: https://github.com/Microsoft/vscode/issues/6920.
[EDIT]
My answer above is now out of date - you can use the ${TM_FILENAME_BASE} variable as mentioned by other contributors.
You can try something like this if you know the file extension,
${TM_FILENAME/(.js)//}
It will turn FileName.js to FileName

Word Add in VSTO - How to get multiple ranges of text copied on multi-select

I am trying to store and high-light text copied by user when he opens the word file back. When he copies one paragraph, I am able to highlight (I am storing all this copied information for e.g. range values in an XML file) but when he copies content of multiple paragraphs using Ctrl Button, I am unable to get individual range values.
Could you guys help on this?
What you are trying to do is not supported by (the current versions of) Word because programmatic access to discontiguous selection is limited. In particular, you cannot access the different ranges in that selection (you can only the last subrange).
The limitations are listed in detail in this MSDN article:
Limited programmatic access to Word discontiguous selections

Is there a way to prompt for multiple file select and assign those files (and paths) to a variable?

Is there a way to prompt for multiple file select and assign those files (and paths) to a variable? For example, bring up a dialogue box that starts you in a base directory, and then allows you to assign files you select to different variables? Currently I have the paths and files hard coded in but this doesnt allow for any variety in the end. The other method i was using was using 24 instances of uigetfile, but this was tedious and time consuming so i swapped back to using hard coded file names.
Reread the uitgetfile documentation, there is an option to allow multiselect files:
[FileName,PathName,FilterIndex] = uigetfile(...,'MultiSelect',selectmode) opens the dialog in multiselect mode. Valid values for selectmode are 'on' and 'off' (the default, which allows single selection only). If 'MultiSelect' is 'on' and you select more than one file in the dialog box, then FileName is a cell array of strings. Each array element contains the name of a selected file. Filenames in the cell array are sorted in the order your platform uses. Because multiple selections are always in the same folder, PathName is always a string identifying a single folder.

How to load many images at the same time?

I have a problem loading multiple images at the same time using matlab. Could anybody me?
How about writing a small program?
'uigetdir' [http://www.mathworks.com/help/techdoc/ref/uigetdir.html] to let user to select the directory where image files are.
'dir' and determine the names of the files in that directory.
'listdlg' to create a list of files on a GUI, with 'SelectionMode' as 'multiple'
check the file extension (you can do this before #3 also to show only image files in the list.)
count (N) how many image files the user wants to load and plot ('length' of the selected filename string).
loop for N times and go through the list of filenames, and open each one with the appropriate loader function (by determining the file extension of each file before loading)
as you load the data from the files, you can plot them however you like either in a single figure or multiple.
Best,
Y.T.