Page 3 of 8

Lazarus Pascal – Move Items to Trash for Windows, Linux and macOS

Lazarus Pascal – Move Items to Trash for Windows, Linux and macOS
4

In this short article I’ll show how I implemented a cross platform (Windows, Linux, macOS) function for Lazarus Pascal to move files or directories to the TrashCan or Recycle Bin.

Since it took me some figuring out, I figured; why not write it down so others may benefit from this as well.
For your convenience: You can also download the Lazarus Pascal unit here, which holds the function for macOS, Linux and macOS.

ConnectMeNow v3 – Mount Network Shares Quick and Easy on a Mac

ConnectMeNow v3 – Mount Network Shares Quick and Easy on a Mac
221

macOS is great – I really like it a lot – but one thing it doesn’t handle all that great is … network shares.

In this day and age a little weird to still see this, especially from a company like Apple. We are more network connected than ever before – at home, in school and at work. We have network shares on our computers, want to access company network shares, or have a dedicated file server or NAS (Network Attached Storage) to store our information or make our backups.

Unfortunately, it is still cumbersome under macOS X to connect to those “shares” (also known as mounted network “Volumes“).

In Finder, a server doesn’t always appear right away, we need to go through a list of shares on a given “server”, get confused if we need SMBCIFSFTPSSHWebDAVNFS or AFP, and I’m not even mentioning the need to enter a username and password on protected shares.

For this reason I created ConnectMeNow – initially just for personal use.
But the arrival of the 64 bit requirement, mandatory signed applications, and notarization requirements, and Catalina issues, my original old version was simply outdated.

So after months of work, I’d like to present ConnectMeNow v3, which hopefully makes working with shares easier for you as well.

MacOS – How to create bootable macOS install media

MacOS – How to create bootable macOS install media
0

In this article, I’ll show you the steps to create macOS install Media …

As most Mac users will know; each new macOS version comes with a few challenges. For some it’s nothing, for other it’s a disaster.

Catalina is one of the latter, a disaster for quite few amongst us, due to changed security rules and the lack of support of 32 bit applications.
Some of my favorite tools simply no longer work, and as a developer this makes me nervous when considering switching to the latest and greatest.

For this purpose I always create a virtual machine in VMWare Fusion, running the macOS version that I ran before the update.
This comes with challenges though, since Apple, in their infinite wisdom, does not simply provide macOS install media (eg. a DMG or ISO file) so you can install another version of macOS. We have to create our own.

Note: Here I describe how to create macOS install media, either as a bootable USB stick to do a fully clean macOS install for your Mac, or a DMG file, for example to setup a virtual machine.

MacOS – ToggleTheme – Single click Toggle Theme

MacOS – ToggleTheme – Single click Toggle Theme
2

As a hobby developer, when testing dark theme vs light theme under MacOS X, I have those moments where I have to switch back and forth between both themes quite often.
Going into the System Preferences to toggle theme, choosing the Appearance option, and then selecting the desired theme, does indeed work, but I wanted just a “one click” theme toggle.

To help myself with that, I created a small application that does exactly this: it toggles to “the other” theme, with just a simple click.
So when Dark Theme is active, it switches to the Light (Aqua) Theme. If however the Light Theme is active, it switches to Dark Theme.

The application is super simple, and has no interface. Just start the App and it changes theme and then closes itself.
Normally, this App would just sit in your Applications directory, with the optional shortcut in your Dock or even on the Touch Bar (if your Mac has one).

MacOS – SMJobBless: Elevated Privileges in Lazarus Pascal

MacOS – SMJobBless: Elevated Privileges in Lazarus Pascal
2

As some of you know, I created ApplePi-Baker a while ago, and with a new version I wanted to get away from using command-line tools like “dd” and “diskutil“. To do this the right way I needed to know how to use SMJobBless, in order to get root access, a.k.a. elevated privileges, privileged helper tool, etc.

Back in the day, we could do this pretty easy in our application, simply by using opening, reading and writing data from/to disks as “files”, with relatively simple code in our applications. These days seem to be gone …

With all kinds of malware trying to “hack” us, companies like Apple and Microsoft keep making it increasingly more difficult to actually get admin (root) access straight from our application (not to mention the seemingly cumbersome signing of applications). Which is all good, just too bad that the now majority of the time I spend on developing an application involves adapting to these limitations, instead of doing the creative thinking towards what the application really is for.

Apple has created a poorly documented mechanism for this, referred to as “SMJobBless” or “Privileged Helper“, and focusses heavily on Objective C and Swift – neither of these I like, let alone working with XCode (yuk!) – I really prefer working in Pascal, and specifically in an awesome IDE provided by Lazarus Pascal.

