Re: Parsing properties in Link- and Internet Shortcut files -- SOLVED for Windows 10 -- Added remarks

2021-02-12 Thread R.H. via use-livecode
Hi there

Windows 10:

The .bat file is required for those .url files that do not give you a text
when opening (and that was the problem).
Some of the .url files can also simply be read using this sample script.
(And these specific files cannot be read with the .bat file as I seem to
recognize. Further testing is needed.)

on mouseUp  local tFilePath
 ask "Please paste the file path"
 if it is not empty then put it into tFilePath
 put URL("binfile:"&tFilePath) into msg
end mouseUp

You must provide the filepath with the filename.
The result (as an example):

Example output for .url file (same file not readable with the .bat)
   [InternetShortcut]
   URL=https://cosi.lino-framework.org/tour/index.html

Greetings, Roland


On Fri, Feb 12, 2021 at 11:11 PM R.H.  wrote:

> Tested on Windows 10:
>
> I now found and tested the batch file script that works now:
>
> Create a batch file, for example "GetURL.bat"
> Edit the file with a text editor (Notepad++ or whatever)
>
> Put the following script into this file:
>
> :: START OF SCRIPT -- comment line
> @echo off
> setlocal enableextensions enabledelayedexpansion
> pushd %1
> for %%F in (%1\*.url) do (
>echo %%~dpnxF
>call :findurl "%%~dpnxF"
> )
> popd
> goto end
> :findurl inputfile
> set url=
> for /f "tokens=2 delims==" %%i in ('findstr URL %1') do set url=%%i
> echo %url%
> echo ---
> :end
> :: END OF SCRIPT -- comment line
>
> Save the file and place it for this demo in the C:\folder (which is
> accessible for admins only. Otherwise use a "documents/..." folder.
>
> -- Usage
> When calling the .bat file here we assume that the .bat file is in the C:\
> directory .
>
> ...Calling from Windows CMD opened with Administrator rights:
>  C:\GetURL.bat "C:\Users\\Desktop\Links"
>
> This assumes that there is a folder "Links" on the desktop containing the
> Internet shortcut file (hidden file extension .url) and that you want to
> read the content of the URL plus the filename.
>
> -- Now, we can call the .bat file from LiveCode with a little script in a
> test button:
>
> on mouseUp
> # Example script to call the .bat file:
>set the hideconsolewindows to true
>put "C:\GetURL.bat" into tCmd -- Calling the commands in the .bat file
>put "C:\Users\Rolan\Desktop\Links" into tFolder -- The folder
> containing Internet Shortcut files .url
>put tCMD && tFolder into tCommand
>put shell (tCommand) into msg --x Could be messages box or any field...
> end mouseUp
>
> -- Example output in the message box  (a list of .url files with the
> content of their url)
>
> The script in the .bat file looks at all files with a .url extension in
> the folder specified and returns the name and the URL content of that file.
> Each record is separated by three "---".
>
> C:\Users\Roland\Desktop\Links\simultaneous multiple database access -
> LiveCode Forums.url
> https://forums.livecode.com/viewtopic.php?t
> ---
> C:\Users\Roland\Desktop\Links\Sons of Thunder Software - Developer
> Resources - LiveCode.url
> http://www.sonsothunder.com/devres/livecode/livecode.htm
> ---
> C:\Users\Roland\Desktop\Links\Sons of Thunder Software - Products.url
> http://www.sonsothunder.com/products/products.htm
>
> ---
>
> Please, if there is anything for Mac (OSX) and Linux, we could publish
> this in the Forum.
>
>
> Roland
>
> P.S: I will also check how to read the local .ink files that are shortcuts
> to files and folder in Windows. It should also be possible using this for
> ".ini" files.
>
>
>
___
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: Parsing properties in Link- and Internet Shortcut files -- SOLVED for Windows 10

2021-02-12 Thread R.H. via use-livecode
Tested on Windows 10:

I now found and tested the batch file script that works now:

Create a batch file, for example "GetURL.bat"
Edit the file with a text editor (Notepad++ or whatever)

Put the following script into this file:

:: START OF SCRIPT -- comment line
@echo off
setlocal enableextensions enabledelayedexpansion
pushd %1
for %%F in (%1\*.url) do (
   echo %%~dpnxF
   call :findurl "%%~dpnxF"
)
popd
goto end
:findurl inputfile
set url=
for /f "tokens=2 delims==" %%i in ('findstr URL %1') do set url=%%i
echo %url%
echo ---
:end
:: END OF SCRIPT -- comment line

Save the file and place it for this demo in the C:\folder (which is
accessible for admins only. Otherwise use a "documents/..." folder.

-- Usage
When calling the .bat file here we assume that the .bat file is in the C:\
directory .

...Calling from Windows CMD opened with Administrator rights:
 C:\GetURL.bat "C:\Users\\Desktop\Links"

This assumes that there is a folder "Links" on the desktop containing the
Internet shortcut file (hidden file extension .url) and that you want to
read the content of the URL plus the filename.

-- Now, we can call the .bat file from LiveCode with a little script in a
test button:

on mouseUp
# Example script to call the .bat file:
   set the hideconsolewindows to true
   put "C:\GetURL.bat" into tCmd -- Calling the commands in the .bat file
   put "C:\Users\Rolan\Desktop\Links" into tFolder -- The folder containing
Internet Shortcut files .url
   put tCMD && tFolder into tCommand
   put shell (tCommand) into msg --x Could be messages box or any field...
end mouseUp

-- Example output in the message box  (a list of .url files with the
content of their url)

The script in the .bat file looks at all files with a .url extension in the
folder specified and returns the name and the URL content of that file.
Each record is separated by three "---".

C:\Users\Roland\Desktop\Links\simultaneous multiple database access -
LiveCode Forums.url
https://forums.livecode.com/viewtopic.php?t
---
C:\Users\Roland\Desktop\Links\Sons of Thunder Software - Developer
Resources - LiveCode.url
http://www.sonsothunder.com/devres/livecode/livecode.htm
---
C:\Users\Roland\Desktop\Links\Sons of Thunder Software - Products.url
http://www.sonsothunder.com/products/products.htm

---

Please, if there is anything for Mac (OSX) and Linux, we could publish this
in the Forum.


Roland

P.S: I will also check how to read the local .ink files that are shortcuts
to files and folder in Windows. It should also be possible using this for
".ini" files.
___
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: Livecode IDE question

2021-02-12 Thread Roger Guay via use-livecode
I’m having a similar problem on my new MBP, and haven’t figured out  the cause 
yet. Just type this in the message box for an temporary fix:

set the top of stack revMenubar to 25 - - - or so


Roger


> On Feb 12, 2021, at 10:58 AM, David Squance via use-livecode 
>  wrote:
> 
> I’m a hobbyist, and infrequent dabbler, and I hope my question isn’t 
> inappropriate to post here. I find the forum too cumbersome and daunting. 
> With recent upgrades, the toolbar at the top of the screen in the IDE is 
> fixed about an inch below the top. Is there anyway to move it up? I use a 
> MacBook Air and the screen is small enough.
> 
> Thanks.
> Dave
> 
> LC9.6.2 RC2
> OS 11.2.1
> ___
> 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: Livecode IDE question

2021-02-12 Thread doc hawk via use-livecode
I don’t know if this helps, but I turn off the icons and just have the text 
buttons, giving back space.

Or you can just hide both . . . macOS can assign keystrokes to application menu 
items in settings


___
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


Livecode IDE question

2021-02-12 Thread David Squance via use-livecode
I’m a hobbyist, and infrequent dabbler, and I hope my question isn’t 
inappropriate to post here. I find the forum too cumbersome and daunting. With 
recent upgrades, the toolbar at the top of the screen in the IDE is fixed about 
an inch below the top. Is there anyway to move it up? I use a MacBook Air and 
the screen is small enough.

Thanks.
Dave

LC9.6.2 RC2
OS 11.2.1
___
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


Parsing properties in Link- and Internet Shortcut files

2021-02-12 Thread R.H. via use-livecode
I am on Windows 10 (but answer will apply to MacOS as well).

I am trying to read the URL property of a file that I create simply
dragging-dropping the Internet address from my browser to the Desktop and
then storing this file. There are thousands now!!!

Some of such files are readable text files with the readable content
"[internetshortcut], URL: xxx etc." -- but most Internet shortcut files on
Windows with the invisible .url or .ink extension are empty when trying to
read with using a text editor or opening them in LiveCode.

In such Windows file's there is a property url: that contains the web
address. It is visible when opening using the right mouse button (context
menu) and then selecting the "properties" item. When double-clicking such
file, the default browser will open and open the web page directed to.

But I want to read this URL property as text directly and use it from
within LiveCode.

I assume that these Internet shortcuts store the URL information not in the
file itself, or I just cannot get to this information.

I found one batch file script that promises such a solution. Such batch
text file can be called through the SHELL() command and will then execute.
It has the file extension ".bat".

#-- START BATCH SCRIPT
echo off
setlocal enableextensions enabledelayedexpansion
pushd %1
for %%F in (%1\*.url) do (
   echo %%~dpnxF
   call :findurl "%%~dpnxF"
)
popd
goto end
:findurl inputfile
set url=
for /f "tokens=2 delims==" %%i in ('findstr URL %1') do set url=%%i
echo %url%
echo -
:end
#-- END BATCH SCRIPT

Unfortunately, my knowledge of such batch scripts is very limited.

I get error messages when calling the batch file through the shell
function. Maybe there is someone here who can interpret this script? To me
it would be sufficient to simply call shell("location of the file and file
name of the url-file .. shell commands") and receive back the URL property
as text. Or is there any other way to get to this information?

Since LC is cross-platform, such solution also would be nice to have for
OSX and Linux?

Regards, Roland
___
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: Anyone able to connect to a PostgreSQL database with lc server?

2021-02-12 Thread Andre Garzia via use-livecode
Whatever it was, it is apparently happening on 9.0.4 but fixed in
9.6.2-rc-2, go figure...

I don't have time to dive deep into this, I'm just happy to have it working.

On Fri, 12 Feb 2021 at 12:42, Andre Garzia  wrote:

> Hi Folks,
>
> Before I escalate this to HQ, did anyone here was able to connect to a
> postgresql database server using LiveCode Server?
>
> I'm getting a hard crash here. The server is exiting with Signal 11
> (segmentation fault?) on the call to revOpenDatabase. The arguments passed
> to the server are correct. The same app (using RevIgniter) is able to
> connect to MySQL without any problem.
>
> We have a PostgreSQL database to benefit from "jsonb" fields. We can't
> convert it to MySQL.
>
> Best
> Andre
>
> --
> https://www.andregarzia.com 
> Want to support me? Buy me a coffee at https://ko-fi.com/andregarzia
>


-- 
https://www.andregarzia.com 
Want to support me? Buy me a coffee at https://ko-fi.com/andregarzia
___
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


Anyone able to connect to a PostgreSQL database with lc server?

2021-02-12 Thread Andre Garzia via use-livecode
Hi Folks,

Before I escalate this to HQ, did anyone here was able to connect to a
postgresql database server using LiveCode Server?

I'm getting a hard crash here. The server is exiting with Signal 11
(segmentation fault?) on the call to revOpenDatabase. The arguments passed
to the server are correct. The same app (using RevIgniter) is able to
connect to MySQL without any problem.

We have a PostgreSQL database to benefit from "jsonb" fields. We can't
convert it to MySQL.

Best
Andre

-- 
https://www.andregarzia.com 
Want to support me? Buy me a coffee at https://ko-fi.com/andregarzia
___
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: LC Roadmap

2021-02-12 Thread Richmond via use-livecode
I've said something to that effect earlier, at which point I was jumped 
all over.


So, because I don't want to be jumped all over again, and because
saying the 'roadmap' needs to be updated will have no effect (didn't the 
last 3 times),

I'm NOT stating what I think.

Love. kisses, and other things,

Richmond.

On 12.02.21 14:12, Klaus major-k via use-livecode wrote:

Hi folks,

see subject -> Last Updated on July 14, 2020
I think it is time to update the roadmap, what do you think?


Best

Klaus
--
Klaus Major
https://www.major-k.de
https://www.major-k.de/bass
kl...@major-k.de


___
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


LC Roadmap

2021-02-12 Thread Klaus major-k via use-livecode
Hi folks,

see subject -> Last Updated on July 14, 2020
I think it is time to update the roadmap, what do you think?


Best

Klaus
--
Klaus Major
https://www.major-k.de
https://www.major-k.de/bass
kl...@major-k.de


___
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