Open URL Scriptstep

  • Follow


WinXP, FMP7 dev

I get strange effect when using the Open URL script step. One textfield 
containing:

file:a.doc and the scriptstep DOES open Word and then the file a.doc
file:a.txt and noting seems to happen
image:a.jpg and nothing seems to happen.

I surely must have overlooked something, but what?

-- 
Keep Well,
Ursus



0
Reply ursus 6/4/2005 3:51:01 PM

It's hard to tell by your example, but if you have any spaces in your 
path or file names, then the URL will be broken by that space.  You can 
perform a calc that replaces any spaces in your path with hex for the 
space (%20) and that should work.  Or if you were using the Send Message 
step (Windows only) to open the file, you would just put quotes around 
the entire string.

ursus.kirk wrote:
> WinXP, FMP7 dev
> 
> I get strange effect when using the Open URL script step. One textfield 
> containing:
> 
> file:a.doc and the scriptstep DOES open Word and then the file a.doc
> file:a.txt and noting seems to happen
> image:a.jpg and nothing seems to happen.
> 
> I surely must have overlooked something, but what?
> 

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg              (818) 883-2846
FM Pro Solutions       Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance
0
Reply Howard 6/4/2005 5:27:00 PM


Actually there are no spaces in the name. For this I tried the following:

URL<text>

file:01.txt
file:01.doc
file:01.htm
image:01.jpg

None of those seem to open using:
Open url <URL>

All files DO display the correct icon when i connect them to a calcuclation.
cURL <container> [URL]

All files are in the same folder as the FMP database file. And it needs to 
work cross-platform with XP and osX, so I can't use the Send Message step.


Ursus

"Howard Schlossberg" <howard@antispahm.fmprosolutions.com> schreef in 
bericht news:11a3p37qubjqbc7@corp.supernews.com...
> It's hard to tell by your example, but if you have any spaces in your path 
> or file names, then the URL will be broken by that space.  You can perform 
> a calc that replaces any spaces in your path with hex for the space (%20) 
> and that should work.  Or if you were using the Send Message step (Windows 
> only) to open the file, you would just put quotes around the entire 
> string.
>
> ursus.kirk wrote:
>> WinXP, FMP7 dev
>>
>> I get strange effect when using the Open URL script step. One textfield 
>> containing:
>>
>> file:a.doc and the scriptstep DOES open Word and then the file a.doc
>> file:a.txt and noting seems to happen
>> image:a.jpg and nothing seems to happen.
>>
>> I surely must have overlooked something, but what?
>>
>
> -- 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Howard Schlossberg              (818) 883-2846
> FM Pro Solutions       Los Angeles, California
>
> FileMaker 7 Certified Developer
> Associate Member, FileMaker Solutions Alliance 


0
Reply ursus 6/5/2005 2:36:53 PM

Using the Open URL step works the same way as it does in a browser.  In 
a browser, I need to start with "file:///c:/" followed by the file 
and/or path.

So the URL to a file in my FileMaker program folder would be:
"file:///c:/Program Files/FileMaker/FileMaker Pro 7/01.txt"

Of course, this is for Windows, so you would need to use a case() 
statement as your URL calc, using something like:

case(
abs(get(systemplatform)) = 2;
// platform 2 is Windows
"file:///c:/Program Files/FileMaker/FileMaker Pro 7/01.txt";
"file:whatever the correct syntax and path would be on Mac")

Sorry, I don't have any other ideas on this.  I haven't done enough 
testing with this, particularly not cross-platform.  Maybe someone else 
will have some ideas.

Howard


