Re: Setting the cursor
Hello Jim, See in dictionary : xHot and yHot properties Bon souvenir de Paris René Le 2 janv. 2012 à 08:23, James Hurley a écrit : How do I set the loc of the cursor? By script, of course. Jim ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Installer Maker 33% OFF
Mark, just for your information: The code has expired. At least that´s what Plimus is saying. Regards, Matthias Am 02.01.2012 um 11:41 schrieb Mark Schonewille: Hi everyone, First of all, a happy new year to everyone reading this list. I wish you all a productive year with very few bugs! Today is the last day to purchase a license for Installer Maker Plugin with a 33% discount. Go to http://qery.us/za and use the Plimus button to make the purchase. Use the coupon code 33OFF. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Become our partner in sales http://qery.us/1bq Start selling Color Converter today. 20% commission! ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
OFF TOPIC virtualize windows on mac
Hello, starting with an old Macbook would like to know your expert opinion about what is the best virtualization solution to run Windows on Mac, from a developer point of view. Thanks and Happy New Year -- Jose ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: OFF TOPIC virtualize windows on mac
On Mon, Jan 2, 2012 at 8:45 AM, jva...@1234web.net wrote: Hello, starting with an old Macbook would like to know your expert opinion about what is the best virtualization solution to run Windows on Mac, from a developer point of view. Thanks and Happy New Year -- Jose If the Mac is PPC rather than intel, then I wouldn't recommend virtialization as it would be 'emulation', which is unproductively slow. You would be better off buying a low-end PC. However, if the Mac has an intel cpu, then start with the FREE Virtualbox, and see if it meets your needs. If not, VMware Fusion is very good, and also Parallels Desktop for Mac. If intel, and your OS is at least Leopard, SnowLeo, or Lion, you could install Windows using BootCamp (in Utililies). This would allow you to boot natively in Windows, and would be as close to the real thing as you can get while using Apple hardware. https://www.virtualbox.org/wiki/Downloads https://www.vmware.com/tryvmware/ http://www.parallels.com/download/ http://support.apple.com/kb/HT3986 ˜Roger ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: [OT] 2012
On Jan 2, 2012, at 1:56 AM, René Micout wrote: Hello camarades, All my best wishes for this new year. Tous mes meilleurs vœux pour cette nouvelle année 2012. Same to you, René! Here's hoping that 2012 is a lot better than 2011 was! (Mayan predictions not withstanding…) ;-) Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Setting the cursor
On Jan 2, 2012, at 1:23 AM, James Hurley wrote: How do I set the loc of the cursor? By script, of course. set the screenMouseLoc to location :D Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: OFF TOPIC virtualize windows on mac
If not, VMware Fusion is very good, and also Parallels Desktop for Mac. Just FYI, I've read a ton of comparisons on these two, and own both, and over the last year or two, Parallels has always come out ahead of VMWare in the published reviews. I can back that up with personal experience, too. That said, I wouldn't be surprised if VMWare jumps ahead of Parallels this year and the two get into a leap frog contest, but either one is great for virtualization, IMHO. Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Visible text calculation
Has anyone figured out how to convert pageHeights into the equivalent character offsets of a field with variable lineHeights (e.g. char 1 to 174, char 175 to 315, char 316 to 420)? Put another way, using pageHeights to print a scrolling field, list the first and last chars of each printed page. Reason is to implement text flow (imagine virtual printing). Someone must have been down this brain-befuddling route! Can you share the wisdom? Hugh Senior FLCo ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
iOS Browser Print
Happy New Year! Question... is it possible to print a iOS Browser Control? For example, you have a web page loaded up in a browser control in your iPad project. Can I add a Print button so the user can print the web page? Thanks! -Dan ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Scripting a text to binary digits converter
I have seen a number of sites that use a text to binary digits converter for simple encryption. Such that this is my text would be written as 01110100011011101001011100110010011010010111001100100110110100010010011101000110010101110100 What is the simplest way of doing this in livecode? Could something like this also be done for photos? Or better I suppose for photos would be conversion to ascii text. Thanks in advance for ideas and pointers. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Printing from iOS
Yes, I have... It's a little bit of a pain, but it's working quite well! You have to use the rrehardcopy external. It's provided in the LiveCodeSDK-R10 package (http://www.runrev.com/developers/documentation/externals-sdk/). Include it in your iOS standalone and it will popup the standard choose printer panel. What you do is first print whatever you want the user to print to a pdf file. Then call this: on printIt tPDFFile,tPrintJob -- tPDFFile = the path to the pdf file -- specialFolderPath(Documents) /printTemp.pdf for example --tPrintJob = the name of the print job as seen by the user if not rreHardcopyIsAvailable() then answer Printing is not available at this time. titled Whoops exit to top end if rreHardcopyPrintPDF tPDFFile, tPrintJob if the result = printing cancelled then exit to top end if end printIt Hope that helps! -Dan On Jan 2, 2012, at 10:00 AM, use-livecode-requ...@lists.runrev.com wrote: Date: Sun, 1 Jan 2012 22:20:51 -0800 From: gwendalw...@cox.net To: use-livecode@lists.runrev.com Subject: Printing from iOS Message-ID: 20120102012051.CGW4D.507523.imail@fed1rmwml213 Content-Type: text/plain; charset=utf-8 Has anyone found or created a way to achieve print card from iOS on an iPhone or iPad to an Air Print enabled wireless printer? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Scripting a text to binary digits converter
The scripts below will convert between ASCII and Binary Use a repeat on each char to convert the whole sentence. Put the whole thing in a button to test how it works and then rewrite the code without using ask and answer. -=JB=- ASCII-Bin Convert Convert between ASCII-Binary written by John Balgenorth - 7/31/08 on mouseUp answer convert with ASCII-Bin or Bin-ASCII if it = ASCII-Bin then convABin if it = Bin-ASCII then convBinA end mouseUp on convABin ask convert ASCII to Binary if it = empty or the result = cancel then exit to top put it into charConv put chartonum(charConv) into theNum put baseconvert(theNum,10,2) --into fld id 1010 end convABin on convBinA ask convert Binary to ASCII if it = empty or the result = cancel then exit to top put it into theNum put baseconvert(theNum,2,10) into charConv put numtochar(charConv) --into fld id 1010 end convBinA +++ On Jan 2, 2012, at 10:10 AM, Bryan McCormick wrote: I have seen a number of sites that use a text to binary digits converter for simple encryption. Such that this is my text would be written as 01110100011011101001011100110010011010010111001100100110110100010010011101000110010101110100 What is the simplest way of doing this in livecode? Could something like this also be done for photos? Or better I suppose for photos would be conversion to ascii text. Thanks in advance for ideas and pointers. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode On Jan 2, 2012, at 10:10 AM, Bryan McCormick wrote: I have seen a number of sites that use a text to binary digits converter for simple encryption. Such that this is my text would be written as 01110100011011101001011100110010011010010111001100100110110100010010011101000110010101110100 What is the simplest way of doing this in livecode? Could something like this also be done for photos? Or better I suppose for photos would be conversion to ascii text. Thanks in advance for ideas and pointers. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Listen for messages in FrontScripts
On Sun, Jan 1, 2012 at 8:38 PM, Mark Wieder mwie...@ahsoftware.net wrote: Todd- Sunday, January 1, 2012, 4:40:47 PM, you wrote: Why would you want to do this? The only time I issue a dispatch without a target is in a behavior script, and in that case the message is delivered to the parent object, which is a very neat trick, and I think is the equivalent of ruby's yield command. Well mostly I am just trying to understand how things things work. I * thought* that messages released from front scripts might rain down on top most stack. This is not true, clearly. I was using metaphor in my own head of messages raining down on your stacks. I don't like this metaphor any more. I don't think it fits. If I am getting this right now. All messages have an explicit initial target, which is the point at which they enter the message path. A frontscipt is inserted *before* that target ( and all targets ). If it doesn't handle the message or if it passes it, that message continues on to its original target and then down through the normal message path. LiveCode out of the box doesn't have Event Listerners that can hear events from anywhere. Objects can only hear messages that are directed at them or have been passed down through the message path. Part of what got me into this was trying to create Event Listeners. Trevor does this in GLX and calls it broadcasting. I have some Flex and JavaScript experience which leads me to favor calling it Event Listeners. This turns out to be startling easy with LiveCode. Its less than 50 lines of code. Maybe 55 lines if you include the lines needed to load the frontscript. Objects can Listen for events and Object can Send events. Neither side needs to know anything about the other. I chose to do it with a FrontScript, because I felt it would be faster then using a library at the end of the message path. Todd ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Scripting a text to binary digits converter
That looks like a better way to go because it will also pad the binary with the proper amount of zeros. -=JB=- On Jan 2, 2012, at 11:14 AM, gpb01 wrote: Bryan McCormick wrote I have seen a number of sites that use a text to binary digits converter for simple encryption. Such that this is my text would be written as 01110100011011101001011100110010011010010111001100100110110100010010011101000110010101110100 ... You can easily use the *binaryDecode()* and *binaryEncode()* functions ... .. see the dictionary Guglielmo -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Scripting-a-text-to-binary-digits-converter-tp4254072p4254238.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Scripting a text to binary digits converter
JB, Guglielmo This appears to work for my purposes and is pretty speedy. See anything that might break? --- function convertTextToBinary varText repeat with n = 1 to the number of chars of varText put chartonum(char n of varText) into theNum if theNum =64 and theNum = 127 then put 0baseConvert(theNum,10,2) after tConverted else if theNum =64 then put 00baseConvert(theNum,10,2) after tConverted else put baseConvert(theNum,10,2) after tConverted end if end repeat return tConverted end convertTextToBinary ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Scripting a text to binary digits converter
When I did a quick read of binaryEncode() I was thinking it said you could enter the number of chars you want to convert which would eliminate the need for a repeat structure but I did not try it and could be wrong. -=JB=- On Jan 2, 2012, at 12:23 PM, Bryan McCormick wrote: JB, Guglielmo This appears to work for my purposes and is pretty speedy. See anything that might break? --- function convertTextToBinary varText repeat with n = 1 to the number of chars of varText put chartonum(char n of varText) into theNum if theNum =64 and theNum = 127 then put 0baseConvert(theNum,10,2) after tConverted else if theNum =64 then put 00baseConvert(theNum,10,2) after tConverted else put baseConvert(theNum,10,2) after tConverted end if end repeat return tConverted end convertTextToBinary ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Setting the cursor
Thanks Ken, I see that the dictionary warns against taking control of the mouse, The discussion concludes with this admonishment: You must use this power only for good. I feel evil. I just wanted to simulate the clicking of a button in my help script. I will need to consult my spiritual advisor to see if this usage conforms with RR's ethical standards. Jim Message: 22 Date: Mon, 2 Jan 2012 11:03:35 -0600 From: Ken Ray k...@sonsothunder.com To: How to use LiveCode use-livecode@lists.runrev.com Subject: Re: Setting the cursor Message-ID: cde89a35-53f4-4faf-91d2-e0bd2f4fc...@sonsothunder.com Content-Type: text/plain; charset=us-ascii On Jan 2, 2012, at 1:23 AM, James Hurley wrote: How do I set the loc of the cursor? By script, of course. set the screenMouseLoc to location :D Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Scripting a text to binary digits converter
JB, Well it gives some peculiar results because I clearly don't know much about the encoding process in terms of passing the right params. I rewrote this to be more general. Give it a try if you like and let me know. It will handle carriage returns and such properly. Seems speedy enough for me but again, I am sure it can be improved upon. Thanks for your help, most generous of you. -- function convertTextToBinary varText repeat with n = 1 to the number of chars of varText put chartonum(char n of varText) into theNum put baseConvert(theNum,10,2) into tBaseConverted if length(tBaseConverted) 8 then repeat until length(tBaseConverted)= 8 put 0 before tBaseConverted end repeat end if put tBaseConverted after tConverted end repeat return tConverted end convertTextToBinary ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Scripting a text to binary digits converter
Bryan McCormick wrote JB, Guglielmo This appears to work for my purposes and is pretty speedy. See anything that might break? --- function convertTextToBinary varText repeat with n = 1 to the number of chars of varText put chartonum(char n of varText) into theNum if theNum =64 and theNum = 127 then put 0baseConvert(theNum,10,2) after tConverted else if theNum =64 then put 00baseConvert(theNum,10,2) after tConverted else put baseConvert(theNum,10,2) after tConverted end if end repeat return tConverted end convertTextToBinary ___ use-livecode mailing list use-livecode@.runrev Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode Just for fun I tried with a small script you function : put convertTextToBinary(theText) into field outField ... and the binaryDecode : put binaryDecode(B*, theText, binText) into numItems put binText into field outFieldBin both inserted in two separate repeat to repeat the same statements 200 times, storing the millisecond to execute. Whit your function, on my Win 7 64 bit system, I have between 60 and 70 milliseconds, with the binaryDecode() + the put statemet (/... two separate statements/) I have between 20 and 30 milliseconds :) So .. the Livecode binaryDecode + the put statement is minimum *TWO* time faster than calling your function ;) Guglielmo -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Scripting-a-text-to-binary-digits-converter-tp4254413p4254500.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Scripting a text to binary digits converter
You can or specify the number of character you want, or the * symbol which means ALL ;) Guglielmo On 02.01.2012 21:36, -=JB=- wrote: When I did a quick read of binaryEncode() I was thinking it said you could enter the number of chars you want to convert which would eliminate the need for a repeat structure but I did not try it and could be wrong. -=JB=- On Jan 2, 2012, at 12:23 PM, Bryan McCormick wrote: JB, Guglielmo This appears to work for my purposes and is pretty speedy. See anything that might break? --- function convertTextToBinary varText repeat with n = 1 to the number of chars of varText put chartonum(char n of varText) into theNum if theNum=64 and theNum= 127 then put 0baseConvert(theNum,10,2) after tConverted else if theNum=64 then put 00baseConvert(theNum,10,2) after tConverted else put baseConvert(theNum,10,2) after tConverted end if end repeat return tConverted end convertTextToBinary ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Scripting a text to binary digits converter
On Jan 2, 2012, at 3:54 PM, Bryan McCormick wrote: put baseConvert(theNum,10,2) into tBaseConverted if length(tBaseConverted) 8 then repeat until length(tBaseConverted)= 8 put 0 before tBaseConverted end repeat end if Alternative technique is to... put char -8 to -1 of ( tBaseConverted ) into tBaseConverted Jim Ault ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Setting the cursor
On 1/2/12 2:37 PM, Jim Hurley wrote: Thanks Ken, I see that the dictionary warns against taking control of the mouse, The discussion concludes with this admonishment: You must use this power only for good. I feel evil. I just wanted to simulate the clicking of a button in my help script. I will need to consult my spiritual advisor to see if this usage conforms with RR's ethical standards. :) You can avoid all evil by: click at the loc of btn whatever No cursor movement necessary. But even better, if you only need the mouseup action (i.e., there is no need to simulate mousedown, mousestilldown, etc.) then just: send mouseup to btn whatever Either of these methods avoids the need to consult with outside parties. :) -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Scripting a text to binary digits converter
JB, Jim, Guglielmo Okay, this is the final version of the script which does seem considerably faster than where I started. Thanks to all. Hope this was a useful walk-through. Any other suggestions on ways to improve? - function convertTextToBinary varText repeat with n = 1 to the number of chars of varText put chartonum(char n of varText) into theNum put baseConvert(theNum,10,2) into tBaseConverted put char -8 to -1 of ( tBaseConverted ) into tBaseConverted put tBaseConverted after tConverted end repeat return tConverted end convertTextToBinary ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: OFF TOPIC virtualize windows on mac
Virtualbox works always as expected in about apps or web apps testing tasks. Le 2 janv. 2012 à 14:45, jva...@1234web.net a écrit : Hello, starting with an old Macbook would like to know your expert opinion about what is the best virtualization solution to run Windows on Mac, from a developer point of view. Thanks and Happy New Year -- Jose ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Pierre Sahores mobile : 06 03 95 77 70 www.sahores-conseil.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Scripting a text to binary digits converter
On Jan 2, 2012, at 4:25 PM, Bryan McCormick wrote: Jim, Thanks so much. I wonder how much faster that is? And Guglielmo, I appreciate you taking a crack at this. I don't get how to do the encode using your approach at all since I am not familiar with the params for the BinaryEncode function. You could do your own bench-marking by - put 135898 into varText put 100 * 1000 into loopCnt repeat loopCnt times put varText cr after veryLongList end repeat put the ticks into startTicks repeat for each line LNN in veryLongList put convertTextToBinary(varText) into tConverted end repeat put the ticks - startTicks into elapsedTicks put elapsedTicks div 60 into elapsedSeconds get elapsedTicks tick count get IT cr elapsedSeconds tick count get IT cr loopCnt/elapsedTicks conversions per tick put IT into msg Jim Ault ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Scripting a text to binary digits converter
I tried using the numberFormat to pad zeroes. It worked but was about 20% slower (if I did my math correctly). I got roughly a 6% speed improvement using 'repeat for each char tChar' instead of repeat with n = 1... My test sample was 1000 chars. function convertTextToBinary varText --repeat with n = 1 to the number of chars of varText repeat for each char tChar in varText --put chartonum(char n of varText) into theNum put chartonum(tChar) into theNum put baseConvert(theNum,10,2) into tBaseConverted put char -8 to -1 of ( tBaseConverted ) into tBaseConverted put tBaseConverted after tConverted end repeat return tConverted end convertTextToBinary Phil Davis On 1/2/12 1:33 PM, Bryan McCormick wrote: JB, Jim, Guglielmo Okay, this is the final version of the script which does seem considerably faster than where I started. Thanks to all. Hope this was a useful walk-through. Any other suggestions on ways to improve? - function convertTextToBinary varText repeat with n = 1 to the number of chars of varText put chartonum(char n of varText) into theNum put baseConvert(theNum,10,2) into tBaseConverted put char -8 to -1 of ( tBaseConverted ) into tBaseConverted put tBaseConverted after tConverted end repeat return tConverted end convertTextToBinary ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Phil Davis PDS Labs Professional Software Development http://pdslabs.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
PDFs Not Downloading Properly From FTP Server
Hello everyone, I use LiveCode to upload PDFs to a remote Mac using put url (binfile: longFileName) into url (ftp://; aFTPAddress newFileName) but when I download those same PDFs by using put url (ftp://; aFTPAddress newFileName) into url(file:// aLocalAddress newFileName) it appears to be corrupted or at least there is a lot of gibberish. What am I doing wrong? Should the last url reference, that is, the location on the local machine, be binfile rather than file? Regards, Gregory ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Ways to get the IDs of two already scripted buttons?
Thanks for replies John: if a mouseenter can do the job, I guess that would be OK, -does this suggestion imply, that Altclick cannot be used ? Craig: Unfortunately modifying button scripts is out of the question I am afraid, that I need a step by step, line by line, guidance in this I paste my latest naïve attempt as a starting point -which evidently doesn't achieve anything on lineconnect Answer select the first textbutton of a pair by holding alt- button down and click it. with Yes or Escape titled Step one in establishing a line connecting two buttons wait 10 seconds wait until object is selected put the ID of the selectedobject into firstbuttonID (continued in next posting) ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: PDFs Not Downloading Properly From FTP Server
On Mon, Jan 2, 2012 at 5:42 PM, Gregory Lypny wrote: Hello everyone, I use LiveCode to upload PDFs to a remote Mac using put url (binfile: longFileName) into url (ftp://; aFTPAddress newFileName) but when I download those same PDFs by using put url (ftp://; aFTPAddress newFileName) into url(file:// aLocalAddress newFileName) it appears to be corrupted or at least there is a lot of gibberish. What am I doing wrong? Should the last url reference, that is, the location on the local machine, be binfile rather than file? Regards, Gregory Have you tried binfile: instead of file: to prevent alteration? In certain cases, you may not need the // either. ˜Roger ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Ways to get the IDs of two already scripted buttons?
I put this into the card. It doesn't account for LOTS of things (such as multiple copies of the line if you just keep alt-clicking buttons) but does demonstrate a way to draw lines between 2 consecutively chosen buttons. If there are scripts in the button, they must pass mouseUp to work. If they're empty then its a non-issue. This script goes in the card script. Don't know if it'll help or if its too simplistic but perhaps it's a start. local sLastClick on mouseUp if the altkey is down then if the name of the target contains button then if sLastClick is empty then put the id of the target into sLastClick answer information first button chosesn else create grc connectLine set the style of grc connectLine to line set the points of grc connectLine to (the loc of the target) return (the loc of button id sLastClick) put the id of the target into sLastClick end if end if end if end mouseUp On Mon, Jan 2, 2012 at 3:45 PM, Kresten Bjerg kresten.bj...@psy.ku.dkwrote: Thanks for replies John: if a mouseenter can do the job, I guess that would be OK, -does this suggestion imply, that Altclick cannot be used ? Craig: Unfortunately modifying button scripts is out of the question I am afraid, that I need a step by step, line by line, guidance in this I paste my latest naïve attempt as a starting point -which evidently doesn't achieve anything on lineconnect Answer select the first textbutton of a pair by holding alt- button down and click it. with Yes or Escape titled Step one in establishing a line connecting two buttons wait 10 seconds wait until object is selected put the ID of the selectedobject into firstbuttonID (continued in next posting) ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Scripting a text to binary digits converter
More fun with LC's binaryEncode functions (see the card script): http://www.kkef.org/MIDIBuilder031212.rev It must be pretty quick to accept from user input an ascii representation of a musical note, convert it to binary from which a MIDI file is constructed and played, then add the input to an as-yet open-ended MIDI sequence (whose current length must be properly specified before attempting to update or play)- all in a fraction of a second. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Ways to get the IDs of two already scripted buttons?
Why is modifying button scripts out of the question? You have good instincts, but need work learning the language. (wait until the object is selected) This can work out. Keep posting. You will be amazed how much help will come. Craig Newman -Original Message- From: Kresten Bjerg kresten.bj...@psy.ku.dk To: use-livecode use-livecode@lists.runrev.com Sent: Mon, Jan 2, 2012 12:47 pm Subject: Ways to get the IDs of two already scripted buttons? Thanks for replies John: if a mouseenter can do the job, I guess that would be OK, -does this suggestion imply, that Altclick cannot be used ? Craig: Unfortunately modifying button scripts is out of the question I am afraid, that I need a step by step, line by line, guidance in this I paste my latest naïve attempt as a starting point -which evidently doesn't achieve anything on lineconnect Answer select the first textbutton of a pair by holding alt- button down and click it. with Yes or Escape titled Step one in establishing a line connecting two buttons wait 10 seconds wait until object is selected put the ID of the selectedobject into firstbuttonID (continued in next posting) ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Another Gotcha
Why not do this in a mouseDown handler for the menu? On Thu, Dec 29, 2011 at 5:18 PM, Bob Sneidar b...@twft.com wrote: S'not. ;-) It's the handler that builds contextual menus. By trapping it and doing your own thing you can make your own contextual menus, or add to existing ones. I have this in a frontScript which puts a few extra things at the top of the contextual menu if a field is the target: on revHookBuildObjectEditorContextMenu pMenuTarget, pMenuName, @pMenu, tModifiedMenu put the topstack into theCurrentStack put the long name of this card of theCurrentStack into theCurrentCard put the customproperties of theCurrentStack into theCustomProps switch case word 1 of pMenuTarget is not field put false into valOn break case not theCustomProps is an array put false into valOn break case PreValidations is among the keys of theCustomProps put true into valOn break case MidValidations is among the keys of theCustomProps put true into valOn break case PostValidations is among the keys of theCustomProps put true into valOn break end switch if valOn then put Data Type into line 1 of theValMenu put tab Text into line 2 of theValMenu put tab Number into line 3 of theValMenu put tab Date into line 4 of theValMenu put - into line 5 of theValMenu put Pre-Validations into line 6 of theValMenu put Mid-Validations into line 7 of theValMenu put Post-Validations lf - lf into line 8 of theValMenu -- put the valMenu of me into theValMenu put theValMenu before pMenu put pMenu end if pass revHookBuildObjectEditorContextMenu end revHookBuildObjectEditorContextMenu function dispatchContextMenuPick pMenuName, pWhich if Data Type is in pWhich or Validations is in pWhich then send initVal pWhich to the topstack in 0 seconds exit to top end if pass dispatchContextMenuPick end dispatchContextMenuPick On Dec 29, 2011, at 4:04 PM, Richard Gaskin wrote: Bob Sneidar wrote: I have been using a trick John Craig showed me for appending to a contextual menu which has been very handy for me. The gotcha is that instead of building the menu on the fly using put theMenuItem into line 1 of theMenu (or something like that) I decided to simply create a custom property with the additional menu items I wanted, and then put that property before pMenu in the revHookBuildObjectEditorContextMenu handler in my front script. revHookBuildObjectEditorContextMenu? Where is that documented? -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com LiveCode Journal blog: http://LiveCodejournal.com/blog.irv ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Pete Molly's Revenge http://www.mollysrevenge.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Take a picture iPhone camera
Paolo It's in the release notes for iOS. Look for Photo album and camera support and Saving photos to the users album. Gerry On 03/01/2012, at 1:47 PM, Paolo Mazza wrote: Hi All, New year, new question! How to Take a picture (and save the image in the pictures folder) using the iPhone camera in an iOS app? Best wishes for an happy new year. Paolo Mazza ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode