English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 11 July 2021, 18:54   #21
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,248
Quote:
Originally Posted by Octopus66 View Post
I am exploring the possibility of running an Arexx script from default icon, but I am unclear how this works. What should the default tool be? How does this interact with the rexx script?
What do you want to execute? depending on the type of script you have to use a tool, for example for all video formats (MP4, MPG, AVI, QT, etc..) in the Def Icon of these formats i play a small script from the Icon using the "Shell" parameter "no prompt for input", see attached video".

http://eab.abime.net/zone/VideoPlay.zip

Last edited by AMIGASYSTEM; 11 July 2021 at 19:06.
AMIGASYSTEM is offline  
Old 11 July 2021, 19:25   #22
Octopus66
Registered User
 
Join Date: Feb 2016
Location: London
Posts: 335
Nice - all working now. Curious as to why Script is the tool and not Arexx?

Thanks to Thomas for pointing out the examples on OS3.9 CD & all other suggestions too.

This is my arexx script for reference.

Quote:
/* $VER: ShowREKO.rexx 1.0 (11.07.2021) */

OPTIONS RESULTS
PARSE ARG files

/* Enter options here */

DO WHILE files~==""
files=STRIP(files)
IF files~=="" THEN DO
IF left(files,1)='"' THEN DO
PARSE VAR files '"'file'"' files
END
ELSE DO
PARSE VAR files file" "files
END

IF EXISTS(file) THEN DO
ADDRESS COMMAND 'c:run <>NIL: c:showreko "'file'"'
END
END
END
Octopus66 is offline  
Old 11 July 2021, 19:27   #23
Octopus66
Registered User
 
Join Date: Feb 2016
Location: London
Posts: 335
Quote:
Originally Posted by AMIGASYSTEM View Post
What do you want to execute? depending on the type of script you have to use a tool, for example for all video formats (MP4, MPG, AVI, QT, etc..) in the Def Icon of these formats i play a small script from the Icon using the "Shell" parameter "no prompt for input", see attached video".

http://eab.abime.net/zone/VideoPlay.zip
My problem was on post #8 https://eab.abime.net/showpost.php?p...73&postcount=8

Solution post #22 above. I believe this is the same as your solution?

Last edited by Octopus66; 11 July 2021 at 19:33.
Octopus66 is offline  
Old 11 July 2021, 19:34   #24
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
Quote:
Originally Posted by Octopus66 View Post
Curious as to why Script is the tool and not Arexx?
Because you want to run the script, don't you?

If you use Arexx as default tool, then Arexx is called with the Reko file as argument. And what should happen then? Arexx does not know what to do with a Reko file.

If you use the script as default tool, then AmigaDOS tries to run the script as a shell command. It recognises it as Arexx script and runs Arexx implicitly.
thomas is offline  
Old 11 July 2021, 21:04   #25
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,248
Quote:
Originally Posted by Octopus66 View Post
. I believe this is the same as your solution?
Yes it works with your script too, see attached video:

http://eab.abime.net/zone/ShowREKO.avi
AMIGASYSTEM is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mike the Magic Dragon: in-game problem or WinUAE problem? petran support.WinUAE 33 16 August 2023 20:29
aspi problem (was: auto resize problem) Kyon support.WinUAE 34 31 May 2009 16:56
Problem with Kickstarts [rare problem with faulty scripts in early v1.1 release] Topgun project.MAGE 14 08 June 2006 22:19

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:40.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.06850 seconds with 14 queries