I've been using following command to pre-populate my emails from windows command line, that's exactly what I wanna, the only thing I still cannot figure out is how to add simple html format to the email body, I tried add < b > < /b > for instance, but it didn't work, I just wanna some simple ones, like bold text, text coloring, nothing fancy, thanks
outlook.exe /c ipm.note /m someone#microsoft.com&subject=test%20subject&body=test%20body
reference:
Starting Outlook and having an email pre-populated from command line
http://support.microsoft.com/default.aspx?scid=kb;en-us;181991
Related
The following line of code appears in a python source file. It appears exactly like this when the file is opened up in VS Code and in vi (as well as this text edit block). When I cat the file, the green square is replaced by several non-ascii characters. My question is how does one create a line of text with a swatch of some arbitrary color?
'correct_place': '🟩',
🟩 ("Large Green Square") is actually an emoji. Every emoji has a unicode number. The unicode number for 🟩 is U+1F7E9.
You can open a file in VSCode, copy the emoji above and paste it in that file (using the regular copy and paste commands on your computer, like command+C command+V).
You can also use the echo command in a Linux terminal to write this emoji into a file by using 🟩's unicode number, for example:
$ echo -e '\U0001F7E9' >> sizzzzlerz.txt
$ cat sizzzzlerz.txt
🟩
I'm working with a shell script in VSCode,
I'd like to be able to collapse the function.
In order for me to do that, the 'EOF' word has to have some whitespace before it.
But if I put whitespace before it, the entire coloring of the file is ruined (including all the functions appearing thereafter)
Is there a setting / or another way to do it so it will not behave like this?
Thanks
With EOF word at the beginning of the line
With some whitespace before the EOF
So i'm trying to use the current clipboard file when using snip and sketch in windows 10 in a imagemagick .bat process which converts them to icons, it seems to save to the directy,
AppData\Local\Packages\Microsoft.Windows.ShellExperienceHost_cw5n1h2txyewy\TempState\ScreenClip
But its 3 files,a .json,thumbnail, and then the actual picture. The two pngs dont have any way to differenciate themselves, the file sizes and time made and resolution and name all seem to be random so i cant pull them from that folder, it also seems to save every single snip ever so its a big mess.
Part of the problem i think is that it doesnt appear in the paste clipboard even tho it does exist somewhere because you can paste directly into word docs or discord and it recognises it.
The other thing i've tried is getting the paste.exe from c3scripts.com which only seems to work with text outputting to a .txt file.
I've tried powershell using Get-Clipboard command, which also only works with text.
Does anyone know how to pull this file from the clipboard into something usable in cmd so i can add it to the .bat or if theres another program enterierly that could snip the screen more efficinetly.
TLDR: need way to crop and screencap and save file with least amount of steps possible
you can use Get-clipboard's -format switch in Powershell:
# Verify if clipboard has image and if it has then save it
Add-Type -AssemblyName System.Windows.Forms
$clipboard = [System.Windows.Forms.Clipboard]::GetDataObject()
if ($clipboard.ContainsImage()) {
$img = get-clipboard -format image
$img.save("FilePath")
}
I'm using a Mac and I'm preparing accounts for a company. Every payslip which I've made in Microsoft Word has a voucher number. Because a transaction was missed all voucher numbers are wrong so now there are hundreds of wrong payslips. I want to create a script that can find the following GREP (find beginning of paragraph, text:Vch, any character until \r):
^Vch.+\r
and replace it with nothing (thereby deleting the whole sentence).
I was thinking of using Applescript as it can open the document, perform the GREP find (tricky part), save the document and save it as a pdf (all which is needed).
But apparently my knowledge fails me. Commands from the dictionary like create range, execute find, all bring errors.
Somebody experienced in Applescript that could help me devise a script? Any suggestions? It should be something like:
Tell application "Microsoft Word"
tell active document
set myRange to create range start 0 end 0
tell myRange
execute find find "^Vch.+\r" replace with ""
end tell
end tell
end tell
Many thanks!
There are no special characters to indicate the beginning of a line.
To search at beginning of the paragraph, the script must use return & "some text"
You can use "^p" as paragraph mark, but it doesn't work when you set the match wildcards property to true
To match an entire paragraph, the script must use return & "some text" & return, and the script must use replace with return to delete one paragraph mark instead of two.
Because the first paragraph does not begin with a paragraph mark, the script must use two execute find commands.
The wildcard is *
tell application "Microsoft Word" -- (tested on version 15.25, Microsoft Office 2016)
-- check the first paragraph
select (characters of paragraph 1 of active document)
execute find (find object of selection) find text ("Vch*" & return) replace with "" replace replace one wrap find find stop with match wildcards and match case without match forward and find format
--to search forward toward the end of the document.
execute find (find object of selection) find text (return & "Vch*" & return) replace with return replace replace all wrap find find continue with match wildcards, match case and match forward without find format
save active document
-- export to PDF in the same directory as the active document
set pdfPath to path of active document & ":" & (get name of active window) & ".pdf"
set pdfPath to my createFile(pdfPath) -- create an empty file if not exists, the handler return a path of type alias (to avoid grant access issue)
save as active document file name pdfPath file format format PDF
end tell
on createFile(f)
do shell script "touch " & quoted form of POSIX path of f
return f as alias
end createFile
I would like to ask for your help! There is a text file (target.txt) and I would like to crop some lines from it. I thought it would be a good approach to add these lines to a separate file (to_crop.txt) and write a script which parse the target.txt file for the exact content in the to_crop.txt and when it finds and crops it the result file would be overwritten back to the target.txt (make it smaller).
(Why I need this? During a command line installs script I had to append a config file with some parameter lines (#starthere command #finishere) like:
star there
command xyx,bla bla
finish here
I need to create an uninstall script which removes these lines from this config file.) I would like to use a cmd file in command prompt to do it. Thanks for your ideas in advance!
Use sed, the stream editor: sed.