![]() |
|
|||||||
| Register | >> Amiga FAQ/Wiki << | Rules & Help | Members List / Moderators List | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
.
Join Date: Oct 2004
Location: Ioannina/Greece
Posts: 5,041
|
I have this little prob, I want to add 2 icons on Amidoc to enable or disable poseidon usb stack by clicking them... but how can I make them?
because when putting these commands on whdload.prefs they work, but there is a delay in whdload loading, and you must wait some time before loading another slave... the enable stack command is: Code:
System:prefs/env-archive/PsdStackLoader Code:
System:c/AddUSBHardware REMOVE ALL do I need to make a script or something? similar to dos batch files? an arrex script? I don't know... ![]()
__________________
A1200D mfilos ed. : ACA 1231/42 , Indivision MK2 , IDEfix Express , Subway , PicoPSU 120w custom 3.9 ROM/OS |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Oct 2006
Location: Germantown, Maryland / USA, born in Hannover / Germany
Posts: 587
|
I think you can just create 2 new shell script (text)files with ed or ced or some editor.
For example, make one file called "startUSB" and one called "stopUSB" and put the respective line of code in each. Then make them executable shell scripts by using the protect command to add the s (for script) flag to their file attributes, for example "protect startUSB s add" and "protect stopUSB s add". With the s flag, amigados and workbench will treat them as executable shell scripts. Put both files in "sys:s", or in "sys:c" or some other directory where you keep your shell scripts. Then attach them as shell commands to an Amidoc icon. I only use toolmanager. In toolmanager, I think you first create a button, then tell it the command to execute upon click (your newly created scripts) and then choose an icon for the button. I bet Amidoc works similar. You can also create workbench icons for the scripts, since they are executable now. I don't remember so well how. This is long way but should work: Use some tool-icon as template. It must be an icon that runs a shell-command, like one of your whdload game icons. Copy that icon (it is a .info file) over to the same directory as your script files and rename it to "startUSB.info". Do same again but rename to "stopUSB.info". Use file info window on workbench to change the icons' commands to e.g. "sys:s/startUSB" and "sys:s/stopUSB". Then use favorite icon editor to change appearance. btw: You can get more fancy and just use one script with options, e.g. a script called "switchUSB" with keyword arguments "switchUSB on" and "switchUSB off". To do that, you have to use the ".bra {" and ".ket }" etc. notation to define command line arguments inside your script files. Alternatively you can make one "toggleUSB" script that sets an env-variable whether USB is on or off, and switches accordingly to that env-variable. There you have to use $ notation for accessing env-variables. Last edited by rsn8887; 08 January 2007 at 00:46. |
|
|
|
|
|
#3 |
|
.
Join Date: Oct 2004
Location: Ioannina/Greece
Posts: 5,041
|
wow, too much info rsn8887, thanks! gonna try it tomorrow after some sleep!
![]()
__________________
A1200D mfilos ed. : ACA 1231/42 , Indivision MK2 , IDEfix Express , Subway , PicoPSU 120w custom 3.9 ROM/OS |
|
|
|
|
|
#4 |
|
Registered User
Join Date: Oct 2006
Location: Germantown, Maryland / USA, born in Hannover / Germany
Posts: 587
|
Addendum:
since both your actions only require one line of code each, I think you can enter them directly into an icon's command line... no need even to create batch files. If AmiDoc has an option to "execute shell-command" on-click for your dock buttons, just put your commands in there, and it should work much easier than above instructions ![]() |
|
|
|
|
|
#5 |
|
.
Join Date: Oct 2004
Location: Ioannina/Greece
Posts: 5,041
|
I did it!
yeah! plain text files, executables and scripts, and as default tool : IconX .... works great! thanks rsn8887!
__________________
A1200D mfilos ed. : ACA 1231/42 , Indivision MK2 , IDEfix Express , Subway , PicoPSU 120w custom 3.9 ROM/OS |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Poseidon V3.4 for AmigaOS UPDATE!!! | keropi | News | 5 | 03 November 2006 09:56 |
| Preload/S WHD how do i enable this ???? | synchro | Amiga scene | 6 | 03 October 2004 14:37 |
| Ati - enable 720x576, 640x512 (registry-only) | NoX1911 | support.WinUAE | 4 | 04 June 2004 12:32 |
| A tool to make shortcut icons in AmigaOS 3.1? | Tbird | request.Apps | 2 | 27 January 2003 23:20 |
| how to make icons appear on an amiga 500 after transfer from pc | barbecue | New to Emulation or Amiga scene | 15 | 06 November 2002 06:36 |