tsNetSmtpSync (with attachment

2018-03-13 Thread G. Wolfgang Gaich via use-livecode

Hallo all,

try to send an email with attachment (PDF) from LiveCode with tsNet 
(tsNetSmtpSync)


I tried the sample stack "Mail v1.2" from
https://downloads.techstrategies.com.au/tsnet/LCMail.livecode

I get an error when I try to send with an attachment (PDF document):

Error tsneterr: (28) schannel: timed out sending data (bytes sent: 0)
 returned from server


Without the attachment the email is send.

Windows 7, LC 8.1.9


Any ideas?

Best
Günter


___
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: Passing Ampersand and Dot to PostGreSQL - MySQL

2011-11-02 Thread G. Wolfgang Gaich

Hello Sivakatirswami,

I think it's an unicode problem if your database is UTF8.

I use this function in that case to execute the SQL:

function exeSQL_UTF8 pSQL  -- pSQL is your SQL string
global gDB
local tRS
local tSQL
   put unidecode(uniencode(pSQL),"UTF8") into tSQL
   put revdb_execute(gDB,tSQL) into tRS
   return tRS
end exeSQL_UTF8

Regards
Wolfgang



Am 02.11.2011 21:25, schrieb Sivakatirswami:
I'm having some difficulty with passing data from a web form to a 
PostGreSQL database. I'm using iRev on the server and gFormData has 
all the data in the array. After handling all the data, running the CC 
charges, sending notifications, everything works, but my final 
functions to insert the data into the database fail in certain cases.


i use this method to build the query:


put "INSERT INTO donations (first_name, last_name, anonymous, 
email_address, "   into  tSQLQuery
put "addr1, addr2, city, state, postal_code, country, phone_no, 
created_on, " after tSQLQuery
put " entry_point, comment, amount, monetra_user, monetra_msg, cc_no) 
" after tSQLQuery
put "VALUES ('#FIRST_NAME', '#LAST_NAME', '#ANONYMOUS', 
'#EMAIL_ADDRESS', "  after  tSQLQuery
Put "'#ADDR1', '#ADDR2', '#CITY', '#STATE', '#POSTAL_CODE', 
'#COUNTRY', '#PHONE_NO', '#CREATED_ON', " after tSQLQuery
Put "'#ENTRY_POINT', '#COMMENT', '#AMOUNT', '#MONETRA_USER', 
'#MONETRA_MSG', '#CC_NO');" after tSQLQuery


the poke it like this:

replace "#FIRST_NAME" with gFormData["first_name"]  in tSQLQuery
replace "#COMMENT" with gFormData["comment"]  in tSQLQuery
replace "#EMAIL_ADDRESS" with gFormData["email_address"]  in tSQLQuery

when the data in the array values contain certain characters, the 
insertion query fails.


I have been able to definitively diagnose at least two cases (there 
are probably more)


if the data contains an ampersand or a dot, the query fails  e.g these 
will all cause the insertion to fail:


 First Name:  Ravi & Sheela # ampersand

 Comment: All the books & audio [etc.]  # ampersand

 email address: gail.w...@verizon.com  # dot in the email address.

so, I'm not sure what to do.

 I need to escape all the special chars (I don't even have a list of 
what they are) in the gFormData array values that will break the SQL 
query. And we also have to block SQL injection attempts at the same 
time


My "baby xTalk"  method would be tortuous: for each key/value in the 
gFormData array


put gFormData["first_name"]  in tFirstName

put fixBadChars(tFirstName) into tFirstName

replace "#FIRST_NAME" with tFirstName  in tSQLQuery

function fixBadChars pString

replace "&" with "and" in pString
  # and more of these which I don't even know what they would be
  # and replacing the dot in the email will mean the email is 
wrong after insertion

return pString

end fixBadChars

I'm sure this has been dealt with already... Does anyone have a 
"escape input data for SQL insertion"   library they can share?


Thanks!
Sivakatirswami












 *
 * Englisch
 * Deutsch

 * Englisch
 * Deutsch


___
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: Ask Password and Login Screen (Linux)

2011-08-19 Thread G. Wolfgang Gaich

Hello Richard,

on Linux try the unicode char 25cf (9679):

set the useunicode to true
set the unicodetext of fld "myFld" to numtochar(9679)

HTH
Wolfgang


Am 19.08.2011 16:34, schrieb Richard Gaskin:

Jim Ault wrote:

The option-8 is not always a bullet.
It depends on the font
and the high-ascii assignments.

It could be as simple as choosing the correct font for the platform 
you detect.


Another option would be to set the htmlText, using the character 
entity •.


Unfortunately, that only works on Mac and Windows, and there does not 
seem to be a way to reliably insert bullets in Linux at all:



If anyone has a way to insert bullets on Linux I'd be grateful.

--
 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


Re: Storing Data in Standalone Apps

2011-08-11 Thread G. Wolfgang Gaich

or you use a serialized array. E.g.:

-- to save your preferences

global gPrefs
on mouseUp
put the loc of this stack into gPrefs["Stackloc"]
put the rect of this stack into gPrefs["StackRect"]
put the backcolor of this stack into gPrefs["StackBCol"]
put arrayencode(gPrefs) into url 
"binfile:c:\users\gg\myprefs\Test\prefs.dat"

