Hello, im totally new to livecode and just wondering if someone could please tell me how to display the computers current date (specifically just the year) in a program.
regards-
some guy behind a monitor
Inserting the computers current year into a program
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 2
- Joined: Mon Nov 16, 2015 8:26 pm
Re: Inserting the computers current year into a program
Hi.
Welcome to LC.
Among the key native features of the language are "properties". One of these is "the date", and it comes in several flavors. Please look this up in the dictionary.
Once you have that, there are a couple of ways to extract the year. Put this in a button script:
Do you know what an "item" is? If not, you need to right away. See "the itemDelimiter" in the dictionary, and read about it in the user manual. You have your way forward.
Now read up on the "convert" command. What might you do with that?
Craig Newman
Welcome to LC.
Among the key native features of the language are "properties". One of these is "the date", and it comes in several flavors. Please look this up in the dictionary.
Once you have that, there are a couple of ways to extract the year. Put this in a button script:
Code: Select all
on mouseUp
answer the long date
end mouseUp
Now read up on the "convert" command. What might you do with that?
Craig Newman
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
Re: Inserting the computers current year into a program
After you've done the research Craig suggested, thy this.
Code: Select all
on mouseUp
put the long date into tDate
answer item 3 of tDate
end mouseUp
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
-
- Posts: 2
- Joined: Mon Nov 16, 2015 8:26 pm
Re: Inserting the computers current year into a program
Great! Thanks for the fast replies guys , they were really helpful.
Re: Inserting the computers current year into a program
Hi Darius,
1. welcome to the forum!
2. Please checke these stacks to learn more about the very basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html
Best
Klaus
1. welcome to the forum!

2. Please checke these stacks to learn more about the very basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html
Best
Klaus