Welcome, Guest. Please login or register.

Author Topic: Running workbench programs from another program  (Read 3307 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline motorollin

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show all replies
Re: Running workbench programs from another program
« on: May 29, 2006, 09:51:44 PM »
Which OS version? In 3.5 and 3.9 you have the WBRun command, which will simulate clicking the icon. You could call that programme from your app with the path to the programme you want to launch as an argument.

Obviously this will only work on 3.5/3.9 :roll:

--
moto

--EDIT
WBRun will open a drawer also.
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline motorollin

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show all replies
Re: Running workbench programs from another program
« Reply #1 on: May 29, 2006, 10:00:09 PM »
I think the WBRun supplied with OS3.5+ requires workbench.library v45+ - i.e. not 3.1.

However, I have just found this on Aminet, which might work. It also includes source code so you could implement the function directly in to your code.

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline motorollin

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show all replies
Re: Running workbench programs from another program
« Reply #2 on: May 29, 2006, 10:07:39 PM »
Well if the command works, just call the command from your application instead of integrating the function in to your source. Not as clean as it would require the presence of the command, but it would work.

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10