| View previous topic :: View next topic |
| Author |
Message |
Sei
Joined: 01 Sep 2007 Posts: 23 Location: UK
|
Posted: Sat Sep 01, 2007 16:23 Post subject: A script for Z-10 Multiscreens etc |
|
|
Hi Mark, thanks for the LCDTool, very nice job, been playing around with it since I picked up a set of Z-10's the other day, knocked up a script to display multiple screens using the buttons for navigation/context sensitive commands.
It's not finished but it's in good enough order I figured someone else might enjoy it.
Basic layout is:
Main screen:
Date, Time &weather forcast
Select number buttons to switch to different modes
Select 'display' button to toggle screen rotation (not yet implemented)
iTunes screen:
Artist & Rating
Track Name
Elapsed, Progress bar, Remaining
Select number buttons to rate current track (1-4 stars, yeah I know, can do 5 but will require splitting the ratings into two switchable blocks)
Select 'display' button to return to Main screen
Mail screen
New messages in inbox(s).
(scrolling new mail summery to be implemented)
(scrolling rss feed to be implemented)
Select number buttons to get new mail or open mail
Select 'display' button to return to Main screen
System screen
Select number buttons to
1 > CPU chart (not implemented yet)
2 > Top 3 apps by CPU usage
3 > disk stat
4 > uptime
Select 'display' button to return to Main screen
Console screen
Select number buttons to
1 > console log
2 > system log
3 > web server access log
4 > web server error log
Select 'display' button to return to Main screen
Requires font FrucadeSmall get it from here: http://pixelfonts.style-force.net/ install and relaunch LCDTool
SystemAppleScripts.plist has also been updated to strip single quotes from track data so it always displays (this will work with any script), file is included in the zip, From LCDTool go to the Help menu > Library. then press Apple+up to open the enclosing folder, SystemAppleScripts.plist should be visible. remove old, replace with new, then restart LCDTool.
Weather reports are provided by a clunky perl script called "getWeather.pl" this should be placed in /Library/Scripts/ you may need to make it executable. You will definitely need to visit Yahoo weather and edit in your own area code otherwise you'll just get my weather heh. the u=c bit at the end specifies temperature units, change c to f if you want Fahrenheit.
That's about it, code is commented if anyone wants to improve, add some features, enjoy.
Sei
Download: http://darndog.no-ip.com/LCDToolMultiScreen.zip |
|
| Back to top |
|
 |
Sei
Joined: 01 Sep 2007 Posts: 23 Location: UK
|
Posted: Mon Sep 03, 2007 3:32 Post subject: Take Five |
|
|
Paste the following snippets into the script to make the 'rate 4 stars' button act as a toggle between 4 & 5 stars.
Replace the Softkey4 part of the "// ITUNES SCREEN" section with the following:
| Code: | if (button == "Softkey4") {
if (rating == 80) { // already rated 4 stars so bump to five
window.application.runUserScript('rateFive');
mainText = "Current Track rated *****<br> ";
rating = window.application.runUserScript('getRating');
} else { // rate 4 stars
window.application.runUserScript('rateFour');
mainText = "Current Track rated ****-<br> ";
rating = window.application.runUserScript('getRating');
}
} |
Add this line to the "function init()" section:
| Code: | | window.application.registerUserScript('rateFive', 'tell application "iTunes" to set rating of current track to 100'); |
Noticed a small bug where while selecting the iTunes button on the main screen will launch iTunes, you get no display unless it's actually played something as it stalls trying to get the current track, will sort that and repost the file, meantime just give iTunes a nudge by pressing the play button. |
|
| Back to top |
|
 |
Sei
Joined: 01 Sep 2007 Posts: 23 Location: UK
|
Posted: Wed Sep 05, 2007 11:06 Post subject: Updated |
|
|
Updated to 0.2, same download link as above, screengrabs follow.
main screen
itunes screen
mail screen
scrolling cpu history
3 applications using most cpu
disk space usage
computer uptime & load warning
http (apache) log |
|
| Back to top |
|
 |
liyanage Site Admin

Joined: 22 May 2003 Posts: 1104 Location: Zurich, Switzerland
|
Posted: Wed Sep 05, 2007 14:15 Post subject: |
|
|
Holy Shit!
That looks awesome! This is exactly the kind of stuff I had in mind when I made LogitechLCDTool user-customizable... |
|
| Back to top |
|
 |