So in this article, I’m documenting my own findings to get this working with Lazarus Pascal – which took a lot of work and testing.

Keep in mind – I’m definitely not an expert on this topic, and I tried to include as much of what I found out as possible. It appears no-one has done this with Lazarus Pascal yet, so please bear with me, and definitely feel free to post improvements and/or suggestions. I’m sure there may be better ways and I’m always open to improving things, including myself.

MacOS – Organize your Dock – Stack Overlays

MacOS – Organize your Dock – Stack Overlays
12

Apple has done a pretty good job with the Dock in MacOS. There is just one thing that I do not like though; the way it stacks icons when you add a folder to your Dock.

A smart guy from Japan (2007 – Yasushi Chida) actually came with a neat idea for that, by introducing “buckets” (or better said: Stack Overlays) placed over the folders in your Dock. All that without the need to install any extra applications!
Unfortunately, his website at Yahoo!/Geocities has been gone for quite a while now.

The few steps you have to take can be a little bit challenging for MacOS beginners (even though it is pretty easy – as usual; once you know how it works). So in the article I’ll show you how to use buckets (a.k.a. Stack Overlays) in your MacOS Dock. This seems to work as of MacOS X Leopard and still works in Mojave (and I do expect this to work in future versions as well).

MacOS – Create a “Sleep” Keyboard Shortcut on a Windows Keyboard

MacOS – Create a “Sleep” Keyboard Shortcut on a Windows Keyboard
2

Some of you may be familiar with the problem … no sleep button on your keyboard.

You have a really nice Mac, but you’re using a Windows keyboard since there is no MacOS keyboard that you really like.
I’m using a keyboard from Havit (you can find it here).

One of the things I hate about this setup is that I have no key or key-shortcut to put my computer to sleep.
When you look at the Apple reference, you’ll only find keys that cannot be found on your Windows keyboard, like the Eject key, or the Power key.

So in this article, I’ll show you, without the use of special software, how I have created a keyboard shortcut to put my Mac Pro to sleep, using a Windows keyboard.

miniWOL v2 – Quick and Easy Wake On LAN Utility

miniWOL v2 – Quick and Easy Wake On LAN Utility
29

Waking up devices that are network connected, can be done with the so called “Wake On LAN” feature provided by certain devices (like for example a NAS, FileServer, or even a PC). A while back I created a simple application for this – miniWOL – keeping in mind that the user may not be too familiar with all the configuration details (see: previous miniWOL versions).

I wanted just a simple menu in the System Tray (Windows: next to the clock, usually the lower-right corner of your screen) or Menubar (MacOS X – top of your screen, Linux often at the bottom of your screen). Well, after a bit of searching I could not find anything suitable or to my liking and I decided to just write something myself.

The old miniWOL been good so far, and plenty folks seem to have a good use for it privately and professionally. However, Apple had to change a few things (moving to 64 bit, using Cocoa instead of Carbon, and the need to sign applications – unfortunately Microsoft will probably follow soon) so while revamping the Mac version, I revamped the Windows version as well, and added a 64-bit Linux version as well (by request).

Rename My TV Series 2

Rename My TV Series 2
795

Rename My TV Series, a tool to rename tv series episodes, has been around for a while now, and it’s time for an update (the “old one” can still be found here). So I proudly present: Rename My TV Series 2.

Two of the main reasons for this new version are the needed update of the user interface and support for the new API of TheTVDB.com. But there is more; macOS users wanted a 64 bit version to avoid the 32 bit complaining and having the application signed was on the wishlist for them as well. Support for SSL (since theTVDB.com API requires this), the use of notifications and the support for a dark theme, the merging of 2 episodes, caching results, are a few of other desired or needed items.

I’m still striving to do as much cross-platform development as possible, so macOS, Windows and Linux users can use my tools, which means that this new version will be available for all these 3 platforms.

Lazarus Pascal – Custom Fonts for MacOS Applications

Lazarus Pascal – Custom Fonts for MacOS Applications
4

I’m not sure about other developers, but I occasionally like to use my own custom font for my Lazarus Pascal applications. Typically I do this so I have access to better icons and symbols available in my application, instead of semi blurry bitmap icons. If you use this the right way, your icons and symbols will look much better and will scale really great.

Usually, I use a TTF font for this which I generate at IcoMoon.
IcoMoon is an awesome website where you can compile your own TTF font (or SVG or PNG images of symbols) for use with your website (Tweaking4All uses it as well) or … in your applications.

