English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 08 January 2007, 00:18   #1
keropi
.
 
Join Date: Oct 2004
Location: Ioannina/Greece
Posts: 5,038
Question How can I make 2 icons to put on the Amidoc with commands to enable/disable poseidon?

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
and the disable is:
Code:
System:c/AddUSBHardware REMOVE ALL
any help?
do I need to make a script or something? similar to dos batch files? an arrex script? I don't know...
keropi is offline  
AdSense AdSense  
Old 08 January 2007, 00:38   #2
rsn8887
Registered User
rsn8887's Avatar
 
Join Date: Oct 2006
Location: USA
Posts: 729
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.
rsn8887 is offline  
Old 08 January 2007, 00:45   #3
keropi
.
 
Join Date: Oct 2004
Location: Ioannina/Greece
Posts: 5,038
wow, too much info rsn8887, thanks! gonna try it tomorrow after some sleep!
keropi is offline  
Old 08 January 2007, 00:48   #4
rsn8887
Registered User
rsn8887's Avatar
 
Join Date: Oct 2006
Location: USA
Posts: 729
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
rsn8887 is offline  
Old 08 January 2007, 01:08   #5
keropi
.
 
Join Date: Oct 2004
Location: Ioannina/Greece
Posts: 5,038
I did it!
yeah! plain text files, executables and scripts, and as default tool : IconX .... works great! thanks rsn8887!
keropi is offline  
AdSense AdSense  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
uae-configuration: how to enable/disable 'cycle-exact'? hexaae support.WinUAE 32 28 October 2014 08:39
OS 3.5 icons on 3.1 & WHDLoad hangs when displaying icons PoulpSquad support.WinUAE 22 14 September 2012 00:57
OS3.9 graphics corruption when setting changed to put icons in "Other Memory" StevenJGore support.Apps 3 09 September 2008 18:22
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

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 07:48.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.11926 seconds with 11 queries