Jan 28, 2016 How to create a 3D Terrain with Google Maps and height maps in Photoshop - 3D Map Generator Terrain - Duration: 20:32. Orange Box Ceo 6,269,522 views. Given the recent hacks at Apple, Facebook, and Twitter, it's time for drastic action: removing or disabling Java on your Mac. Rich Mogull explains why and how.
How did I automate a long task of foldering and renaming.Sometimes we come across with simple tasks that consist of many similar small steps. After a point, doing it manually isn’t reasonable. This is where you need to start using automation tools.In there are two ways that you can do that without installing anything — or you can use third-party tools.The easy way is using Automator app. It has a drag-and-drop interface that allows you to setup a workflow easily by combining predefined actions. The possibilities are almost limitless, but it’s not easy to setup really complex, multi-step, nonlinear workflows.The harder but really advanced way is using JXA ( for Automation). It’s a programming language based on Javascript. It took place of AppleScript since macOS Yosemite.
You can automate almost anything from clicking on the buttons with a specific order to opening a group of apps when you say a command. You can also use JXA in Automator app, that would be a nice mix. My Case Needed AutomationI had a bunch of video courses that I downloaded from during my yearly subscription period. The downloaded files weren’t grouped and they had really long names. So they were needed to be renamed and foldered. I could have done it one by one, but it would take unreasonably long time. So I decided to automate it.
Firstly, we create a couple of variables that we will use frequently: currentApp for prompting something in the current application, finder for creating and moving files around and systemEvents for accessing to files.The OS has a set of standard scripting additions that provide the ability to speak text, display user interaction dialogs, and more. To use them, an application must explicitly set the includeStandardAdditions flag to true. The third line stands for that. We’re declaring that we want to use these additions.After that, we prompt a folder chooser panel to get the folder to be processed.
Then we create a new folder in the same directory to move the processed files into it. Later, we traverse in the folder with a for statement and create an array from the names of the files. The aim is accessing to these files later again by using their names. Because the content of the folder will change dynamically as we move the processed files out. Using file names will ensure that we are accessing to correct files.Normally we should be able to do that without using file names. I tried to do that but couldn’t manage it. There must be a way of creating pointers to files that don’t corrupt when the content of the folder is changed.
I will update this part if someone shows me how to do it. Finally, we process every file in the array. Firstly we get the file by using the file name and use regular expressions to divide the name into two parts: before the hyphen and after the hyphen.
The first part will be the folder name and the second part will be the file name.After that, we create a new folder with that name if there is no one already, move the file into it and rename it.That’s all! Tips & Tricks Use Editor to Write and Run the ScriptThe default editor for JXA is Apple’s Script Editor.
But it’s really basic and not so usable. I recommend you to use by installing two packages for writing and running JXA.First of the packages is for automatically de/recompiling.scpt files and the second one is package for running scripts in Atom Editor including JXA. I should add that I’m not completely sure if script package is able to give as extensive outputs as Script Editor, but in my case, it was certainly enough.I also would like to mention the theme I use in Atom:.
I really like its colors and the contrast! ResourcesBecause of insufficient resources, writing this script took longer than I expected. Most of the tutorials and books are for AppleScript even though it has been years since JXA was introduced.There is a great list of resources. Other than that, I would recommend you to search code snippets in Github.
There are many public scripts, sometimes you come across with something really close to what you want to do.Hope these would help you to start automating things and help you to save some time! Please click or hold on the ? button as much as you can!
.Enable cookies in Mozilla FirefoxCookies are enabled by default in the latest version of Firefox.Enable cookies in Safari. Launch Safari from your desktop or Dock. From the main menu at the top of your screen, click Safari and then Preferences. Click the Privacy icon. In the Block cookies section, ensure that the radio button is set to Never. Close this window.
Continue on to.Enable JavaScript in Safari. Launch Safari from your desktop or Dock.
From the main menu at the top of your screen, click Safari and then Preferences. Click the Security icon.
In the Web content section, ensure that the Enable JavaScript check box has been checked. Close this window.Enable cookies in Google Chrome. Launch Google Chrome from your desktop or dock. Click on the menu icon in the top right corner of the window. Select Settings from the menu.
Scroll to the bottom of the settings page and click Show Advanced Settings. Choose Content Settings from the Privacy section. Ensure that the radial button for Allow local data to be set (recommended) is selected.
Click Done to save your changes. Continue on to.Enabling JavaScriptJavaScript, which is different from Java, is a language used by web browsers that allows for easier browsing and more browsing features. JavaScript is enabled in modern browsers by default. Use the instructions below if you have previously disabled JavaScript in Chrome. Enable JavaScript in Google ChromeStarting with Chrome version 42 (released April 2015), Chrome has disabled the standard way in which browsers support Java based plugins.