O$ v8.1.2 ::: HTTPage : Host is down, things become weirder
Alain Stouder Omnis
omnis at smartway.ch
Wed Jan 10 10:10:42 EST 2018
Hi Jean-Marc,
Maybe there are 2 errors : one related to relocation of the server where Safari follows and proceeds and Omnis not, and a second related to the length of the returned string where Applescript works but Omnis $runscript implementation is linked to a known NSUserApplescript bug if returned value is bigger than 32760 chars.
HTH,
Alain
> On 10 Jan 2018, at 14:28, jmv <jmvoegeli at bluewin.ch> wrote:
>
> Error 7 is : curl: (7) Couldn't connect to server although it does in applescript editor !
>
>> Le 10 janv. 2018 à 14:24, jmv <jmvoegeli at bluewin.ch> a écrit :
>>
>> Hi,
>>
>> HTTPPage ("http://six-swiss-exchange.com/downloads/indexdata/hsmi.csv <http://six-swiss-exchange.com/downloads/indexdata/hsmi.csv>") Returns #S1
>>
>> doesn't work with error Nr -10064, but in safari it charges the page and
>>
>> curl http://six-swiss-exchange.com/downloads/indexdata/hsmi.csv <http://six-swiss-exchange.com/downloads/indexdata/hsmi.csv> -o /Users/jmv/Desktop/Essai.txt
>>
>> charge the page OK in the Terminal.
>>
>> More …
>>
>> the applescript :
>>
>> set cmd to "curl http://six-swiss-exchange.com/downloads/indexdata/hsmi.csv -o /Volumes/Vessy/jmv/Nostris/Eridef/Indices/Importations/SMI+SMIC.txt"
>> do shell script cmd
>>
>> works very well in the applescript editor
>>
>> BUT does not work in omnis !!!
>>
>> It return error Nr 7 (as what that may be ?)
>>
>> Here the code :
>>
>> pLocalDir,pFile : parameter strings
>> vPath, vScript, vResult : local strings
>> vError : local integer 32 bit
>>
>> Calculate vPath as con(pLocalDir,pFile)
>> Calculate vScript as ""
>> Calculate vScript as con("set cmd to ",kDq,"curl ",pURL," -o ",vPath,kDq,kCr)
>> Calculate vScript as con(vScript,"do shell script cmd",kCr)
>> Do $runapplescript(vScript,vResult) Returns vError
>> Quit method vError ---> returns 7
>>
>> (The applescript text above was copied from the variable vScript in omnis)
>>
>> I must say I'm lost here !
>>
>> Thank you to help me.
>>
>> Jean-Marc
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
>
More information about the omnisdev-en
mailing list