English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   Coders. System (http://eab.abime.net/forumdisplay.php?f=113)
-   -   Workbench.library V44 + OpenWBObject generic remplacement code for classic WB 3.0 (http://eab.abime.net/showthread.php?t=100072)

CFOU! 18 December 2019 19:15

Workbench.library V44 + OpenWBObject generic remplacement code for classic WB 3.0
 
Hi,

I had coded longtimes ago an command named WHDAutoLaunch:
http://eab.abime.net/showthread.php?threadid=19691

but this command use function OpenWbObjet (-96) and workbench.library v44+ is needed

so it's not compatible with all workbench 3.0 /3.1

I'll looking for a generic code to replace quickly this function for compatibility with classic workbench

Have somebody already coded this ?:bowdown

thomas 19 December 2019 11:57

You could use wbstart.library http://aminet.net/package/util/libs/WBStart

Doing it completely on your own without an external library is rather difficult because you have to consider many different kinds of icons. And your program has to stay active until the started program returns the wb msg. Wbstart.library does all that for you.

Thomas Richter 19 December 2019 12:58

Quote:

Originally Posted by CFOU! (Post 1365987)
but this command use function OpenWbObjet (-96) and workbench.library v44+ need

so it's not compatible with all workbench 3.0 /3.1

I'll looking for a generic code to replace quickly thi function for compatibility with classic workbench


What precisely do you need? OpenWBObject() has two different purposes: Open a window on the workbench if the object is a directory, or loading and starting a program as if its icon was double clicked on the workbench.


For the latter: The CLICon archive (see aminet)

http://aminet.net/util/wb/CLICon.lha


contains a tiny shell tool "WBLoad" which does this for you. It requires a tool or project icon from which a program is run and started.

Hi thanks for your ansqer.

I use it to open a window on the workbench with directory as object in fact!

CFOU! 19 December 2019 13:03

Quote:

Originally Posted by thomas (Post 1366137)
You could use wbstart.library http://aminet.net/package/util/libs/WBStart

Doing it completely on your own without an external library is rather difficult because you have to consider many different kinds of icons. And your program has to stay active until the started program returns the wb msg. Wbstart.library does all that for you.

thanks but in fact i use it to open window using directory path as object and not to launch a program.

See following video to see usage of command i want update (OpenFolder Option)
https://www.youtube.com/watch?v=2I8N...ature=youtu.be

thomas 19 December 2019 14:08

You cannot open Workbench windows on WB 3.1 and below.

CFOU! 19 December 2019 16:44

Quote:

Originally Posted by thomas (Post 1366161)
You cannot open Workbench windows on WB 3.1 and below.

I know... it's for that if i ask if another coded are already made a generic function to 'emulate' OpenWBObject of workbench.library (V44+) on old WB3.0&3.1 (workbench.library V39.x & V40.x by example)

thomas 19 December 2019 16:56

You cannot open Workbench windows on WB 3.1 and below from a program. It is not possible.

CFOU! 19 December 2019 16:59

Quote:

Originally Posted by thomas (Post 1366203)
You cannot open Workbench windows on WB 3.1 and below from a program. It is not possible.

so it's clear now ;)

CFOU! 19 December 2019 17:00

Quote:

Originally Posted by thomas (Post 1366203)
You cannot open Workbench windows on WB 3.1 and below from a program. It is not possible.

so it's clear now ;) so it's normal i am not found solution !

thomas 19 December 2019 17:03

You would need the source code of workbench.library and add this function in the code.

Maybe the leaked WB3.1 source code could help.

Thomas Richter 19 December 2019 18:23

Quote:

Originally Posted by CFOU! (Post 1366207)
so it's clear now ;) so it's normal i am not found solution !

I afraid there is no solution. The workbench v40 does not offer an interface for it.

Minuous 19 December 2019 22:25

OS3.0 and 3.1 are very obsolete and lacking lots of features. Upgrading to OS3.9 will solve this particular problem and many others.


All times are GMT +2. The time now is 03:09.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.

Page generated in 0.04254 seconds with 11 queries