ursus.kirk wrote:
> Actually there are no spaces in the name. For this I tried the following:
> 
> URL<text>
> 
> file:01.txt
> file:01.doc
> file:01.htm
> image:01.jpg
> 
> None of those seem to open using:
> Open url <URL>
> 
> All files DO display the correct icon when i connect them to a calcuclation.
> cURL <container> [URL]
> 
> All files are in the same folder as the FMP database file. And it needs to 
> work cross-platform with XP and osX, so I can't use the Send Message step.
> 
> 
> Ursus
> 
> "Howard Schlossberg" <howard@antispahm.fmprosolutions.com> schreef in 
> bericht news:11a3p37qubjqbc7@corp.supernews.com...
> 
>>It's hard to tell by your example, but if you have any spaces in your path 
>>or file names, then the URL will be broken by that space.  You can perform 
>>a calc that replaces any spaces in your path with hex for the space (%20) 
>>and that should work.  Or if you were using the Send Message step (Windows 
>>only) to open the file, you would just put quotes around the entire 
>>string.
>>
>>ursus.kirk wrote:
>>
>>>WinXP, FMP7 dev
>>>
>>>I get strange effect when using the Open URL script step. One textfield 
>>>containing:
>>>
>>>file:a.doc and the scriptstep DOES open Word and then the file a.doc
>>>file:a.txt and noting seems to happen
>>>image:a.jpg and nothing seems to happen.
>>>
>>>I surely must have overlooked something, but what?
>>>
>>
>>-- 
>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>Howard Schlossberg              (818) 883-2846
>>FM Pro Solutions       Los Angeles, California
>>
>>FileMaker 7 Certified Developer
>>Associate Member, FileMaker Solutions Alliance 
> 
> 
> 

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg              (818) 883-2846
FM Pro Solutions       Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance
0
Reply Howard 6/5/2005 6:31:34 PM

Thanks Howard,

You were quite right. I do have to state full path. Which is quite 
counter-intuitive and I too have to figure out how the osX side works.

Ursus

"Howard Schlossberg" <howard@antispahm.fmprosolutions.com> schreef in 
bericht news:11a6h8bnqd01k5e@corp.supernews.com...
> Using the Open URL step works the same way as it does in a browser.  In a 
> browser, I need to start with "file:///c:/" followed by the file and/or 
> path.
>
> So the URL to a file in my FileMaker program folder would be:
> "file:///c:/Program Files/FileMaker/FileMaker Pro 7/01.txt"
>
> Of course, this is for Windows, so you would need to use a case() 
> statement as your URL calc, using something like:
>
> case(
> abs(get(systemplatform)) = 2;
> // platform 2 is Windows
> "file:///c:/Program Files/FileMaker/FileMaker Pro 7/01.txt";
> "file:whatever the correct syntax and path would be on Mac")
>
> Sorry, I don't have any other ideas on this.  I haven't done enough 
> testing with this, particularly not cross-platform.  Maybe someone else 
> will have some ideas.
>
> Howard
>
>
> ursus.kirk wrote:
>> Actually there are no spaces in the name. For this I tried the following:
>>
>> URL<text>
>>
>> file:01.txt
>> file:01.doc
>> file:01.htm
>> image:01.jpg
>>
>> None of those seem to open using:
>> Open url <URL>
>>
>> All files DO display the correct icon when i connect them to a 
>> calcuclation.
>> cURL <container> [URL]
>>
>> All files are in the same folder as the FMP database file. And it needs 
>> to work cross-platform with XP and osX, so I can't use the Send Message 
>> step.
>>
>>
>> Ursus
>>
>> "Howard Schlossberg" <howard@antispahm.fmprosolutions.com> schreef in 
>> bericht news:11a3p37qubjqbc7@corp.supernews.com...
>>
>>>It's hard to tell by your example, but if you have any spaces in your 
>>>path or file names, then the URL will be broken by that space.  You can 
>>>perform a calc that replaces any spaces in your path with hex for the 
>>>space (%20) and that should work.  Or if you were using the Send Message 
>>>step (Windows only) to open the file, you would just put quotes around 
>>>the entire string.
>>>
>>>ursus.kirk wrote:
>>>
>>>>WinXP, FMP7 dev
>>>>
>>>>I get strange effect when using the Open URL script step. One textfield 
>>>>containing:
>>>>
>>>>file:a.doc and the scriptstep DOES open Word and then the file a.doc
>>>>file:a.txt and noting seems to happen
>>>>image:a.jpg and nothing seems to happen.
>>>>
>>>>I surely must have overlooked something, but what?
>>>>
>>>
>>>-- 
>>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>Howard Schlossberg              (818) 883-2846
>>>FM Pro Solutions       Los Angeles, California
>>>
>>>FileMaker 7 Certified Developer
>>>Associate Member, FileMaker Solutions Alliance
>>
>>
>>
>
> -- 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Howard Schlossberg              (818) 883-2846
> FM Pro Solutions       Los Angeles, California
>
> FileMaker 7 Certified Developer
> Associate Member, FileMaker Solutions Alliance 


0
Reply ursus 6/5/2005 7:50:27 PM

4 Replies
291 Views

(page loaded in 0.087 seconds)

Similiar Articles:













7/24/2012 1:43:31 AM


Reply: