Re: Find Replace in Script Editor with cr

2021-04-06 Thread Sean Cole (Pi) via use-livecode
Hi all,
So, the semicolon example was only given as an oversimplification because
most of you didn't read the original post properly, jumped to the
wrong conclusion and then offered irrelevant answers. But then, the
oversimplification gathered the same results of people jumping to the wrong
conclusion by not reading the posts correctly. (It wasn't helped by my /n
\n typo that was jumped on and assumed to be where I was going wrong. It is
the paradox of this forum. Make it comprehensive, people get lost and lose
the point and give the wrong answer. Make it simple and they read more into
it and then equally get it wrong.

The code I deal with on a daily basis is infinitely more complex than a
simple - put the script of someThing into tscript; replace “;” with “;” &
cr in script; Set the script of someThing to tscript - and can do that kind
of thing in my sleep (as I often do, but infinitely more complex).

So, I KNOW all of these SCRIPTING techniques. I'm not interested! I can do
that. NOT A PROBLEM :)

BUT IN THE FIND/REPLACE PANEL !!!??

Can I use a return character (or a wildcard, escaped, coded form) in the
REPLACE field OF THE PANEL. - A simple question.

You CAN use RegEx in the FIND Field. In there you can SEARCH for \n ((I got
it right this time)) which refers to a line feed (or new line). BUT, you
CANNOT, it seems, as best I can find or from the comments made, use \n to
replace or insert a line feed.

In my scripts (the several thousands of them) there are NO (zero, none)
semicolons used to separate commands. It was used ONLY to help give you a
simpler idea of what I was trying to achieve without having to use too much
detail. But this kind of dialogue on a forum filled with 'clever' people
trying to demonstrate how clever they are means they often miss the point
and give answers that do not fulfil the remit! Or just answer a simple
ruddy question.

Here, then, is a 'Real World' example of what I am facing. There are many
variants and not my only issue, but a useful example, sample, demonstration.


*[code]if* field "Level" begins with "Director" and field "UserDisplay" is
not empty and field "UserDisplay" is not "All Agents" and the label of
button "Status" is "All Sales" *then* *put* pidbQueryDatabase( "SELECT *
FROM QGNew where UserID = '" & (fld "UserID" of card 17 stack "QGv3") & "'
AND DealerID = '" & (fld "DealerID" of card 1 stack "QGv3") & "' AND Status
LIKE '%" & ("Sale") & "%' OR UserID = '" & (fld "UserID" of card 17 stack
"QGv3") & "' AND DealerID = '" & (fld "DealerID" of card 1 stack "QGv3") & "'
AND Status LIKE '%" & ("Connect") & "%'") into tMsg
[/code]
That is all on a single line of a script in one of many thousand buttons.
In and of itself is not so much a problem as it is just difficult for me to
plough through when working out what the script is doing. In this button
alone there are 32 lines similar in nature to this.

To make it easier for me to go through, as I arrive at each button to
simplify and correlate and combine into much more elegant code in the card
script, I would like to be able, IN THE FIND REPLACE PANEL, not by code or
porting or anything else, just to search and replace (& ") with (\ cr & ")
(parenthesis used here just to wrap the strings), and (then put) with (then
cr put). Hence, it will look a bit more like this:

[code]
*if* field "Level" begins with "Director" and field "UserDisplay" is not
empty and field "UserDisplay" is not "All Agents" and the label of button
"Status" is "All Sales" *then*
*put* pidbQueryDatabase( "SELECT * FROM QGNew where UserID = '" & (fld
"UserID" of card 17 stack "QGv3") \
& "' AND DealerID = '" & (fld "DealerID" of card 1 stack "QGv3") \
& "' AND Status LIKE '%" & ("Sale") \
& "%' OR UserID = '" & (fld "UserID" of card 17 stack "QGv3") \
& "' AND DealerID = '" & (fld "DealerID" of card 1 stack "QGv3") \
& "' AND Status LIKE '%" & ("Connect") \
& "%'") into tMsg
[/code]

Ideally I'd want it even better than this eventually. But key to doing just
this for now was being able to use a return character in the replace field
of the find/replace panel.

My original question was 'Just wondering if there is a way of replacing
using cr in the find/replace panel of the script editor.'

A simple Yes or No would have been sufficient. Even better, a yes with a
'just use this form : x,y,z' as a sample. I just hoped someone had found a
simple method, especially as the guides and documentation are so woefully
out of date and incomplete. Something more than 'the meaning of life = 42'
and less than 'measuring gravity = the complete works of Sir Isaac Newton',
as long as it actually answers the question asked :)

