Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-10 Thread Richard Gaskin
Peter Brett wrote: On 2015-03-07 16:33, Richard Gaskin wrote: Mark Wieder wrote: And now that I'm looking at it again, I don't think that's the proper format for the url command. It should be put url "file:///sys/class/power_supply/BAT0/status" into tStatus Oddly, I find that LC's file I/O

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-08 Thread Mark Wieder
Peter- Sunday, March 8, 2015, 1:43:17 AM, you wrote: >> Oddly, I find that LC's file I/O routines don't work with *NIX virtual >> file system elements. I can use cat in shell to get those values, but >> neither LC's open/read/close nor get url options for work me. > Ouch. Please file a bug rep

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-08 Thread Peter TB Brett
On 2015-03-07 16:33, Richard Gaskin wrote: Mark Wieder wrote: And now that I'm looking at it again, I don't think that's the proper format for the url command. It should be put url "file:///sys/class/power_supply/BAT0/status" into tStatus Oddly, I find that LC's file I/O routines don't work

RE: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Ralph DiMola
Richard- Saturday, March 7, 2015, 8:41:00 AM, you wrote: > "it" has made me nervous since HyperCard 1.0 . . . clever, but seems to > be looking for a way to blow off my foot . . . Same here. And "the result" makes me nervous as well. -- Ralph DiMola IT Director Evergreen Information Services

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Mark Wieder
Richard- Saturday, March 7, 2015, 8:42:28 AM, you wrote: > And Michael, another tempting opportunity for spending $ on a Linux > laptop is the latest from Barton's team, Dell's top-of-the-line > Precision M3800 portable workstation, with Ubuntu installed and ready to > go, weighing in at a surpr

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Mark Wieder
Michael- Saturday, March 7, 2015, 5:37:18 AM, you wrote: > I originally did this because I thought it would avoid name space > collisions. I thought that I would receive feedback if folks thought > it was a bad idea. As you can see, it is extra work and it is easy for > me to make a mistake.

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Mark Wieder
Richard- Saturday, March 7, 2015, 8:41:00 AM, you wrote: > "it" has made me nervous since HyperCard 1.0 . . . clever, but seems to > be looking for a way to blow off my foot . . . Same here. And "me" makes me nervous as well. -- -Mark Wieder ahsoftw...@gmail.com This communication may be u

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Richard Gaskin
Well done! Once I change this: constant kBatteryStatus1 = "/sys/class/power_supply/BAT0/status" ...to this: constant kBatteryStatus1 = "/sys/class/power_supply/BAT1/status" ...as noted earlier, this works a treat: returns "Battery" when unplugged, and "AC" when plugged in. On my desk

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Richard Gaskin
Peter M. Brigham wrote: > On 3/7/15 1:35 AM, Richard Gaskin wrote: >> FWIW I appreciate efforts to distinguish getters from setters >> by including "get" as part of a function name, but it becomes >> odd to read things like: >> >> get getPowerSource() >> >> Personally I believe that being a funct

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Richard Gaskin
Mark Wieder wrote: > Saturday, March 7, 2015, 5:55:06 AM, you wrote: > >> Both the constant declarations are identical -- the second should >> be for BAT1. You're competing with me for multiple postings with >> bugs, but I've still go you beat. :-) > > Ack! Good catch. > Although as far as I can

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Dr. Hawkins
On Sat, Mar 7, 2015 at 8:33 AM, Peter M. Brigham wrote: > Good point. I guess this never occurred to me because I never do "get …", > I always do "put … into varName". The "it" variable is somewhat ephemeral > if you're not careful. Even with an "ask …" I always follow it with a "put > it into va

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Peter M. Brigham
On Mar 7, 2015, at 11:12 AM, Richard Gaskin wrote: > Michael Doub wrote: > > > On 3/7/15 1:35 AM, Richard Gaskin wrote: > >> > >> What value is being added to the library user with "__"? > >> > > I originally did this because I thought it would avoid name space > > collisions. I thought that I

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Richard Gaskin
Mark Wieder wrote: > And now that I'm looking at it again, I don't think that's the proper > format for the url command. It should be > > put url "file:///sys/class/power_supply/BAT0/status" into tStatus Oddly, I find that LC's file I/O routines don't work with *NIX virtual file system elements

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Richard Gaskin
Michael Doub wrote: > On 3/7/15 1:35 AM, Richard Gaskin wrote: >> >> What value is being added to the library user with "__"? >> > I originally did this because I thought it would avoid name space > collisions. I thought that I would receive feedback if folks > thought it was a bad idea. As y

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Mark Wieder
Peter- Saturday, March 7, 2015, 5:55:06 AM, you wrote: > Both the constant declarations are identical -- the second should > be for BAT1. You're competing with me for multiple postings with > bugs, but I've still go you beat. :-) Ack! Good catch. Although as far as I can tell this would only a

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Peter M. Brigham
A couple of tiny points (I'm being a little obsessive here): On Mar 7, 2015, at 8:46 AM, Michael Doub wrote: > ok, a new day and another attempt. I hope we have it this time. ;-) > > on mouseup > put __getPowerSource() > end mouseup > > function __caseSwitch > /* __caseSwitch Misc > Synta

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Peter M. Brigham
Both the constant declarations are identical -- the second should be for BAT1. You're competing with me for multiple postings with bugs, but I've still go you beat. :-) -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Mar 7, 2015, at 8:46 AM, Michael Doub wrote:

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Peter M. Brigham
I dislike the double leading underscores, personally. Re namespace collisions: since you have built in inserting a handler into a specified object's script, perhaps you could just check that there is no handler in that script with the same name before allowing the insert, and if there is, give t

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Michael Doub
ok, a new day and another attempt. I hope we have it this time. ;-) on mouseup put __getPowerSource() end mouseup function __caseSwitch /* __caseSwitch Misc Syntax: __caseSwitch (var_to_Match,=,[=]... Examples: put caseSwitch(len(tZip),"5=zip","10=zip+4","*=not a zip code") i

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Michael Doub
I originally did this because I thought it would avoid name space collisions. I thought that I would receive feedback if folks thought it was a bad idea. As you can see, it is extra work and it is easy for me to make a mistake. I would be happy to remove them if folks would find it more us

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Michael Doub
Thanks Mark. I cut and pasted that last attempt and did not catch the caseSwitch. -= Mike On 3/7/15 1:27 AM, Mark Wieder wrote: -- Unix, thanks to Richard Gaskin, use-LC list constant kBatteryStatus0 = "/sys/class/power_supply/BAT0/status" constant kBatteryStatus1 = "/sy

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-07 Thread Peter M. Brigham
On Mar 6, 2015, at 11:48 PM, Richard Gaskin wrote: > Peter M. Brigham wrote: > > > So the acid test is what works. Can someone please test it on a > > unix machine and tell us what the format for the URL should be? > > And whether all the cases for the file contents are covered? > > OS X is a ce

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Richard Gaskin
Mark Wieder wrote: > If you're going to prefix the functions with "__" then you need to do > it everywhere. I think I missed something - why the underscores? I've seen a fairly common convention of using a single underscore for private settings and such, but never two. What value is being add

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Mark Wieder
Michael- Friday, March 6, 2015, 1:33:14 PM, you wrote: > Let hope this is the final kind makes me want to go get a linux > laptop. ;-) > return > caseSwitch(tStatus,"discharging=Battery","charging,unknown,full=AC","*=*") Getting very close. If you're going to prefix the functio

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Richard Gaskin
Peter M. Brigham wrote: > So the acid test is what works. Can someone please test it on a > unix machine and tell us what the format for the URL should be? > And whether all the cases for the file contents are covered? OS X is a certified Unix, so as far as bash is concerned what works there wi

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Peter M. Brigham
So the acid test is what works. Can someone please test it on a unix machine and tell us what the format for the URL should be? And whether all the cases for the file contents are covered? -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Mar 6, 2015, at 7:41 PM, Pe

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Peter Haworth
Hey Mark, Is that just for Linux? I almost always use "file:/Users/whatever" on OSX and it seems to work fine, although I've often wondered about the missing "//". On Fri, Mar 6, 2015 at 1:25 PM Mark Wieder wrote: > Michael Doub writes: > > > > > Really, 3 slashes? > > Yep. It's followed by

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Michael Doub
SMACK! ... I just got swatted for wanting to go get another toy. My wife does not agree with the philosophy: "He who has the most toys, wins!" and I have been told that I have enough. Anyway since we are trying to see what the battery is doing, Do you think that a virtual system would go to

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Richard Gaskin
Michael Doub wrote: > Let hope this is the final kind makes me want to go get a linux > laptop. ;-) Here ya' go: https://system76.com/laptops :) While you're waiting for your new Gazelle to arrive, remember that VirtualBox is just as free as Linux, and runs just about all flavors excell

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Michael Doub
Let hope this is the final kind makes me want to go get a linux laptop. ;-) on mouseup put __getPowerSource() end mouseup function __caseSwitch /* __caseSwitch Misc Syntax: __caseSwitch (var_to_Match,=,[=]... Examples: put caseSwitch(len(tZip),"5=zip","10=zip+4","*=not

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Mark Wieder
Michael Doub writes: > > Really, 3 slashes? Yep. It's followed by the URI. -- Mark Wieder ahsoftw...@gmail.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscr

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Michael Doub
Really, 3 slashes? -= Mike On 3/6/15 3:26 PM, Mark Wieder wrote: Michael Doub writes: if there is a folder "/sys/class/power_supply/BAT0" then put url "/sys/class/power_supply/BAT0/Status" into tStatus else if there is a folder "/sys/class/power_supply/BA

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Mark Wieder
Michael Doub writes: > if there is a folder "/sys/class/power_supply/BAT0" then > put url "/sys/class/power_supply/BAT0/Status" into tStatus > else if there is a folder "/sys/class/power_supply/BAT1" then > put url "/sys/class/power_supply/BAT1/Status

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Michael Doub
thanks Mark... take 2Once again paste into a button on a unix system. -= Mike on mouseup put __getPowerSource end mouseup function __caseSwitch /* __caseSwitch Misc Syntax: __caseSwitch (var_to_Match,=,[=]... Examples: put caseSwitch(len(tZip),"5=zip","10=zip+4","*=not

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Mark Wieder
Peter M. Brigham writes: > > So can a couple of Unix users out there test this part out? > > if there is a file "/sys/class/power_supply/BAT0" then > put url "/sys/class/power_supply/BAT0" into tStatus > else if there is a file "/sys/class/power_supply/BAT1" then >

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Michael Doub
and of coarse I screwed it up too. Peter, its catching. ;) Please place into a button and help us test this on unix. Thanks Mike on mouseup put __getpowerSource() end mouseup function __caseSwitch /* __caseSwitch Misc Syntax: __caseSwitch (var_to_Match,=,[=]... Exampl

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Michael Doub
I will make it even easier for you to help test ... Paste all this code into a button script. on mouseup put __powerSource() end mouseup function __caseSwitch /* __caseSwitch Misc Syntax: __caseSwitch (var_to_Match,=,[=]... Examples: put caseSwitch(len(tZip),"5=zip","10=

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Peter M. Brigham
So can a couple of Unix users out there test this part out? if there is a file "/sys/class/power_supply/BAT0" then put url "/sys/class/power_supply/BAT0" into tStatus else if there is a file "/sys/class/power_supply/BAT1" then put url "/sys/class/power_sup

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-06 Thread Peter M. Brigham
On Mar 5, 2015, at 2:13 PM, Mark Wieder wrote: > Peter Brigham writes: > >> >> Double-check me on this. >> > > No, you're still checking the enclosing directory instead of the file. Grab > "/sys/class/power_supply/BAT0/status" > and the same for BAT1. Right, I realized that last yesterday be

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-05 Thread Mark Wieder
Peter Brigham writes: > > Double-check me on this. > No, you're still checking the enclosing directory instead of the file. Grab "/sys/class/power_supply/BAT0/status" and the same for BAT1. ...and the caseSwitch function confuses me a bit: I don't think the 'if tMatch = "*"' part is going to

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-05 Thread Peter Brigham
So the Unix case should be: if there is a file "/sys/class/power_supply/BAT0/" then put url "/sys/class/power_supply/BAT0/" into tStatus else if is a file "/sys/class/power_supply/BAT1/" then put url "/sys/class/power_supply/BAT1/" into tStatus el

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-05 Thread Mark Wieder
Peter- Wednesday, March 4, 2015, 5:10:53 AM, you wrote: >> and what I see on my Thinkpad running linux Mint 17 is status returns one of >> three states: >> >> Unknown if the laptop is plugged into the AC adapter >> Discharging if running off the battery power >> Charging if it's (wait for it) ch

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-04 Thread Peter M. Brigham
On Mar 3, 2015, at 11:17 PM, Mark Wieder wrote: > Peter- > > Actually, BAT0 is a directory, so you want > >put url "/sys/class/power_supply/BAT0/status" into tStatus > > and what I see on my Thinkpad running linux Mint 17 is status returns one of > three states: > > Unknown if the lap

Re: Because LC can't do two things at once.

2015-03-04 Thread Bob Sneidar
If I ever see you at a conference, I owe you a steak dinner for that one. (Or a really great salad or something if you are a veg-x). Bob S On Mar 3, 2015, at 11:43 , J. Landman Gay mailto:jac...@hyperactivesw.com>> wrote: MetaCard beat you to it: hideConsoleWindows -- Jacqueline Landman Gay

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-04 Thread Bob Sneidar
I thought I was the only one who did this. :-) Bob S On Mar 3, 2015, at 14:32 , Peter M. Brigham mailto:pmb...@gmail.com>> wrote: Sigh. Some typos in the handler I sent -- I was changing variable names and didn't change everything. Here is the (hopefully) correct and testable handler. It nev

Re: Because LC can't do two things at once.

2015-03-04 Thread Bob Sneidar
Oooh… this gives me a new idea for a Butchery app… Bob S > On Mar 3, 2015, at 21:04 , Mark Wieder wrote: > > Jacque- > > Tuesday, March 3, 2015, 11:43:36 AM, you wrote: > >> MetaCard beat you to it: hideConsoleWindows > > > My dyslexic eyes read that as 'MeatCard' > > -- > -Mark Wieder

Re: Because LC can't do two things at once.

2015-03-03 Thread J. Landman Gay
On March 3, 2015 11:04:43 PM CST, Mark Wieder wrote: >Jacque- > >Tuesday, March 3, 2015, 11:43:36 AM, you wrote: > >> MetaCard beat you to it: hideConsoleWindows > > >My dyslexic eyes read that as 'MeatCard' Call if what you want, but the real reason is that both of us are getting to be a less c

Re: Because LC can't do two things at once.

2015-03-03 Thread Mark Wieder
Jacque- Tuesday, March 3, 2015, 11:43:36 AM, you wrote: > MetaCard beat you to it: hideConsoleWindows My dyslexic eyes read that as 'MeatCard' -- -Mark Wieder ahsoftw...@gmail.com This communication may be unlawfully collected and stored by the National Security Agency (NSA) in secret. The

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-03 Thread Mark Wieder
Peter- Actually, BAT0 is a directory, so you want put url "/sys/class/power_supply/BAT0/status" into tStatus and what I see on my Thinkpad running linux Mint 17 is status returns one of three states: Unknown if the laptop is plugged into the AC adapter Discharging if running off the b

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-03 Thread Peter M. Brigham
on 3/3/15, I wrote: > OK, as usual, I find some tweaks *after* I hit the send button. I changed > caseSwitch() so it handles the case of an empty tCheckValue, allowing > getPowerSource() to report "no battery" if getting the URL returns empty. > The expansion of caseSwitch() is useful in and o

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-03 Thread Peter M. Brigham
OK, as usual, I find some tweaks *after* I hit the send button. I changed caseSwitch() so it handles the case of an empty tCheckValue, allowing getPowerSource() to report "no battery" if getting the URL returns empty. The expansion of caseSwitch() is useful in and of itself…. -- Peter Peter M

Re: Because LC can't do two things at once.

2015-03-03 Thread J. Landman Gay
On 3/3/2015 1:32 PM, Bob Sneidar wrote: Wouldn’t hurt for RunRev to add an argument to hide the Microsoft command window when shelling out. Looks ominous to an end user when a command window pops up then disappears with nothing to show for it. MetaCard beat you to it: hideConsoleWindows -- Jac

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-03 Thread Peter M. Brigham
Sorry, I left out the "word 1" part. The Unix case should read: put url "/sys/class/power_supply/BAT0/" into tStatus if tSource = empty then put url "/sys/class/power_supply/BAT1/" into tStatus put word 1 of tStatus into tStatus return caseSwitch(tStatus,"disc

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-03 Thread Peter M. Brigham
Assuming that when you saw "full" that meant AC connected but fully charged, here is what I have. Probably should be tested on all 3 platforms before letting it fly as a finished utility. Works a peach on the Mac. function getPowerSource -- returns the current power source for a laptop --

Re: Because LC can't do two things at once.

2015-03-03 Thread Bob Sneidar
Wouldn’t hurt for RunRev to add an argument to hide the Microsoft command window when shelling out. Looks ominous to an end user when a command window pops up then disappears with nothing to show for it. Bob S On Mar 2, 2015, at 07:20 , miked...@gmail.com wrote: It

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-03 Thread Richard Gaskin
Peter M. Brigham wrote: > So it looks from your links that I should use "/sys/class/power_supply > /BAT0/" for the URL on Unix, and check for "charging" or > "discharging" as the first word?? ...or "full", as I saw last night while testing this. So far I'm only seeing one-word values, so using "

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-03 Thread Peter M. Brigham
So it looks from your links that I should use "/sys/class/power_supply/BAT0/" for the URL on Unix, and check for "charging" or "discharging" as the first word?? -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Mar 2, 2015, at 2:18 PM, Richard Gaskin wrote: > Peter

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-02 Thread Richard Gaskin
Peter Brigham wrote: > What gets returned in >get URL "/proc/acpi/battery/BAT1/state" on Unix? > If you give me a sample to work with I will finish the handler and > post it. Further reading shows that path deprecated on many modern systems, suggesting the /sys path instead: /sys/class/p

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-02 Thread Peter Brigham
What gets returned in get URL "/proc/acpi/battery/BAT1/state" on Unix? If you give me a sample to work with I will finish the handler and post it. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Mon, Mar 2, 2015 at 11:15 AM, Richard Gaskin wrote: > Michael Dou

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-02 Thread Michael Doub
Looking around in /proc I found no acpi on the Pi. -= Mike On 3/2/15 10:30 AM, Richard Gaskin wrote: Peter M. Brigham wrote: > On Mar 1, 2015, at 3:16 PM, Richard Gaskin wrote: >> Thanks to the beautiful simplicity of the Linux /proc directory >> I was able to find: >> >>cat /proc/acpi/b

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-02 Thread Richard Gaskin
Michael Doub wrote: Looking around in /proc I found no acpi on the Pi. Thanks for checking, Michael. That would make sense, because AFAIK the Pi has no Advanced Configuration and Power Interface in its chip set, and hence the absence of that key in /proc would accurately reflect a non-discha

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-02 Thread Richard Gaskin
Peter M. Brigham wrote: > On Mar 1, 2015, at 3:16 PM, Richard Gaskin wrote: >> Thanks to the beautiful simplicity of the Linux /proc directory >> I was able to find: >> >>cat /proc/acpi/battery/BAT1/state >> >> The "charging state" field there will contain "charging" or >> "discharging". > >

Re: Because LC can't do two things at once.

2015-03-02 Thread mikedoub
It will be added when the linux part is sorted out. :) Mike   Original Message   From: Mike Kerner Sent: Monday, March 2, 2015 9:35 AM To: How to use LiveCode Reply To: How to use LiveCode Subject: Re: Because LC can't do two things at once. that doesn't suck and ought to

Re: Because LC can't do two things at once.

2015-03-02 Thread Mike Kerner
that doesn't suck and ought to be in the masterLibrary, or whatever it's called. On Sun, Mar 1, 2015 at 1:04 PM, Peter M. Brigham wrote: > Just closing the loop on this one (the power source of a laptop). (Calling > Richard Gaskin re the Linux case...) > > -- Peter > > Peter M. Brigham > pmb...@

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-01 Thread Michael Doub
I don't know if this helps since the only linux system i have is a raspberryPi, but I get a file not found message when typing cat /proc/acpi/battery/BAT1/state in a terminal window. -= Mike On 3/1/15 8:01 PM, Peter M. Brigham wrote: On Mar 1, 2015, at 3:16 PM, Richard Gaskin wrote: Peter

Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-01 Thread Peter M. Brigham
On Mar 1, 2015, at 3:16 PM, Richard Gaskin wrote: > Peter M. Brigham wrote: > > > Just closing the loop on this one (the power source of a laptop). > > (Calling Richard Gaskin re the Linux case...) > > Thanks, Peter. > > I'd provided what I think might work some time ago, lost in the long threa

Power Status (was Re: Because LC can't do two things at once.)

2015-03-01 Thread Richard Gaskin
Peter M. Brigham wrote: > Just closing the loop on this one (the power source of a laptop). > (Calling Richard Gaskin re the Linux case...) Thanks, Peter. I'd provided what I think might work some time ago, lost in the long thread as it's run across many topics (hence my taking the liberty of

Re: Because LC can't do two things at once.

2015-03-01 Thread Peter M. Brigham
Just closing the loop on this one (the power source of a laptop). (Calling Richard Gaskin re the Linux case...) -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig - function getPowerSource -- returns the current power source for a laptop --"AC" or "Bat

Re: Because LC can't do two things at once.

2015-02-23 Thread Bob Sneidar
I believe also, the contents are uneditable. Bob S > On Feb 20, 2015, at 06:31 , Dr. Hawkins wrote: > > On Thu, Feb 19, 2015 at 7:36 PM, kee nethery wrote: > >> What is PDF/A? >> >> It’s a TLA I’m unfamiliar with. >> > > A PDF variant. http://en.wikipedia.org/?title=PDF/A > > I think t

Re: Because LC can't do two things at once.

2015-02-23 Thread Bob Sneidar
Okay so two commands you can use: shell("WMIC Path Win32_Battery GetAvailability”) will tell you if the battery is charging or not, and I suspect if you are able to remove the battery, it will give you something else. shell("WMIC Path Win32_Battery EstimatedChargeRemaining”) will give you 99 i

Re: Because LC can't do two things at once.

2015-02-23 Thread Bob Sneidar
It appears that when the battery is fully recharged, the Availability is still 2, but the BatteryRechargeTime becomes empty instead of a number. Will that do it for you? Bob S On Feb 23, 2015, at 09:08 , Bob Sneidar mailto:bobsnei...@iotecdigital.com>> wrote: Okay I think I have found a way

Re: Because LC can't do two things at once.

2015-02-23 Thread Bob Sneidar
Okay I think I have found a way to get the battery status. I checked it on my VM of Windows 7. Your results may vary. Try shell("WMIC Path Win32_Battery Get Availability”) Line 3 will contain 2 if the battery is charging, 3 if running on battery, and I am going to say 1 if the battery is fully

Re: Because LC can't do two things at once.

2015-02-23 Thread Bob Sneidar
Also found this but it requires something be installed: http://www.nirsoft.net/utils/battery_information_view.html Bob S On Feb 23, 2015, at 07:53 , Bob Sneidar mailto:bobsnei...@iotecdigital.com>> wrote: I found this: http://www.nextofwindows.com/find-out-how-healthy-your-battery-is-on-your

Re: Because LC can't do two things at once.

2015-02-23 Thread Bob Sneidar
I found this: http://www.nextofwindows.com/find-out-how-healthy-your-battery-is-on-your-windows-7-laptop/ Bob S On Feb 20, 2015, at 23:59 , Richard Gaskin mailto:ambassa...@fourthworld.com>> wrote: Peter M. Brigham wrote: Just out of curiosity, how *would* you do this via shell call or the e

Re: Because LC can't do two things at once.

2015-02-23 Thread Bob Sneidar
Keep in mind that a battery that is on the way out will almost always report charging. Bob S > On Feb 20, 2015, at 23:59 , Richard Gaskin wrote: > > Peter M. Brigham wrote: > >> Just out of curiosity, how *would* you do this via shell call or >> the equivalent on a Windows laptop? > > Good

Re: Because LC can't do two things at once.

2015-02-23 Thread Kay C Lan
On Sun, Feb 22, 2015 at 11:05 PM, Martin Koob wrote: > I google something like 'regex extract > between two single quotes' then browse the results and try out the regex > statements I find on my source text. I usually find something that works > and learn a little more regex syntax along the way

Re: Because LC can't do two things at once.

2015-02-22 Thread Peter Haworth
Whoops, misspelled Thierry's name, should be Douez On Sun Feb 22 2015 at 12:43:28 PM Peter Haworth wrote: > Just discovered that the King of regex/Livecode, Thierry Doux, provided an > update to the PCRE library used by LC in version 6.5.0 which included many > new features including more Unicod

Re: Because LC can't do two things at once.

2015-02-22 Thread Peter Haworth
Just discovered that the King of regex/Livecode, Thierry Doux, provided an update to the PCRE library used by LC in version 6.5.0 which included many new features including more Unicode options than I outlined earlier. It updated the PCRE library from 6.7 to 8.3 which sounds like a huge upgrade an

Re: Because LC can't do two things at once.

2015-02-22 Thread Bob Sneidar
I have stated before that if you only need to do two things at once, and not many, you can simply create a standalone app that you can send messages to (with Windows you would probably need socket communications) and then that app would handle the process and return whatever data you needed in a

Re: Because LC can't do two things at once.

2015-02-22 Thread Peter Haworth
Hi Peter, The text you referred to describes the Javascript version of regex whereas Livecode uses the PCRE library. You can search for unicode characters in a regex using the \p, \P, or \X character classes, but the library has to be compiled to include the PCRE regex unicode libraries (I think) f

Re: Because LC can't do two things at once.

2015-02-22 Thread Peter M. Brigham
Buried in that list (see below) is an item noting that even the JavaScript version of regex lacks Unicode support. Does this mean that the LC version of regex will soon no longer work? Is this being addressed in Edinburgh? Or am I misinterpreting the situation? -- Peter Peter M. Brigham pmb...

Re: Because LC can't do two things at once.

2015-02-22 Thread Dr. Hawkins
On Sun, Feb 22, 2015 at 7:09 AM, Martin Koob wrote: > I have found another one that I found very helpful to get a basic > understanding of regex. > I actually have a copy of O'Riley's book on it somewhere. And another one on csh or tcsh or both. One is in print, the other on a cd. -- Dr. Ri

Re: Because LC can't do two things at once.

2015-02-22 Thread Michael Doub
Thanks for pointing that out Kay. I was curious to understand the differences and I found the following which might be of interest to folks. I cut it from http://www.regular-expressions.info/javascript.html . As a casual regex user I have never had a problem, but your point is still very va

Re: Because LC can't do two things at once.

2015-02-22 Thread Kay C Lan
On Sun, Feb 22, 2015 at 5:59 AM, Michael Doub wrote: > > http://www.regular-expressions.info/charclasssubtract.html -- great > tutorials and lots of examples > https://regex101.com -- my favorite testing engine, I love the way it > explains what is actually going on > http://www.regexr.com --

Re: Because LC can't do two things at once.

2015-02-22 Thread Martin Koob
Thanks for the sites Michael. I have found another one that I found very helpful to get a basic understanding of regex. http://regexone.com Martin -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Because-LC-can-t-do-two-things-at-once-tp4689071p4689147.html Se

Re: Because LC can't do two things at once.

2015-02-22 Thread Martin Koob
I don't speak regex myself, I am more like a tourist in Regexia and using google as my tourist phrase book. I google something like 'regex extract between two single quotes' then browse the results and try out the regex statements I find on my source text. I usually find something that works and

Re: Because LC can't do two things at once.

2015-02-21 Thread Michael Doub
Here are three really good web sites that can help with regexp. I don't consider myself an expert by any means but I feel like I am now getting the hang of it. I give the credit to the creators of these sites. Such a valuable asset. -= Mike http://www.regular-expressions.info/charclasss

Re: Because LC can't do two things at once.

2015-02-21 Thread Peter Haworth
I like what you said about "not speaking Regex". I think that's the biggest problem people have with Regex: it's a language and if you don't know the syntax rules of any language, it doesn't make sense. Good analogy. Here's the regex for extracting what you want from the Mac output: '(\w*) Tra

Re: Because LC can't do two things at once.

2015-02-21 Thread Peter M. Brigham
On Feb 21, 2015, at 2:59 AM, Richard Gaskin wrote: > Peter M. Brigham wrote: > >> Just out of curiosity, how *would* you do this via shell call or >> the equivalent on a Windows laptop? > > Good question. > > Thanks to the beautiful simplicity of the Linux /proc directory I was able to > find:

Re: Because LC can't do two things at once.

2015-02-21 Thread Richard Gaskin
Peter M. Brigham wrote: Just out of curiosity, how *would* you do this via shell call or the equivalent on a Windows laptop? Good question. Thanks to the beautiful simplicity of the Linux /proc directory I was able to find: cat /proc/acpi/battery/BAT1/state The "charging state" field th

Re: Because LC can't do two things at once.

2015-02-20 Thread Andrew Kluthe
I've been using many of the parallel features in .NET recently. I've been pretty impressed with how easy it is to get the hang of. https://msdn.microsoft.com/en-us/library/dd460713%28v=vs.110%29.aspx Node.js at its core uses an event loop to provide async (not quite real parallel processing, how

Re: Because LC can't do two things at once.

2015-02-20 Thread Peter M. Brigham
Just out of curiosity, how *would* you do this via shell call or the equivalent on a Windows laptop? -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Feb 20, 2015, at 11:19 AM, Martin Koob wrote: > Hi Richard > > I noticed in your bug report was for Mac so till th

Re: Because LC can't do two things at once.

2015-02-20 Thread Martin Koob
Hi Richard I noticed in your bug report was for Mac so till that enhancement gets implemented you could use this. function powerStatus put shell ("pmset -g batt") into tPowerStatus put matchtext(tPowerStatus, "'([^']*)",tPowerSource) into tSuccess return tPowerSource end powerStatus Not

Re: Because LC can't do two things at once.

2015-02-20 Thread Dr. Hawkins
On Fri, Feb 20, 2015 at 6:43 AM, Mike Kerner wrote: > So you're mostly focused on desktop development, correct? Primarily, and specifically the generation of pdf forms. I'll add an app version, but it would be for manipulating/viewing the data; in certainly wouldn't be a replacement. I'm also

Re: Because LC can't do two things at once.

2015-02-20 Thread Mike Kerner
So you're mostly focused on desktop development, correct? On Fri, Feb 20, 2015 at 9:31 AM, Dr. Hawkins wrote: > On Thu, Feb 19, 2015 at 7:36 PM, kee nethery wrote: > > > What is PDF/A? > > > > It’s a TLA I’m unfamiliar with. > > > > A PDF variant. http://en.wikipedia.org/?title=PDF/A > > I thi

Re: Because LC can't do two things at once.

2015-02-20 Thread Dr. Hawkins
On Thu, Feb 19, 2015 at 7:36 PM, kee nethery wrote: > What is PDF/A? > > It’s a TLA I’m unfamiliar with. > A PDF variant. http://en.wikipedia.org/?title=PDF/A I think the biggest thing is embedding fonts. This is for court use, so missing fonts or other pieces decades down the road is an issu

Re: Because LC can't do two things at once.

2015-02-19 Thread kee nethery
What is PDF/A? It’s a TLA I’m unfamiliar with. Kee > On Feb 19, 2015, at 6:21 PM, Dr. Hawkins wrote: > > Actually, put in PDF/A for #3--without it, I will have no choice but to use > another platform, as it will be mandatory for ECF court filing in a couple > of years. > ___

Re: Because LC can't do two things at once.

2015-02-19 Thread Dr. Hawkins
On Thu, Feb 19, 2015 at 5:48 PM, Dr. Hawkins wrote: > On Thu, Feb 19, 2015 at 3:05 PM, Mike Kerner > wrote: > >> Wow, that's surprising. So what does your list look like - say for the >> top >> 5? Why is multithreading so important to you? >> > > Secure Postgres support > Multithreading or sla

Re: Because LC can't do two things at once.

2015-02-19 Thread Dr. Hawkins
On Thu, Feb 19, 2015 at 3:05 PM, Mike Kerner wrote: > Wow, that's surprising. So what does your list look like - say for the top > 5? Why is multithreading so important to you? > Secure Postgres support Multithreading or slave processes Fixing the (*#^%*(m show-stopping bugs in the IDE (shado

Re: Because LC can't do two things at once.

2015-02-19 Thread Mike Kerner
Wow, that's surprising. So what does your list look like - say for the top 5? Why is multithreading so important to you? On Thu, Feb 19, 2015 at 5:25 PM, Dr. Hawkins wrote: > On Thu, Feb 19, 2015 at 10:32 AM, Mike Kerner > wrote: > > > If you were prioritizing features for LC, would this be o

  1   2   >