Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi,

I have tried to do an script to save an URL as html with "WGET" command. If I use the shell command line to put:

wget --convert-links -O FileName.html "http://www.google.com"

It´s working and a "FileName.html" file is saved in my root directory but when I try to obtain this result in Filemaker with RunShellScript, it is not possible. Could anyone help me?????

The URL is saved as a global variable ($$datlink). I have created the different steps in my script but I only get an message: "ERROR"

STEPS into my script:

Set variable [$command; value:"wget " & "--convert-links " & "-O " & DB::FileName & " " & "\"" & $$datlink & "\""]



 

Set field [DB::Container; RunShellScript( $command ; "true" ; 10 )]

Help me!!!! Please

Thanks

Wardiam

What is the error message that you get when you call this function? You can see details about your last error by calling SMLastError or by looking at your plugin logs.

  • 3 weeks later...
  • Author

Dear Smef,

I'm sorry for my late reply but I have been on holidays the last two weeks. Thank you very much for your answer. I have called the SMLastError function at the end of my script and this is the message: "java.lang.RuntimeException: /bin/sh: wget: command not found". For the message I understand that this command "wget" is not found but I don't understand where is the problem because if I open the console-terminal and I call the "wget" command It works.

Could you help me?

Wardiam.

Hi Wardiam,

have a try providing the full path to `wget' ...

Set variable [$command; value:"/usr/local/bin/wget" & Char ( 32 ) & "--convert-links" & Char ( 32 ) & "-O" & Char ( 32 ) & DB::FileName & Char ( 32 ) & "\"" & $$datlink & "\""]/* etc...*/

which -- locate a program file in the user's path

/*searches your user-specific PATH (which may include some of the locations whereis searches, and may not include others - it might also include some places that whereis doesn't search if you'd added to your PATH*/

whereis -- locate programs

/*searches the standard *nix locations for a specified command.*/

  • Author

Thanks clemhoff for your reply. I have checked that "wget" is located into that path and it's right. I have used your recommendations and I have changed the script to:


Set variable [$command; value: "/usr/local/bin/wget" & Char ( 32 ) & "--convert-links" & Char ( 32 ) & "-O" & Char ( 32 ) & Import Files::File Name & Char ( 32 ) & "\"" & $$datlink & "\""]

Now the new error message is: "java.lang.RuntimeException: Process was interrupted; error output is:"

What do you think???

Wardiam

Sorry, but I can't reproduce this behavior; my SM script runs flawlessly.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.