(And please don't go into the simplification of the SQL requests, the 'if'
condition or any other poop. I'm FULLY aware of this to the nth degree and
is why I'm going through this poop-show of a stack. Over 10 years of
poor/bad/dirty coding that now needs cleaning and refactoring without
rebuilding from the ground up. I'm just working my 

Re: Find Replace in Script Editor with cr

2021-04-06 Thread doc hawk via use-livecode

sean slipped

> For instance, suppose I have multiple commands on one line separated by ;
> and I want to search for semicolon and replace with semicolon followed by
> return character to drop the remaining script onto a new line.

put the script of someThing into tscript
replace “;” with “;” & cr in script
Set the script of someTHing to tscript
___
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: How do you handle 32/64 bit Windows standalones?

2021-04-06 Thread J. Landman Gay via use-livecode

I create both. We still have users on older machines that need 32-bit.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On April 6, 2021 4:39:42 AM Tiemo via use-livecode 
 wrote:



Hello,



When creating a Windows standalone, are you still creating the 32Bit
standalone or only anymore 64 Bit Versions of your products?

I know, that Microsoft doesn't delivers 32 Bit Versions anymore since 2020,
but I didn't found statistics about the current shares of 32/64 Bit Windows
Systems out there (in Germany).



Are there any caveats against going on with 32 Bit versions for some more
years?



How do you handle this today?







___
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


AW: How do you handle 32/64 bit Windows standalones?

2021-04-06 Thread Tiemo via use-livecode
Thanks for your 2 cents!

-Ursprüngliche Nachricht-
Von: use-livecode  Im Auftrag von Andre 
Garzia via use-livecode
Gesendet: Dienstag, 6. April 2021 15:30
An: How to use LiveCode 
Cc: Andre Garzia 
Betreff: Re: How do you handle 32/64 bit Windows standalones?

Be aware that windows machines which are running “Windows on ARM” such as the 
gorgeous Surface Pro X can only run either ARM64 windows apps (which we can’t 
build with LC) or 32bits x86 windows apps, which we can build. If you want to 
reach maximum compatibility with windows machines everywhere, building for 
32bits is the safest bet.

> On 6 Apr 2021, at 10:36, Tiemo via use-livecode 
>  wrote:
> 
> Hello,
> 
> 
> 
> When creating a Windows standalone, are you still creating the 32Bit 
> standalone or only anymore 64 Bit Versions of your products?
> 
> I know, that Microsoft doesn't delivers 32 Bit Versions anymore since 
> 2020, but I didn't found statistics about the current shares of 32/64 
> Bit Windows Systems out there (in Germany).
> 
> 
> 
> Are there any caveats against going on with 32 Bit versions for some 
> more years?
> 
> 
> 
> How do you handle this today?
> 
> 
> 
> 
> 
> 
> 
> ___
> 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: How do you handle 32/64 bit Windows standalones?

2021-04-06 Thread Andre Garzia via use-livecode
Be aware that windows machines which are running “Windows on ARM” such as the 
gorgeous Surface Pro X can only run either ARM64 windows apps (which we can’t 
build with LC) or 32bits x86 windows apps, which we can build. If you want to 
reach maximum compatibility with windows machines everywhere, building for 
32bits is the safest bet.

> On 6 Apr 2021, at 10:36, Tiemo via use-livecode 
>  wrote:
> 
> Hello,
> 
> 
> 
> When creating a Windows standalone, are you still creating the 32Bit
> standalone or only anymore 64 Bit Versions of your products?
> 
> I know, that Microsoft doesn't delivers 32 Bit Versions anymore since 2020,
> but I didn't found statistics about the current shares of 32/64 Bit Windows
> Systems out there (in Germany).
> 
> 
> 
> Are there any caveats against going on with 32 Bit versions for some more
> years? 
> 
> 
> 
> How do you handle this today?
> 
> 
> 
> 
> 
> 
> 
> ___
> 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: Find Replace in Script Editor with cr

2021-04-06 Thread Craig Newman via use-livecode
I understand why this will not work directly from the Find/Replace in the SE. 
That function does not know how to repace a semiColon with an actual return 
char.

But a button somewhere, or a plug-in if that is more convenient, with a very 
simple handler can. (Pseudo)

get the script of the objectOfInterest
replace “;” with return in it
set the script of the objectOfInterest to it

Done.

Craig

> On Apr 6, 2021, at 5:47 AM, John Balgenorth via use-livecode 
>  wrote:
> 
> I haven’t been following this subject that close so I could be missing
> completely with my answer, but when writing code in C or C++ the
> /n is simply a  / and n characters not a carriage return.  The \n is
> used for a new line which is a carriage return.  If I am missing the
> point just ignore the post.
> 
> Forward slash n (/n) does not make a new  line.
> Back slash n (\n) does make a new line.
> 
> JB
> 
>> On Apr 5, 2021, at 10:28 PM, Sean Cole (Pi) via use-livecode 
>>  wrote:
>> 
>> Bob, Regex only appears to operate on the read of the text, so
>>   ;
>> in the *find* field will locate all of the places a semicolon is found, but
>> putting
>>   /n
>> into the *replace* field will not replace the ; with a cr
>> 
>> Brian, The project is huge and I don't yet have the time to invest in
>> porting it all to github just yet. As it is I have created my own simple
>> regex text operator that I copy/paste the script into.
>> 
>> https://www.dropbox.com/s/glq6pco70d3zgt3/Screenshot%202021-04-06%20at%2006.21.22.png?dl=0
>> 
>> Richard, I've tried in the Find, Find and replace of the script editor and
>> the Find/Replace from the main menu. I can't seem to place a carriage
>> return (or line feed or whatever) into the replacement field. This is what
>> I am trying to achieve. Replace ";" with "cr" in myScript. I can do it in
>> code, but not from the find/replace windows. :(
>> 
>> Sean
>> ___
>> 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: How do you handle 32/64 bit Windows standalones?

2021-04-06 Thread Richmond via use-livecode
I provide both: here have a look: 
https://www.dropbox.com/sh/2vgc1ei088hdqay/AAC8ac27eZuiI_BsWFlFQQjYa?dl=0


Richmond.

On 6.04.21 12:36, Tiemo via use-livecode wrote:

Hello,

  


When creating a Windows standalone, are you still creating the 32Bit
standalone or only anymore 64 Bit Versions of your products?

I know, that Microsoft doesn't delivers 32 Bit Versions anymore since 2020,
but I didn't found statistics about the current shares of 32/64 Bit Windows
Systems out there (in Germany).

  


Are there any caveats against going on with 32 Bit versions for some more
years?

  


How do you handle this today?

  

  

  


___
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: How do you handle 32/64 bit Windows standalones?

2021-04-06 Thread matthias rebbe via use-livecode


Windows 8 was available as 32 and 64 bit. The support for that OS by Microsoft 
ends 23.01.2023.

Windows 10 also was (and maybe still is) available as 32bit and 64 bit. If i 
recall it correctly starting with Win10 2004 only 64bit OEM versions 
werereleased.

As long as there might be users who have a 32bit version of Windows running and 
as long as LC allows to create 32bit Windows standalones, i will create 32bit 
Windows standalones.

Matthias


-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 06.04.2021 um 11:36 schrieb Tiemo via use-livecode 
> :
> 
> Hello,
> 
> 
> 
> When creating a Windows standalone, are you still creating the 32Bit
> standalone or only anymore 64 Bit Versions of your products?
> 
> I know, that Microsoft doesn't delivers 32 Bit Versions anymore since 2020,
> but I didn't found statistics about the current shares of 32/64 Bit Windows
> Systems out there (in Germany).
> 
> 
> 
> Are there any caveats against going on with 32 Bit versions for some more
> years? 
> 
> 
> 
> How do you handle this today?
> 
> 
> 
> 
> 
> 
> 
> ___
> 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: Find Replace in Script Editor with cr

2021-04-06 Thread John Balgenorth via use-livecode
I haven’t been following this subject that close so I could be missing
completely with my answer, but when writing code in C or C++ the
/n is simply a  / and n characters not a carriage return.  The \n is
used for a new line which is a carriage return.  If I am missing the
point just ignore the post.

Forward slash n (/n) does not make a new  line.
Back slash n (\n) does make a new line.

JB

> On Apr 5, 2021, at 10:28 PM, Sean Cole (Pi) via use-livecode 
>  wrote:
> 
> Bob, Regex only appears to operate on the read of the text, so
>;
> in the *find* field will locate all of the places a semicolon is found, but
> putting
>/n
> into the *replace* field will not replace the ; with a cr
> 
> Brian, The project is huge and I don't yet have the time to invest in
> porting it all to github just yet. As it is I have created my own simple
> regex text operator that I copy/paste the script into.
> 
> https://www.dropbox.com/s/glq6pco70d3zgt3/Screenshot%202021-04-06%20at%2006.21.22.png?dl=0
> 
> Richard, I've tried in the Find, Find and replace of the script editor and
> the Find/Replace from the main menu. I can't seem to place a carriage
> return (or line feed or whatever) into the replacement field. This is what
> I am trying to achieve. Replace ";" with "cr" in myScript. I can do it in
> code, but not from the find/replace windows. :(
> 
> Sean
> ___
> 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


How do you handle 32/64 bit Windows standalones?

2021-04-06 Thread Tiemo via use-livecode
Hello,

 

When creating a Windows standalone, are you still creating the 32Bit
standalone or only anymore 64 Bit Versions of your products?

I know, that Microsoft doesn't delivers 32 Bit Versions anymore since 2020,
but I didn't found statistics about the current shares of 32/64 Bit Windows
Systems out there (in Germany).

 

Are there any caveats against going on with 32 Bit versions for some more
years? 

 

How do you handle this today?

 

 

 

___
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