Poster | Thread |
OldFart
| |
Re: Request - Simple executable to start Script Posted on 2-Dec-2010 9:33:54
| | [ #21 ] |
|
|
|
Elite Member |
Joined: 12-Sep-2004 Posts: 3060
From: Stad; en d'r is moar ain stad en da's Stad. Makkelk zat! | | |
|
| @_Steve_
Quote:
@BooBoo
That isn't going to be so simple as I suspect both OS3.x and OS4.x are on different HDs (or at least different partitions of the same drive), and assuming OS4.x works in the same manner as 3.x did, you'd have to hold down both mouse buttons upon rebooting to select the 3.x partition to boot into first. |
It MIGHT be simpler then you think!
Let me sum up what I take from all this: When the machine is booted into '68k mode', clicking The Icon should activate WHDload (or doing something WHDload-ish). When the machine is booted into OS4, clicking The Icon should print a message.
This can be done through the command path: when in 68k mode, the command path activates something WHDload-ish, but when in OS4 mode, the very same command just prints a message, due to finding the same commandNAME (in a different path), but with differing functionality. I'm sorry for maybe sounding a bit obscure.
OldFart_________________ More then three levels of indigestion and you're scroomed! |
|
Status: Offline |
|
|
OldFart
| |
Re: Request - Simple executable to start Script Posted on 2-Dec-2010 9:58:49
| | [ #22 ] |
|
|
|
Elite Member |
Joined: 12-Sep-2004 Posts: 3060
From: Stad; en d'r is moar ain stad en da's Stad. Makkelk zat! | | |
|
| @BooBoo
After rereading post #11, and having enjoyed a good night's rest, I come to this solution (provided I've understood your quest properly): For the sake of simplicity let's assume that your OS4 partition is simply called 'OS4:'.
In OS4:C you make a file called WHDload. This is a simple scriptfile with only this command: "Execute RBoot:Start" (without the double-quotes). The file should be executable and be designated a script.
Now for files with an icon that have WHDload as Default Tool, this will happen: When in 68k mode, the command WHDload will be run and so allows you to run harware banging games as per WHDload's intention. When in OS4 mode, the scriptfile WHDload will be run, which in turn runs your RBoot:Start script, which gives you a message of some sort. Come to think of it: rename your RBoot:Start file into WHDload and put it in OS4:C, with all appropriate checkboxes ticked (executable and script).
OldFart _________________ More then three levels of indigestion and you're scroomed! |
|
Status: Offline |
|
|
BooBoo
| |
Re: Request - Simple executable to start Script Posted on 2-Dec-2010 12:58:01
| | [ #23 ] |
|
|
|
Member |
Joined: 13-May-2007 Posts: 45
From: Unknown | | |
|
| Quote:
mpiva wrote: @BooBoo
Would it work to name your script "WHDLoad" and turn on the "s" protection bit so that it will run like a command? Then if anything tries to run "WHDLoad", it would run your script instead. |
@Thread unfortunately even with the checkboxes/protection S&E although the script becomes executable from shell it wont work as Default Tool - This is the first thing I tried.
Last edited by BooBoo on 02-Dec-2010 at 01:01 PM. Last edited by BooBoo on 02-Dec-2010 at 12:58 PM.
|
|
Status: Offline |
|
|
thomas
| |
Re: Request - Simple executable to start Script Posted on 2-Dec-2010 16:06:18
| | [ #24 ] |
|
|
|
Super Member |
Joined: 28-May-2003 Posts: 1144
From: Germany | | |
|
| @BooBoo
Scripts cannot be run as Workbench tools, neither directly with a tool icon nor through a project icon with the script as default tool. Scripts can only be run in a shell (CLI). Workbench processes by definition don't have a CLI. That's how programs distinct between start by Workbench and start from DOS shell.
I quickly put together a small program which should do what you wish. It's 68k currently (I used WinUAE to develop it) and I have no place to upload it right now. Will make an OS4 version and upload it to my homepage tonight when I am at home.
_________________ Email: thomas-rapp@web.de Home: thomas-rapp.homepage.t-online.de |
|
Status: Offline |
|
|
BooBoo
| |
Re: Request - Simple executable to start Script Posted on 2-Dec-2010 16:16:56
| | [ #25 ] |
|
|
|
Member |
Joined: 13-May-2007 Posts: 45
From: Unknown | | |
|
| |
Status: Offline |
|
|
ChrisH
| |
Re: Request - Simple executable to start Script Posted on 2-Dec-2010 16:43:43
| | [ #26 ] |
|
|
|
Elite Member |
Joined: 30-Jan-2005 Posts: 6679
From: Unknown | | |
|
| @BooBoo I was going to offer to do what thomas is, but he got there first! Should be easy anyway. _________________ Author of the PortablE programming language. It is pitch black. You are likely to be eaten by a grue... |
|
Status: Offline |
|
|
thomas
| |
Re: Request - Simple executable to start Script Posted on 2-Dec-2010 18:41:06
| | [ #27 ] |
|
|
|
Super Member |
Joined: 28-May-2003 Posts: 1144
From: Germany | | |
|
| @BooBoo
Ok, here it is: http://thomas-rapp.homepage.t-online.de/downloads/RunScript.lha
Usage:
Copy either RunScript.os4 or RunScript.68k to C:WHDLoad. Then enter
makedir envarc:RunScript
and
setenv save RunScript/WHDLoad the:script/to_run
That's it. If you want to replace another program, just change WHDload into the name of the other program everywhere.
There is a bit of magic in the script path: The program first makes a CD to the:script and then executes to_run. So if you want the current directory to be set somewhere else than the script is in, then put the script into s: and set the env variable to the:directory/to_run. Although the script is not in "the:directory", it will be executed because the execute command also searches in s:.
_________________ Email: thomas-rapp@web.de Home: thomas-rapp.homepage.t-online.de |
|
Status: Offline |
|
|
BooBoo
| |
Re: Request - Simple executable to start Script Posted on 2-Dec-2010 20:52:51
| | [ #28 ] |
|
|
|
Member |
Joined: 13-May-2007 Posts: 45
From: Unknown | | |
|
| |
Status: Offline |
|
|