Since there are plenty examples out there how to do this in Lazarus Pascal for Windows, here an article that shows you how to do this in Lazarus Pascal under macOS.

Remotely Wake up your Computers with Wake On Lan

Remotely Wake up your Computers with Wake On Lan
4

Wake On Lan, the Ethernet standard for waking up (switching them ON) network enabled devices remotely, has (again) gained popularity, especially under NAS/Server users, who use their server or NAS only a few hours a day. Wether it’s to save on your Power bill, reduce your Carbon-Footprint, or to spare your equipment, Wake On Lan is here to stay …

Now come these question though,… how do I enable Wake On Lan on my network enabled device, and how do I send a “wake up” call to my device?

In this article, I’ll try to cover as much as I can – since it can be a pretty hairy process to setup Wake On Lan. It very strongly depends on the hardware and software capabilities of your device. Even though I cannot every device on the planet, I sure will try to help you get started with Wake On Lan.

miniWOL – Tiny Wake On LAN tool for Windows and MacOS X

miniWOL – Tiny Wake On LAN tool for Windows and MacOS X
48

I had not used the good old Wake On LAN option in a while, until my brother-in-law (Jean-Pierre) was looking for something like that to wake up his NAS.

Most of the Wake On LAN applications I found for him were just too extensive, too complicated, or not free. I wanted just a simple menu in the System Tray (Windows: next to the clock, lower-left corner of your screen) or Menu-bar (MacOS X – top of your screen). Well, after quite a bit of searching I could not find anything suitable or to my liking and I decided to just write something myself.

Timing couldn’t be better, since I just wanted to implemented Wake On LAN in another application – ConnectMeNow (for MacOS X).
Reusing the code, making it suitable for Windows and MacOS X, and wrapping it in a small application was done relatively quickly.

This application has been tested under MacOS X 10.11 (El Capitan) and Windows 10 and it’s FREE.

MacOS X – How to take Screenshots and add Annotations

MacOS X – How to take Screenshots and add Annotations
2

I’ve been asked several times in the past, on how to take screenshot and annotate them afterwards, or how to do a so called “print-screen” to a printer for a hardcopy.

Some users, use screenshots for illustrating manuals, or articles for their website. Some use it to print error messages or odd things happening on their screen. And as with regular paper, some of us would like to annotate the images – add notes, comments, arrows, numbers or circle the important part of the image.

Annotating images is relatively easy, once you know where to find the tools to do this.

So in this article, for Mac OS X users: How to take screenshots, how to add annotations, and some additional related tips and tricks.

Arduino Programming for Beginners – Part 1: Setup

Arduino Programming for Beginners – Part 1: Setup
2

This is the first part of a series of articles I’ve written to get beginners started with Arduino Programming in the programming language C, which I’ve written with the intend to teach my 13 year old nephew Bram Knuit (and his 10 year old brother Max Knuit) to get started with the Arduino. After all, he wants to build a robot, but without some basic knowledge about programming, he won’t get very far ….

In this article we will show you how to get started with our little Arduino Programming course, by selecting an Arduino and setup the developer tools so we can actually try some of the examples that will be discussing in the next chapters.

Besides an introduction into the language C, the default language used for Arduino Programming, “Arduino Programming for Beginners” will also touch topics like how to setup an Arduino, get a developers environment running, and look at a few basic electronic parts which we connect to our Arduino. The lack of basic knowledge should hopefully not be a problem … so I’ll be trying to keep everyone in mind.

App Transport Security Exceptions fixed (iOS 9+, OS X 10.11+)

App Transport Security Exceptions fixed (iOS 9+, OS X 10.11+)
1

Since I’m always looking for the “best” and “easiest” way to develop applications cross platform (so far Lazarus Pascal is the winner), I decided to give Delphi 10 Seattle a try. After I recovered from a heart-attack from seeing the price, I decided to give AppMethod a try. Mind you that AppMethod is cheaper but still very expensive.

AppMethod is pretty slick (as is Delphi 10), and supports Windows (32/64 bit), Mac OS X (I’m guessing 32 bit), Android, and iOS (32 bit and 64 bit). Development is pretty easy and deployment of your app is also very easy.

The first test I did was reading a webpage (NZBGet), which worked great on all platforms, except on iOS 9, which threw a “The resource could not be loaded because the App Transport Security policy requires the use of a secure connection” exception.

I did some research on what caused this and finally found the answer and a few work-arounds – which might be practical for other development environments as well.

1 2 3 4 ... 6 7 8