Click Here
home features news forums classifieds faqs links search
6071 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
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
11 crawler(s) on-line.
 61 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 michalsc:  11 mins ago
 Hypex:  54 mins ago
 DiscreetFX:  1 hr 13 mins ago
 maseghir:  2 hrs 5 mins ago
 Lou:  2 hrs 35 mins ago
 ggw:  2 hrs 35 mins ago
 agami:  2 hrs 51 mins ago
 redfox:  4 hrs 5 mins ago
 Tpod:  4 hrs 34 mins ago
 matthey:  4 hrs 39 mins ago

/  Forum Index
   /  Amiga OS4.x \ Workbench 4.x
      /  Request - Simple executable to start Script
Register To Post

Goto page ( Previous Page 1 | 2 )
PosterThread
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
Profile     Report this post  
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
Profile     Report this post  
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
Profile     Report this post  
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
Profile     Report this post  
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

@thomas

Fantasic Thomas I dont know if you know me but I normaly post on EAB I would be intreseted in both the 68k and OS4 version and im very greatful

 Status: Offline
Profile     Report this post  
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
Profile     Report this post  
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
Profile     Report this post  
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

@thomas

ThankYou Thomas! Seems to work Well

Do you have OS4 Classic - Ive put a small Package together for OS4 Classic, I would like someone competent to have a look.
http://www.megaupload.com/?d=G0ZH45QE
Or
http://www.mediafire.com/download.php?8t6md35whclv30d

But anyway thanks again for the executable

Last edited by BooBoo on 02-Dec-2010 at 10:12 PM.
Last edited by BooBoo on 02-Dec-2010 at 09:20 PM.
Last edited by BooBoo on 02-Dec-2010 at 09:19 PM.

 Status: Offline
Profile     Report this post  
Goto page ( Previous Page 1 | 2 )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle