English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 28 June 2017, 20:17   #1
guy lateur
Registered User

guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 46
Posts: 297
Launching from Shell <-> from Workbench

Some applications behave differently when launched from the shell than they do when launched (double clicked) from the workbench. Take SGrab, for example, which is a nice little screen grabbing tool.

When I double click its icon from its workbench drawer, it opens a little GUI that allows me to select my settings. When I launch it from a shell (SGrab), it goes into non-interactive mode, and waits a couple of seconds before grabbing a screenshot.

Can I enter a command in the shell that launches this app like it would when I had double clicked it in the workbench? Something like 'WBLaunch SGrab', perhaps? I've tried 'SGrab -CX_POPUP=YES', but it says it's getting the wrong number of arguments. I don't have to specify all possible options, do I?

I don't think this matters, but I should probably mention that I'm looking for something that is usable as a key binding command in the FKey commodity.

TIA!
guy lateur is offline  
Old 28 June 2017, 21:05   #2
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 43
Posts: 15,505
Hiya guy lateur,

I very quickly skimmed through the file "SGrab.guide" in the archive. It seems that if you want to popup a window from shell you also need to set the cx_popkey variable.

So, from a shell try this:

sgrab cx_popkey "ctrl alt s" cx_popup=yes
DamienD is offline  
Old 28 June 2017, 21:21   #3
guy lateur
Registered User

guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 46
Posts: 297
Quote:
Originally Posted by DamienD View Post
Hiya guy lateur,

I very quickly skimmed through the file "SGrab.guide" in the archive. It seems that if you want to popup a window from shell you also need to set the cx_popkey variable.

So, from a shell try this:

sgrab cx_popkey "ctrl alt s" cx_popup=yes
Yep, you did it again, this works perfectly! Thanks, Damien!
I must have missed that part when skimming through the guide myself..
guy lateur is offline  
Old 28 June 2017, 21:26   #4
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 43
Posts: 15,505
No problem my friend, glad I could help

Syntax for Amiga programs can be a little trickly... I usually always type the following (and if that doesn't make sense then read the guides / manuals):

<program_name> ?

In this case it shows you:

DamienD is offline  
Old 28 June 2017, 21:36   #5
guy lateur
Registered User

guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 46
Posts: 297
Ok, thanks for the tips.
It becomes increasingly obvious I really should spend some time reading some very basic docs.
It's just that there's so much more fun stuff I can do in my spare amiga time..
guy lateur is offline  
Old 28 June 2017, 21:51   #6
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 43
Posts: 15,505
Quote:
Originally Posted by guy lateur View Post
It becomes increasingly obvious I really should spend some time reading some very basic docs.
Nah, I don't unless I really need to use a utility / program for a specific purpose.

Quote:
Originally Posted by guy lateur View Post
It's just that there's so much more fun stuff I can do in my spare amiga time..
Exactly
DamienD is offline  
Old 29 June 2017, 08:21   #7
jPV
Registered User
jPV's Avatar
 
Join Date: Feb 2008
Location: RNO
Posts: 715
Quote:
Originally Posted by guy lateur View Post
Can I enter a command in the shell that launches this app like it would when I had double clicked it in the workbench? Something like 'WBLaunch SGrab', perhaps?
Yes you can! The WBRun command is just for that, and I couldn't live without it It is included in the later OS versions, but if you're using older OS, grab it from Aminet.

It runs programs just like they'd been launched by double clicking an icon: tooltypes are read, it finds its datafiles from the progdir (no need to cd first like when launching a program from shell usually), program is launched to background and the command returns immediately etc.

I use it, for example, to launch WHDLoad stuff from the shell or when booted without startup-sequence. You can just use "wbrun somewhdloadgame" (without .info or .slave) to start them.

I've also added this kind of filetype for .slave files in DOpus, to get the WHDLoad games started by double clicking a .slave file in name mode listers:
Function : AmigaDOS
WBRun `List {f} LFORMAT="*"%P%M*""`
jPV is offline  
Old 29 June 2017, 12:58   #8
guy lateur
Registered User

guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 46
Posts: 297
Quote:
Originally Posted by jPV View Post
Yes you can! The WBRun command is just for that, and I couldn't live without it It is included in the later OS versions, but if you're using older OS, grab it from Aminet.

It runs programs just like they'd been launched by double clicking an icon: tooltypes are read, it finds its datafiles from the progdir (no need to cd first like when launching a program from shell usually), program is launched to background and the command returns immediately etc.

I use it, for example, to launch WHDLoad stuff from the shell or when booted without startup-sequence. You can just use "wbrun somewhdloadgame" (without .info or .slave) to start them.

I've also added this kind of filetype for .slave files in DOpus, to get the WHDLoad games started by double clicking a .slave file in name mode listers:
Function : AmigaDOS
WBRun `List {f} LFORMAT="*"%P%M*""`
Cool, thanks, I'll look into that as soon as I have the time!
guy lateur 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
ClassicWB68k recoverable alert when launching shell?! emuola project.ClassicWB 0 16 September 2013 16:53
Looking for good usages of the Amiga Workbench/Shell Thomas Olivaux New to Emulation or Amiga scene 2 16 April 2013 21:23
Clear background color for Shell window- Shell-StartUp fc.studio support.Apps 12 29 December 2009 15:21
How to close the shell in Workbench 3.1 rodi support.Apps 6 02 June 2008 23:05
PC MS-DOS shell which look like old Workbench or TOS? s2325 request.Other 5 11 February 2008 15:12

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:27.


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