Sei
Joined: 01 Sep 2007 Posts: 23 Location: UK
|
Posted: Fri Sep 07, 2007 1:35 Post subject: |
|
|
| Cheers, there's a few more things that need adding/improving, you have no idea how long I've wanted an 'easy' to set up LCD panel for my Mac, almost bought a wireless digital photo frame to send info to, thanks to your software these speakers are way more useful. |
|
| Back to top |
|
 |
Sei
Joined: 01 Sep 2007 Posts: 23 Location: UK
|
Posted: Sat Sep 08, 2007 19:24 Post subject: |
|
|
Updated, Mail screen now rotates through unread messages.
 |
|
| Back to top |
|
 |
ecoenergy
Joined: 23 Aug 2007 Posts: 6
|
|
| Back to top |
|
 |
Sei
Joined: 01 Sep 2007 Posts: 23 Location: UK
|
Posted: Sun Sep 09, 2007 23:47 Post subject: |
|
|
| Should be back up, minor network problem, resolved. |
|
| Back to top |
|
 |
ecoenergy
Joined: 23 Aug 2007 Posts: 6
|
Posted: Mon Sep 10, 2007 0:14 Post subject: |
|
|
| Sei wrote: | | Should be back up, minor network problem, resolved. |
works great, thanks a lot Sei!
best regrads,
Martin
---
http://www.solarthermienator.com |
|
| Back to top |
|
 |
negatv
Joined: 24 Jan 2007 Posts: 14
|
Posted: Thu Sep 13, 2007 18:22 Post subject: |
|
|
| Looks awesome. |
|
| Back to top |
|
 |
bsgill
Joined: 04 Sep 2007 Posts: 7
|
Posted: Fri Sep 14, 2007 2:14 Post subject: |
|
|
| I downloaded the font file Frucade Small from the website and installed it; however, I haven't been able to see the text in the new LCD tool script. I get blank space, which doesn't copy into LCDtool too well. Anyone else have this trouble or have I just become Mac-incompetent? |
|
| Back to top |
|
 |
bsgill
Joined: 04 Sep 2007 Posts: 7
|
Posted: Fri Sep 14, 2007 2:21 Post subject: |
|
|
| Never mind, I am Mac-incompetent. Figured it out. |
|
| Back to top |
|
 |
bsgill
Joined: 04 Sep 2007 Posts: 7
|
Posted: Sat Sep 15, 2007 20:09 Post subject: |
|
|
I'm getting "Undefined" on the main screen instead of receiving weather data. I tried to refresh the display a few times but had no luck. Also, I tried to make the script executable after placing in the proper folder. I don't know a heck of a lot about scripts on Mac OS so I did what best I could figure out, which was adding the string "chmod a+rx ~/bin/perl". That may be completely wrong but if so, can anyone help me out in getting the weather data to work? Thanks in advance!
Oh and the rest of the new script...simply amazing. Thanks Sei! |
|
| Back to top |
|
 |
Sei
Joined: 01 Sep 2007 Posts: 23 Location: UK
|
Posted: Sat Sep 15, 2007 21:47 Post subject: |
|
|
Thanks for the feedback, Version 0.4 now available
0.4 modifications: (all files changed)
Mod to SystemAppleScripts.plist to fix some mail subjects.
A few features and timers are now user configurable through a preference section at the start of the code.
Optional Mail 'heads up' icon on main screen, check is every 10 secs, (configurable), icon disappears when there are no new messages.
Checks for updated version at startup, if available a message is pasted on main screen for 6 secs (configurable and only once per session), press any number key to download the update in your default browser.
CPU history can be always logged (optional, really, really low overheads if you turn it on)
Code Reorganised for easier reading/modification.
Better error handling when Yahoo/update servers are busy/unattainable.
Install notes contain (I hope) detailed instructions for modifying the weather script to your location.
// edit: some issue with autodisplay, hitting the display button gets it going, investigating.
// edit 2: moved the offending script to SystemAppleScripts. plist, no idea why it bawked on the first run but was fine after hitting display, for reference error log was: LogitechLCDTool[23505] Invalid script key getWeather |
|
| Back to top |
|
 |
ecoenergy
Joined: 23 Aug 2007 Posts: 6
|
Posted: Sun Sep 16, 2007 11:54 Post subject: |
|
|
| Sei wrote: | Thanks for the feedback, Version 0.4 now available  |
Hej Sei,
thanks for the nice Update! I tried to get the Script working, but I just get a black Screen. The Z-10 Buttons are working and the Script gehts the Informations from Mail ...
thanks for support,
Martin
---
http://www.solarthermienator.com |
|
| Back to top |
|
 |
|