English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 13 October 2018, 06:57   #1
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 46
Posts: 1,341
Execute script without knowing name?

Is there a way of using the Execute command with wildcards, if you don't know the name of the script and it's the only file on the selected path? I would prefer NOT to use startup-sequence or anything like that.
Foebane is offline  
Old 13 October 2018, 07:05   #2
desiv
Registered User
 
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,392
Not sure, but thinking out loud here...
Could you redirect the output of the "dir" command into an environment variable and then execute that environment variable?
(No idea if that would work; but it's late and that popped into my head. That and an image of Betty Grable playing Turrican. Maybe you shouldn't listen to me after all...)
desiv is online now  
Old 13 October 2018, 08:12   #3
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 46
Posts: 1,341
Here is what I came up with, thanks to that old script I'd been working on concerning extraction of multiple files. I simply modified it to this:

Code:
LIST #? LFORMAT="EXECUTE *"%N*"" >RAM:Foebane
EXECUTE RAM:Foebane
It does the job, and I can use it with any single file with any name I choose.
Foebane is offline  
Old 13 October 2018, 09:52   #4
haps
Rumpig

haps's Avatar
 
Join Date: Aug 2006
Location: The bottom of the bottle
Age: 2
Posts: 181
What a silly idea.

While running scripts you don't know the name of, why not run scripts that you don't even know the purpose of.
haps is online now  
Old 13 October 2018, 10:42   #5
thomas
Registered User
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 5,717
This one does not nest execute commands:

Code:
execute "`list nohead quick`"
Might not work on Kick 1.3, though. But %n does not work on 1.3, either. Use %s instead.
thomas is offline  
Old 13 October 2018, 11:27   #6
jotd
Cat freak
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 47
Posts: 2,648
I think OP meant "how to execute scripts with a given pattern" (some software just creates files with dates, etc... useful in that case)
jotd is offline  
Old 13 October 2018, 12:19   #7
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 45
Posts: 3,245
Another way of doing this :
Code:
s:spat execute #?
It will, however, execute all of them (but if several files match, how to choose the right one anyway ?).
meynaf is offline  
Old 13 October 2018, 16:11   #8
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 46
Posts: 1,341
Some clarification:

I wanted my AmigaDOS setup to detect any scripts found on DH4: and run them upon startup, but it would be only one script, and the configuration would point to the zip archive I was going to use that contained the DH4: data. However, I had to use the same name for the execute command, so what I wanted was to be able to execute any lone script found on DH4: with any name.

Basically, this is a carry-on from my thread about the "flickery objects" from Support.WinUAE, but it is still an interesting question, I think.

Nesting script executions is a bad thing? I think I'm already doing it with my current setup, I didn't think there'd be a problem.

I'm currently at a relative's for the weekend, so I won't be able to try out your suggestions until at least Monday morning, but any advice is still welcome.
Foebane is offline  
Old 14 October 2018, 19:42   #9
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 46
Posts: 1,341
Quote:
Originally Posted by meynaf View Post
Another way of doing this :
Code:
s:spat execute #?
It will, however, execute all of them (but if several files match, how to choose the right one anyway ?).
Back home now, just tried this and it works. What's more, I had a loot at the SPat script and it's almost similar to my own above. But this script already exists so I will use it instead.

Thanks, Meynaf!
Foebane 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
Execute file without using execute VoltureX support.Apps 3 01 December 2011 10:59
Execute script works but not after adding an icon with IconX as Default Tool. e5frog support.Other 19 27 July 2010 11:23
I can't execute installer paulo_becas support.Apps 5 01 March 2010 11:02
How to execute an intro with ASM ONE D4Ni3L3 Coders. General 56 14 June 2008 14:00
Execute a script frikilokooo project.ClassicWB 6 20 November 2007 12:36

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 02:01.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.06751 seconds with 13 queries