I would like to open a ".scpt" file, what editors can I use?
P.S. I am using Windows, so the App should support Windows.
As others have said, .scpt files are compiled versions of your script. Save your script as a .applescript (i.e. TEXT) file if you want to edit your script on a machine without AppleScript.
My goal is to open image files in a default image viewer (Windows 10 Photos app), and close them per user input. My file path contains backslashes, not standard slashes, although replacing them doesn't seem to change the results I mention below.
I tried the following:
Kernel.system('full_path_to_image')
or the same thing using exec instead, but it simply returns a format error Errno::ENOEXEC. Manually entering the file path in the command interpreter works even if the interpreter is opened via:
Kernel.system('cmd')
I tried to avoid the shell by using a multi-argument version of system, but I could not.
Is it possible to do what I want to?
According to this answer, this should work on windows.
system("start #{path_to_image}")
colleges.
I stuck with trying to open zip archive via command line in 7z GUI.
I have found in documentation that
-7z.exe does not have command to open file in new window.
-Also i did not found command line parameters for 7zFM.exe and 7zG.exe
Does anyone know how to solve this problem or make a workaround for my case.
Here described how to use 7z.exe http://sevenzip.osdn.jp/chm/cmdline/ but not any word about opening archive in GUI.
Thanks.
I was able to open a 7zip archive in a new window using the command
7zfm archiveName.7z
Setting 7zFM as the default program to open .7z file extensions will also open the archive in a new window after double-clicking on it.
We are trying to generate a bash shell script for use on a Linux system from values stored in a Google spreadsheet and we are having difficulties.
I can create the script contents fine and save the resultant file to Google drive but the problems come about when I try to use the file on a Linux box. When the file is downloaded as plain text the encoding is set to UTF-8 which Linux thinks is a binary file when I try to execute it. The other problem we are having is the line endings are forcibly set to the host PC which is a windows box so I get CRLF not LF as required by the Linux machine. I was wondering if there was anyway in Google app scripting to forcibly give me ASCII encoding and UNIX line ending somehow. I'd rather not have to pipe the file contents through strings and dos2unix before being able to use it.
I would like to open a PDF in Photoshop from the command line. My current issue right now is that the default application for opening PDFs is Adobe Acrobat. I'm wondering if there is any parameter I can pass to specify which program to use when opening a file.
In other words, I want to emulate the option of "Open-with" when you right-click a file to open it with the non-default application, but from the command line.
I do not want to change the default application for PDFs to be Photoshop.
Any ideas?
All you need to is provide the filename as a command line argument:
photoshop <path to file>
(<path to file> needs to be quoted if it contains spaces)
For example:
photoshop "C:\Users\csterling\Documents\some document.pdf"
If the directory containing photoshop.exe isn't in your Path environment variable, you'll need to provide the full path:
"C:\Program Files\Adobe\Photoshop\photoshop" "C:\Users\csterling\Documents\some document.pdf"
This isn't a feature of the command prompt, it's a feature of the executable, i.e. photoshop.exe has to be programmed to accept a file to open as a command line argument. Fortunately, it is, as are the majority of Windows applications that operate on files.
In case you want this to work with relative path in PowerShell, here is the script:
function photo
{
$the_filename=resolve-path $args[0]
photoshop $the_filename
}
Then you can just type:
cd C:\Users\csterling\Documents
photo mypic.jpg
You can do it by using the start command:
start <program-name> <file-path>
In your case, you would have to do something like this:
start photoshop D:\open.pdf
Unfortunately, the current version of Photoshop doesn't support this operation out of the box. You can open the program: start "path_to_photoshop.exe", but there is no way to pass it a file to open. If you really want to do it, you will need to get something like this: https://www.eulanda.eu/en/access-photoshop-api-via-powershell-script. Sorry, I wish I had a better answer, especially since I wanted to be able to do this for a program I was working on.