end mouseUp

-- and to restore your prefs

global gPrefs
on mouseUp
put arraydecode(url "binfile:c:\users\gg\myprefs\Test\prefs.dat") 
into gPrefs

set the loc of this stack to gPrefs["Stackloc"]
set the rect of this stack to gPrefs["StackRect"]
set the backcolor of this stack to gPrefs["StackBCol"]
end mouseUp

-- You don't have to use globals. But if you do, you can use your 
preferences in any script.



Best Regards
Wolfgang


Am 11.08.2011 16:53, schrieb Bill Vlahos:

Correct. It has to be a separate file - either a separate stack or text file.

Bill Vlahos

Sent from my iPhone

On Aug 11, 2011, at 7:29 AM, Gregory Lypny  wrote:


Hello everyone,

My apologies in advance for the lame question but I need a little refresher as 
it has been ages since I’ve deployed standalone apps.  To save data in them, 
and that would include custom props, I need to do it in stack files that are 
not sub-stacks of the main stack.  In other words, any data to be saved, such 
as preferences or ongoing work, must be put in a stack other than the one being 
converted to a standalone.  Is that correct?


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

___
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 can I wait for revCopyFolder execution?

2011-08-11 Thread G. Wolfgang Gaich

Hello Tiemo,

my test was with a 26GB folder with many, many subfolders. it took 24 
minutes and the script was hold until all folders and files were copied.


Best
Wolfgang

Am 11.08.2011 14:34, schrieb Tiemo Hollmann TB:

Thanks Mark, I will give it a try.
@Wolfgang, perhaps the issue, why revCopyFolder didn't waited in my case
(Mac) is the duration. The copying in my my case lasts about 10 min (8GB).
Perhaps applescript (which is probably wrapped by the rev command) returns
the result already after a certain amount of time, as Mark says. Who knows,
programming sometimes is a myst.
Tiemo


-Ursprüngliche Nachricht-
Von: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-
boun...@lists.runrev.com] Im Auftrag von Mark Schonewille
Gesendet: Donnerstag, 11. August 2011 14:15
An: How to use LiveCode
Betreff: Re: AW: how can I wait for revCopyFolder execution?

Hi Tiemo,

Actually, LiveCode waits until the AppleScript returns a value, indicating
successful compilation or failure, but it returns this value before the
copying has finished. So, it is a combination of AppleScript returning a

value

early and LiveCode not reading additional results from AppleScript.

It is possible to return a value from AppleScript to LiveCode:

-- cScript custom prop
set x to 1+1
return x

--inside LiveCode:
put the cScript of me into myScript
do myScript as AppleScript
put the result

You could try to return the message instead of running a LiveCode script
inside AppleScript and see whether AppleScript waits for the copying to

finish

until it returns that value. The script would look like this (pseudocode):

try
copy
on error
return value
end try
return different value

Other commands that don't wait are open process and IIRC the popup

command.

I'm sure there are a few more but I don't know the entire list by heart.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

What does that error mean? Buy LiveCodeErrors for iPhone now

http://qery.us/v4

A must-have for LiveCode programmers.

On 11 aug 2011, at 14:00, Tiemo Hollmann TB wrote:


Hi Mark,
thanks for your quick answer, I will give it a try.

Because you have another approach I assume that it is a standard

behavior

with rev commands, that they don't wait?
Up to know I presumed that every command is waiting up to it's end of
execution. Are there more commands, which are not waiting?

Thanks
Tiemo


___
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 can I wait for revCopyFolder execution?

2011-08-11 Thread G. Wolfgang Gaich

Hello Tiemo

from my experiences I can say that revcopyfolder is a blocking command.
If I have in a script:

revcopyfolder "myFolder","myCopyFolder"
answer the result

then the dialog pops up when the copy-process has ended

I'm on Windows 7, may be on Mac it is not blocking (Can't test that)

Best regards
Wolfgang


Am 11.08.2011 14:00, schrieb Tiemo Hollmann TB:

Hi Mark,
thanks for your quick answer, I will give it a try.

Because you have another approach I assume that it is a standard behavior
with rev commands, that they don't wait?
Up to know I presumed that every command is waiting up to it's end of
execution. Are there more commands, which are not waiting?

Thanks
Tiemo


-Ursprüngliche Nachricht-
Von: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-
boun...@lists.runrev.com] Im Auftrag von Mark Schonewille
Gesendet: Donnerstag, 11. August 2011 13:11
An: How to use LiveCode
Betreff: Re: how can I wait for revCopyFolder execution?

Tiemo,

Here's a sample AppleScript.

try
tell application "Finder"
set myFile to POSIX file "~/desktop/file.txt"
set myNewFile to POSIX file "~/desktop/file2.txt"
copy myFile to myNewFile
end tell
on error myErr number myNr
set myScript to "answer error \"A problem occurred ("&  myErr&

")\""

tell application "LiveCode 4.6.1" to do script myScript
end try

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

What does that error mean? Buy LiveCodeErrors for iPhone now

http://qery.us/v4

A must-have for LiveCode programmers.

On 11 aug 2011, at 12:54, Tiemo Hollmann TB wrote:


Hello,

I want to copy a big folder by script and wait for the result to prompt

an

appropriate message.

But after fireing revCopyFolder my script runs on without waiting for

the

execution of revCopyFolder.

Is this a normal behavior? Anything I can do to wait for the finish?

Thanks

Tiemo



___
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


 * Deutsch - erkannt
 * Englisch
 * Deutsch

 * Englisch
 * Deutsch


___
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


Legacy Drivers - Documentation?

2011-08-11 Thread G. Wolfgang Gaich

Hello,

in the livecode ide preferences/Compatibility there is an option to Use 
Legacy Drivers.


Is there any detailed documentation, when to use the Legacy Drivers and 
when it is not necessary.


I detected some anomalies using odbc with MS SQL Server and Ingres.

Any information would be appreciated.

Best regards
Wolfgang

___
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: German revolutionboard?

2011-08-11 Thread G. Wolfgang Gaich

Hello Mark,

thanks for the info.

If you need help, webspace, suggestions contact me offline.
I guess it could be important to push the communication in a german 
livecode community.

Best regards
Wolfgang


Am 11.08.2011 10:34, schrieb Mark Schonewille:

Hi Wolfgang,

I will install a new board and will announce it on this list.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

What does that error mean? Buy LiveCodeErrors for iPhone now http://qery.us/v4 
A must-have for LiveCode programmers.

On 11 aug 2011, at 09:44, G. Wolfgang Gaich wrote:


Hello german livecoder,

today I tried to go to revolutionboard.de.
I got this:


"Forbidden

You don't have permission to access / on this server."

Revolutionboard doesn't exist anymore?

Best regards
Wolfgang


___
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


 * Englisch - erkannt
 * Englisch
 * Deutsch

 * Englisch
 * Deutsch


___
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


German revolutionboard?

2011-08-11 Thread G. Wolfgang Gaich

Hello german livecoder,

today I tried to go to revolutionboard.de.
I got this:


 "Forbidden

You don't have permission to access / on this server."

Revolutionboard doesn't exist anymore?

Best regards
Wolfgang


___
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: Deselection of lines

2011-05-18 Thread G. Wolfgang Gaich

I do it this way:

lock screen
disable fld "xxx"
set the hilitedlines of fld "xxx" to empty
enable fld "xxx"
unlock screen


Best regards
Wolfgang


Am 18.05.2011 08:23, schrieb Yves COPPE:

Hi list

I want to make a deselection of the selected lines of a fld

something like :

set the selectedLine of fld "xxx" to "0"

but it doesn't luck

Has anyone another script to perform that ?

Thanks.



Greetings.

Yves COPPE
yvesco...@skynet.be

___
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 bordercolor of images in group

2011-04-19 Thread G. Wolfgang Gaich

Hallo Klaus,

a workaround may be:

on dragenter
   ...
   if the short name of the owner of the target is not "g1" then
do "group" && the long id of the target
set the name of the owner of the target to "g1"
end if
set the bordercolor of the owner of the target to  255,255,102
end dragenter

Beste Grüße
Wolfgang


Am 19.04.2011 15:08, schrieb Klaus on-rev:

on dragenter
>  ...
>  set the bordercolor of the target to 255,255,102
>  end dragenter



___
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: Accessing 'ntext' fields from SQL Server over ODBC (Windows)

2011-01-12 Thread G. Wolfgang Gaich

Hi Ben,

try to convert nstring to varchar in your sql query:

select convert(varchar, yourNStringColumn) from table ...

HTH

Wolfgang



Am 12.01.2011 13:51, schrieb Ben Rubinstein:
We've got a problem with reading data from an 'ntext' column in a MS 
SQL Server database.


This has arisen in a client environment where they recently upgraded a 
third-party package.  They use an app we wrote in Rev/LC which 
retrieves data from the backend database of this package; one of the 
fields we retrieve has changed from 'text' to 'ntext', and we're now 
only retrieving the first character in each case.  (We of course have 
no control over the design of this database.)


We've reproduced this locally, setting up a simple test database with 
one table, one ntext column: the table has three rows as follows:

Row 1 here
Row 2 here
ümlaut

Using our app or Rev/LC in the IDE on Mac, this is retrieved as 
expected. Using either the app, Rev 4.0, or LC 4.5 on Windows, we get 
just

R
R
ü


(and the length of the data returned by revdb_columnbynumber is 1).

On Mac we're using the ActualTech ODBC driver; on Windows the default 
supplied ODBC driver.  In the DSN setup on windows we have unticked 
all options on the final config screen, so there is no character 
translation or any other options on. We have also tried various 
combinations of these options.


What surprises me is that this works on Mac (using ODBC over the 
network to SQL Server running on Windows), but fails when LC is 
running on Windows (even on the machine that's hosting SQL Server).


(Our test machine was Windows Server 2003, with SQL Server 2008; I'm 
not currently sure the details of the client's network.)


Has anyone else worked successfully (or otherwise) with ntext fields 
over ODBC on Windows?


TIA,

Ben

___
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