Programm zum Kontextmenü hinzufügen

Anfängerfragen zum Programmieren mit PureBasic.
Benutzeravatar
Delle
Beiträge: 1130
Registriert: 10.05.2005 22:48

Beitrag von Delle »

Hab ich runtergeladen, aber das sind ja auch nur "leere" Prozeduren mit denen ich erstmal nichts anfangen kann...
Benutzeravatar
ts-soft
Beiträge: 22292
Registriert: 08.09.2004 00:57
Computerausstattung: Mainboard: MSI 970A-G43
CPU: AMD FX-6300 Six-Core Processor
GraKa: GeForce GTX 750 Ti, 2 GB
Memory: 16 GB DDR3-1600 - Dual Channel
Wohnort: Berlin

Beitrag von ts-soft »

Code: Alles auswählen

AssociateFileEx (ext$,ext_description$,programm$,icon$,prgkey$,cmd_description$,cmd_key$)
ext$ is the extension (without the dot, for example "PB")
Ext_Description$ is the description of the file ("PureBasic Source")
programm$ is the programm with the full path ("c:\programme\japbe\japbe.exe")
Icon$ is the icon, when you want the second icon of file, add this with ",2" ("jaPBe.exe,2")
prgkey$ is the regestry-key of the applikation, normaly the filepart of programm$
cmd_description$ You can add a entry in the context-menu of the file. this is the description. ("open file with jaPBe")
cmd_key$ is the key, where the description is stored. Only for Win9X-System, but you should always add this ("open_file_with_jaPBe")
Unbedingt die Registry sichern, bevor Du es ausprobierst, ist nicht ungefährlich!!!

//Nachtrag:
Besser wäre es aber, wenn Du diese Einträge durch einen Installer, z.B. Inno-Setup oder NSI vornehmen läßt.
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.
Bild
Benutzeravatar
Delle
Beiträge: 1130
Registriert: 10.05.2005 22:48

Beitrag von Delle »

Leider wird mit dieser Prozedur genau das gemacht, was ich eigentlich nicht wollte: Mein Tool wird mit .gif assoziiert ;) Sprich beim Doppelklick öffnet es mit meinem Tool... das mit dem Kontextmenü funktioniert, auch wenn keine Parameter übergeben werden.
Antworten