25 June 2015, 15:28 | #1 |
Registered User
Join Date: Apr 2009
Location: N/A
Posts: 962
|
Key logger Commodity with Source Code?
I am not trying to use this for wrong reasons. I would like to create a commodity myself but to be honest I do not know from where to start with C Amiga development.
I would like that when I start typing in Workbench and hit enter a program us run. For example if I wrote "WordWorth" the Commodity would start WordWorth7. If I type "Colonization" then it would run the game "Colonization". I am not sure if something like this exists for the Workbench. This would mean no need of opening several folders or have a menu. |
25 June 2015, 16:40 | #2 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,020
|
You should consider that a commoditiy sits in the input stream. It is not specific to an active application and AFAIK it cannot determine which application is active.
Therefore your commodity will run Wordworth not only when Workbench is active but also if you open a text editor and write "I like WordWorth as a word processor" into it. Anyway, find attached an example of a standard commodity, i.e. it just listens for a hotkey and opens its GUI. |
25 June 2015, 21:24 | #3 | ||
Registered User
Join Date: Apr 2009
Location: N/A
Posts: 962
|
Thanks for the code thomas . I'll try to compile it.
Quote:
Quote:
|
||
25 June 2015, 21:50 | #4 |
Registered User
Join Date: May 2006
Location: Kilmacolm
Age: 46
Posts: 632
|
Can you set a bunch of aliases for the programs you want a keyboard shortcut to run? Then you could just type Amiga+e (not sure if it is left or right amiga) to get a single command entry window then enter your shortcut name.
|
25 June 2015, 23:06 | #5 |
Registered User
Join Date: Apr 2009
Location: N/A
Posts: 962
|
What I am thinking is that the Amiga key would start another program (therefore taking focus) what you write is captured by this second program. When you hit enter the program tries to map the input with a program and tries to start that and exit (or simply no longer taking input). Like that if you are writing a document the program that you write does not finish written in the document.
Unfortunately I do not have much experience with Amiga development and therefore I am not sure how much of the above is possible or not. |
28 June 2015, 15:33 | #6 |
Registered User
Join Date: May 2006
Location: Kilmacolm
Age: 46
Posts: 632
|
That's kinda what Amiga+E does. Opens a window for entering a single command. Combined with the ALIAS command you can get what you want I think, no programming required.
For example, Classic WB has personal paint installed. The programs path is - sys:Programs/ppaint/ppaint I can add the line ALIAS paint sys:Programs/ppaint/ppaint to the file S:User-Startup Now pressing "right Amiga+e" and entering "paint" in the window will load ppaint. |
28 June 2015, 16:59 | #7 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,020
|
Just for fun I completed the above example into a full project.
Now it sits in the background until you press the hotkey (Ctrl-R). Then it opens a list of predefined programs. You can choose one with the cursor keys or by entering a few letters into the input field. Press enter to run the program or Esc to hide the window. The list of programs is configured as tooltypes in the commodity's icon. The format is TOOL=name,path where name is shown in the list and path is the command to run. For example TOOL=Multiview,Sys:Utilities/Multiview |
30 June 2015, 12:21 | #8 |
Registered User
Join Date: Apr 2009
Location: N/A
Posts: 962
|
|
04 July 2015, 17:44 | #9 |
Registered User
Join Date: Apr 2009
Location: N/A
Posts: 962
|
|
04 July 2015, 18:43 | #10 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,020
|
Unpack this to somewhere on your harddrive:
http://www.haage-partner.de/download/AmigaOS/NDK39.lha Unpack these to ram: and install vbcc_bin first, then vbcc_target. When asked for the include directory select NDK_3.9/include/include_h from the archive above. http://server.owl.de/~frank/vbcc/201...amigaos68k.lha http://server.owl.de/~frank/vbcc/201...8k-amigaos.lha Unpack this to ram: and copy ixemul-020s.library to libs:ixemul.library http://aminet.net/dev/lib/ixemul-48.3-bin-m68k.lha Unpack this to ram: and copy make to c: http://aminet.net/dev/gg/make-382-bin-m68k.lha Reboot. Then open a shell window, change to the commo directory and just enter make. |
06 July 2015, 01:09 | #11 |
Registered User
Join Date: Apr 2009
Location: N/A
Posts: 962
|
Thanks thomas, managed to install. I was getting the following error when trying to create executable.
Code:
Fatal error 8: Cannot open "-ldebug": No such file or directory. Last edited by Sim085; 06 July 2015 at 11:14. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
My old source code | gemanix | Coders. General | 36 | 09 July 2017 13:33 |
Needed: A simple commodity that deletes files on workbench when you press the DEL key | gulliver | support.Apps | 20 | 27 February 2015 19:01 |
Source Code | camelord | support.Games | 2 | 06 August 2010 17:45 |
Source Code | Thalion | project.WinUAE - Kaillera | 3 | 28 April 2006 09:55 |
|
|