Click HereClick Here
home features news forums classifieds faqs links search
5152 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Channel: #Amigaworld
Channel Policy and Guidelines

(Uses JAVA Applet and Port 1024)
Visit the Chatroom Website

Who's Online
 28 guest(s) on-line.
 2 member(s) on-line.


 AndreasM,  imagodespira

You are an anonymous user.
Register Now!
 AndreasM:  2 mins ago
 imagodespira:  4 mins ago
 royleith:  7 mins ago
 bitman:  9 mins ago
 sundown:  15 mins ago
 BigD:  23 mins ago
 Musashi5150:  44 mins ago
 AliveMOon:  52 mins ago
 amigat:  52 mins ago
 Trekiej:  56 mins ago

/  Forum Index
   /  Amiga OS4.x \ Workbench 4.x
      /  ARexx and ' problem....
Register To Post

PosterThread
Tuxedo 
ARexx and ' problem....
Posted on 20-May-2012 11:54:30
#1 ]
Super Member
Joined: 28-Nov-2003
Posts: 1813
From: Perugia, ITALY

Hi ALL!
Since on my LoView Suite I use ARexx port to communicate between programs I need some help on managin ARexx(I dunno nothing or quite nothing of ARExx...).

The problem was that:

I send command thorught ARexx port and use ' character to enclose the Rexx line...but if in the filename I have another ' the line was truncated and get an error...

How I can solve that issue? Can I parse file name and add some special character to have Rexx recognize te correct/entire line? Anything else to do?

Thank you!

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
Belxjander 
Re: ARexx and ' problem....
Posted on 20-May-2012 12:12:13
#2 ]
Regular Member
Joined: 4-Jan-2005
Posts: 463
From: Chiba prefecture Japan

@Tuxedo

You may need to pre-process the string and insert an "escape" character or use " instead of ' or ` characters.

I recall using ' characters and " characters in string handling for writing rexx scripting on my own system some years ago

If that is any help?

 Status: Offline
Profile     Report this post  
broadblues 
Re: ARexx and ' problem....
Posted on 20-May-2012 12:37:31
#3 ]
Elite Member
Joined: 20-Jul-2004
Posts: 2398
From: Portsmouth England

@Tuxedo

Can you expand a bit on your problem, perhaps with a specific example?

how are you sending the command?

Sometimes you simply can't get the right combinatin of quotes etc if you are testing from the command line with C:rx so have to write a test script

_________________
BroadBlues On Blues BroadBlues On Amiga Walker Broad

 Status: Offline
Profile     Report this post  
Tuxedo 
Re: ARexx and ' problem....
Posted on 20-May-2012 14:29:31
#4 ]
Super Member
Joined: 28-Nov-2003
Posts: 1813
From: Perugia, ITALY

@all

the syntax was that:


SendRexxCommand("LOVIEW_THUMB_VIEWER", "'THUMB " .. file$[StartFile] .. "'")


LOVIEW_THUMB_VIEWER was the ARexx port of the program where I send the command

THUMB was the ARexx command I send

and the other was the file where I start read from...

I use the "(double quote) and the '(apices) to concatenate a full line to pass to the other program...

AFAIK ARexx needs ' to concatenate a full line like " to concatenate a full line on CLI...

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
broadblues 
Re: ARexx and ' problem....
Posted on 20-May-2012 15:51:17
#5 ]
Elite Member
Joined: 20-Jul-2004
Posts: 2398
From: Portsmouth England

@Tuxedo

I don't recognise the SendArexxCommand function is that a Hollywood command?

Have you simply tried it without any single quotes?

A lot depends on how that command sends the command onto ARexx but normally Arexx commands are sent as a single string so there would be no need to add the inner single quotes.


_________________
BroadBlues On Blues BroadBlues On Amiga Walker Broad

 Status: Offline
Profile     Report this post  
thomas 
Re: ARexx and ' problem....
Posted on 20-May-2012 15:53:27
#6 ]
Cult Member
Joined: 28-May-2003
Posts: 969
From: Germany

@Tuxedo

In ARexx you can use ' or " to delimit strings as you like.

To create a string which contains a single apostrophe, you can write either "'" or ''''.

To create a sting which contains a single double-quote character you can write either '"' or """".

_________________
Email: thomas-rapp@web.de
Home: thomas-rapp.homepage.t-online.de

 Status: Offline
Profile     Report this post  
Tuxedo 
Re: ARexx and ' problem....
Posted on 21-May-2012 20:05:41
#7 ]
Super Member
Joined: 28-Nov-2003
Posts: 1813
From: Perugia, ITALY

@thomas

that's exactly what I looknig for THANK YOU! :)

Only one thing...dont was '''' but '' to parse the apostrophe, if I use 4 that I get 2 ' in the parsed text, but with 2 ' was ok :)

Thank you all for replying! :D

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
thomas 
Re: ARexx and ' problem....
Posted on 22-May-2012 8:29:55
#8 ]
Cult Member
Joined: 28-May-2003
Posts: 969
From: Germany

@Tuxedo

What I wrote is correct. I'll try to explain it in other words:

If the string is delimited by apostrophes you can use quotation marks in the text but if you want to use apostrophes, you need to duplicate them.

text1 = 'Mike said "This is Tom''s house".'


If the string is delimited by quotation marks, you can use apostrophes in the text but if you want to use quotation marks, you need to duplicate them.

text2 = "Mike said ""This is Tom's house""."


_________________
Email: thomas-rapp@web.de
Home: thomas-rapp.homepage.t-online.de

 Status: Offline
Profile     Report this post  
Tuxedo 
Re: ARexx and ' problem....
Posted on 23-May-2012 13:16:41
#9 ]
Super Member
Joined: 28-Nov-2003
Posts: 1813
From: Perugia, ITALY

@thomas

ok, I've intended it wrong :)

However now all works fine :)

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  

[ home ][ about us ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright © 2000 - 2011 Amigaworld.net.

Page took 0.078304 seconds to load.