What does aevtrrst mean?

I needed a command to restart my Mac (after displaying the “Are you sure.” dialog).

Google helped me find this:

That does exactly what I want it to do, but I dislike using a scripting term I don’t really understand.

I tried searching for an explanation of what aevtrrst means, but couldn’t find any.

IMy guess:
aevt = apple event
r = ?
rst = restart

Am I right? And what is the meaning of the r in the middle?

Model: MacBook Pro (13-inch, Mid-2009)
Browser: Safari 537.36
Operating System: Mac OS X (10.8)

The word itself has no meaning. Commands (events) does have an 8 char identifier instead of the normal 4 char identifier. So when an an event is send from and to other applications they will understand command. And I think that in this case the term rpc would be better. While the 8 char code doesn’t have a special meaning Apple has since system 7 been using obvious codes. aevt has no special meaning but is probably a Mac OS X defined event. The choice of rrst can be either that rest is an already 4 char code for restart (not the system) and they’ve chosen another code to avoid confusions.

Loginwindow is officially not a scriptable application but it uses the AppleEvent manager to listen to certain events from other applications like restart command when the installation application is finished (you can see that when you write the AppleEventLog to an file when starting the installer process). Also the open command from the command line as the Finder’s “open with…” commands uses AppleEvents («event GURLGURL» = open location) with or without having an dictionary translating this event into human readable code (AppleScript syntax). So those events (as classes and enumerators) are “invisible” to AppleScript and shouldn’t be used or at least avoided if possible. Raw event code is not part of AppleScript language which means the code can be doing something else overnight unlike AppleScript code. Necessity knows no law, just like the «class utf8», but if there are workarounds, I would definitely use it.

Maybe I haven’t helped you anything by finding the meaning of “aevt/rrts” event code. One thing is clear that the code is often an short code for an longer meaning but the word itself doesn’t have a meaning and can be randomly 4 characters (or 8 for events)

Actually your explanation was fine.

BTW, I originally tried this: tell application “Finder” restart

That worked, but it didn’t display the “Are you sure?” dialog.

Is there some way to tell the Finder to restart and display that dialog? (I mean without coding my own dialog box.)

As I was looking up the 'no ’ and 'yes ’ codes in the enumeration list for AppleScript inside the carbon framework but then I found also this:

and also aevt is an enumerated object:

it confirms that the command is indeed the correct command to show to restart dialog.

Thanks again!