Jump to content

  •  

UPGRADE DEADLINE - SEPTEMBER 26, 2014!
FileMaker Inc. has a deadline for users of version 10,11, 12 as Individual box or volume licenses (with expired maintenance).
If you don't renew your maintenance and upgrade to FMP 13 you will no longer be eligible to upgrade, at the discount pricing.

Volume Licensing upgrade pricing for FileMaker Pro 13, FileMaker Pro 13 Advanced and FileMaker Server 13 will be discontinued.
Individual upgrade pricing for FileMaker Pro 13 and FileMaker Pro 13 Advanced will increase after September 26, 2014.
As of 27-September-2014, FileMaker 10 products will no longer be available for purchase or support.

http://help.filemaker.com/app/answers/detail/a_id/13865


Photo

Can variables be used with BaseElements plug-in?


  • Please log in to reply
3 replies to this topic

#1 K1200  old hand

K1200
  • Members
  • 588 posts
  • FM Application:11 Advance
  • Platform:Windows 7
  • Skill Level:Intermediate
  • Time Online: 20d 11h 23m 28s

Posted 07 February 2012 - 12:24 PM

Anyone using the BaseElements plug-in with variables on Windows?

I've been trying off and on for a week to pass filenames to the copy and move functions in the simple form:
BE_CopyFile ( $From ; $To)

BE_CopyFile and BE_MoveFile work fine when the filenames are literals (e.g., BE_CopyFile ( "C:\temp\file.txt" ; "C:\testdir\file.txt") )

But try as I might, I can't come up with a combination of text in variables that will be acted upon. And (frustratingly) the function only returns "?" on each and every combination ... which is absolutely no help in figuring anything out.

Goya (probably justifiably) doesn't offer any support for this free and open source offering, so there doesn't seem to be a way to pass this to them as a question. And, yes, I've read Goya's post on this forum regarding filename differences between Windows and Macs ... and the backslash issue, of course. But there's no mention of variables.

So I ask: has anyone deduced a workable format?

Thanks for any help.
  • 0

#2 brian rich  aging apprentice

brian rich
  • Members
  • 287 posts
  • LocationHampshire, England
  • FM Application:11 Advance
  • Platform:Cross Platform
  • Skill Level:Expert
  • Time Online: 11d 3h 10m 58s

Posted 17 February 2012 - 02:02 AM

Hi K1200

Yes, it is possible to use variables with BaseElements. For example, the script steps

Set Variable[ $source; "C:\Users\brian.rich\Desktop\52-012-02.jpg"]
Set Variable[ $dest; "C:\Users\brian.rich\Desktop\52-012-03.jpg"]
Set Variable[ $result; BE_CopyFile ( $source; $dest)]
Pause/Resume Script [Indefinitely]

will copy the file 52-012-02.jpg on my desktop to 52-012-03.jpg

$result contains the value 0 after the script is executed - if the result is a ?, then this suggests there is a problem with the way that the plug-in is installed

I did run into a number of issues when the paths in variables or fields contained back-slashes - you may need to escape them thus C:\\temp\\file.txt to get the path correct.

Do you get the same problem with other BE commands?

Brian
  • 0
Brian

#3 K1200  old hand

K1200
  • Members
  • 588 posts
  • FM Application:11 Advance
  • Platform:Windows 7
  • Skill Level:Intermediate
  • Time Online: 20d 11h 23m 28s

Posted 17 February 2012 - 05:38 PM

Brian, thanks.

It's a big step to have it confirmed that they should work. I can't imagine that the plug-in isn't installed properly because each command works with literals in the calls ... but each fails with variables. I'm aware of the back-slash issue ... although my experience is that I get it wrong more often than not. I'll go back over things with a fine-tooth comb ... and will use your desktop-to-desktop as a test template.

If Base Elements ever issues an update, maybe they'll incorporate an error return like "?<this is the call string>". Maybe?
  • 0

#4 K1200  old hand

K1200
  • Members
  • 588 posts
  • FM Application:11 Advance
  • Platform:Windows 7
  • Skill Level:Intermediate
  • Time Online: 20d 11h 23m 28s

Posted 22 February 2012 - 08:23 PM

Just a follow-up on this issue: Things are now working fine with the BaseElements Plug-in. The best I can reconstruct is that there were nested parentheses in the way I constructed the variables. I can't be certain because I tried so many variations. But using Brian's example as a template, I was able to get correct results from each of the five functions I need.

Thanks again for the help.
  • 0




FMForum Advertisers