Jump to content

This topic is 4677 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

FM 11 Adv, Win 7 64 bit

I’m trying to use the Send event script step to open non-FM files. To enter a file name and its path, I go to the file in Windows Explorer, shift+right click the file and choose copy path to the clipboard. I then paste the path into the field in FM. However, the pasted path is contained within quotes. I strip the quotes from the path with left and right functions. The send event script then produces an error. If I type the path (instead of pasting from the clipboard) the script runs correctly.

The attached file will make things clearer. I paste from the clipboard into FilePath. FilePath2 is a calculation field that removes the quotes. A script trigger on FilePath and FilePath2 runs the scrip (it’s on both just for checking purposes).

Interestingly, when FilePath has a field without quotes, the script still runs correctly on FilePath2 even though the beginning and ending characters have been stripped from the file path! Even applications (exe files) run without the beginning and ending characters in the path!

Any suggestions?

openExample.zip

Posted

FM 11 Adv, Win 7 64 bit

I’m trying to use the Send event script step to open non-FM files. To enter a file name and its path, I go to the file in Windows Explorer, shift+right click the file and choose copy path to the clipboard. I then paste the path into the field in FM. However, the pasted path is contained within quotes. I strip the quotes from the path with left and right functions. The send event script then produces an error. If I type the path (instead of pasting from the clipboard) the script runs correctly.

The attached file will make things clearer. I paste from the clipboard into FilePath. FilePath2 is a calculation field that removes the quotes. A script trigger on FilePath and FilePath2 runs the scrip (it’s on both just for checking purposes).

Interestingly, when FilePath has a field without quotes, the script still runs correctly on FilePath2 even though the beginning and ending characters have been stripped from the file path! Even applications (exe files) run without the beginning and ending characters in the path!

Any suggestions?

Substitute( openExample::filePath ; """ ; "" )

Tip: Use the Data Viewer on your Advanced Copy and you can test bed calculations.

This topic is 4677 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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