English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 28 June 2017, 19:17   #1
guy lateur
Registered User
 
guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
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, 20:05   #2
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
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, 20:21   #3
guy lateur
Registered User
 
guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
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, 20:26   #4
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
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, 20:36   #5
guy lateur
Registered User
 
guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
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, 20:51   #6
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
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, 07:21   #7
jPV
Registered User
 
jPV's Avatar
 
Join Date: Feb 2008
Location: RNO
Posts: 1,007
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, 11:58   #8
guy lateur
Registered User
 
guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
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
Clear background color for Shell window- Shell-StartUp fc.studio support.Apps 13 25 March 2022 18:52
ClassicWB68k recoverable alert when launching shell?! emuola project.ClassicWB 0 16 September 2013 15:53
Looking for good usages of the Amiga Workbench/Shell Thomas Olivaux New to Emulation or Amiga scene 2 16 April 2013 20:23
How to close the shell in Workbench 3.1 rodi support.Apps 6 02 June 2008 22:05
PC MS-DOS shell which look like old Workbench or TOS? s2325 request.Other 5 11 February 2008 14: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 10:07.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07288 seconds with 15 queries