It's not possible with AS, and I doubt it is with JS. Normally it's set by pointing to a time server.
I had seen Adobe scripting forum using xcopy dos command through Indesign vbscript.
So i think on windows it is possible through dos command and using this dos command with vbscript in indesign but i want same thing on Mac.
Is it possible through Shell script?
Can anybody suggest?
You might be able to do it using the shell command date, depending on the user's permissions.
But really, it's not something that scripts should be able to change.
Thanks Steven and sstanleyau,
Below is applescript working code.
tell application "Terminal" do script "systemsetup setdate mm:dd:yy" end tell
Now i want that applescript start terminal run terminal command and then quit terminal.
Please suggest on it.
1 person found this helpful
AppleScript has the command 'do shell script' so there is no need to use the terminal app… But I would add to shane's view on changing this setting? Im not going to try it time machine will probably go bananas…
Thanks Muppet Mark,
Can you please check below code and suggest me how can i set my old date back.
set oldDate to do shell script "systemsetup -getdate" do shell script "systemsetup setdate 03:03:10" --Do some stuff do shell script "systemsetup setdate " + oldDate
In above code last line not working. Please suggest correct code.
Thanks to all.
Problem solved now .
Here is code.
set oldDate to do shell script "date '+%m:%d:%y'" as string do shell script "systemsetup setdate 03:03:10" --Do some stuff do shell script ("systemsetup setdate " & oldDate)