قالب وردپرس درنا توس
Home / Apple / macos – How to use screen sharing if I don't know the remote Mac's IP address

macos – How to use screen sharing if I don't know the remote Mac's IP address



On the remote computer, save this following AppleScript code in a new Script Editor.App document (Script Editor.App is located here … / Applications / Utilities / Script Editor.app) as a "Stay Open" -program. Before saving this document as a program, make sure you enter your current external IP address and email address in the first two lines of the code.

To summarize what the AppleScript code does, it's easy … Every 15 minutes it checks your current external IP address against the IP address you enter in the first line of the code. If these two IP addresses are not the same, the script will continue to send a new email (to the email address you enter in the second line of the code) with the new updated external IP address.

So like opening another application in the Finder, the new app will double-click your newly created app.

  property ipAddress: "1
23.456.7.89" - Insert current external IP address (once only) property to Recipient: "whoever@gmail.com" - Email to get IP changed messages set IP to make shell script "curl ifconfig.co" - Retrieves external IP at idle set IP to make shell script "curl ifconfig.co" if IP is not equal to ipAddress then tell the application "Mail" add new email (create new outgoing message) set the content of newEmail to theIP put newEmail topic until "IP address has changed" tell newmail Make a new recipient with properties {address: toRecipient} send Finally tell Finally tell set ipAddress to IP end up return (15 * minutes) - Waiting 15 min. to check IP again quit idle


Source link